RPC cripto
Proxy a JSON-RPC request to a supported blockchain node and bill per credit.
Request shapes
- Single request: a JSON-RPC 2.0 object (
{ "jsonrpc":"2.0", "method":"…", "params":[…], "id":1 }). - Batch: an array of up to 100 JSON-RPC 2.0 objects. If any item references an unsupported method, the entire batch is rejected with 400 and the offending methods are listed.
Supported methods
Methods are classified into three pricing tiers:
- Standard (1×):
eth_call,eth_getBalance,eth_blockNumber,eth_sendRawTransaction,eth_getLogs,net_version,web3_clientVersion, ERC-4337 bundler methods (eth_sendUserOperation, etc.), and chain-family extensions (zks_*,linea_*,bor_*,starknet_*). - Advanced (2×):
trace_*,debug_*,txpool_inspect,txpool_status,arbtrace_*. - Large (4×):
trace_replayBlockTransactions,trace_replayTransaction,txpool_content,arbtrace_replay*.
Stateful filter methods (eth_newFilter, eth_getFilterChanges, eth_uninstallFilter, etc.) are not supported — they break on a load-balanced HTTP proxy because filter state is pinned to a single upstream backend. Use eth_getLogs instead.
WebSocket-only methods (eth_subscribe, eth_unsubscribe) return 400 because this proxy is HTTP-only.
Pricing
Credits consumed per call = baseCredits[chain] × methodTier. baseCredits is 20 for most EVM chains (Ethereum, Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast) and Starknet; 30 for zkSync Era. The USD price per credit is ~7e-7 — a single standard EVM call costs ≈ 0.000056.
Per-request errors at the JSON-RPC layer (HTTP 200 with an error field in a response item) are billed at 5 credits instead of the full method tier — a small concession for methods not supported on a given chain or bad-parameter responses.
Rate limits
Two caps apply per caller:
- Requests per minute: 100 on the paid tier, 1000 on the staff tier.
- Credits per rolling 24 hours: 10,000,000 on the paid tier, 100,000,000 on the staff tier.
When either cap is exceeded, the request returns 429 with a
customMessageidentifying which cap tripped. The per-minute cap also sets theX-RateLimit-*response headers.
Idempotency
Set the Idempotency-Key request header to any string matching [A-Za-z0-9_-]{1,255} to enable safe retries. The response is cached for 24 hours keyed on (user, idempotency-key); replaying the same key with the same body returns the cached response with Idempotent-Replayed: true. Reusing the same key with a different body returns 400 to prevent silent corruption.
Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions.
Autenticación
Este endpoint admite dos métodos de autenticación:- API Key: autenticación estándar con token Bearer mediante la cabecera
Authorization: Bearer <key>. - Monedero x402: pago por uso con créditos USDC desde un monedero en Base o Solana. No se requiere cuenta de Venice. Consulta la guía x402 para la configuración.
Redes admitidas
ConsultaGET /crypto/rpc/networks para ver la lista autoritativa en vivo. Cobertura actual:
| Familia | Mainnet | Testnets |
|---|---|---|
| Ethereum | ethereum-mainnet | ethereum-sepolia, ethereum-holesky |
| Polygon | polygon-mainnet | polygon-amoy |
| Arbitrum | arbitrum-mainnet | arbitrum-sepolia |
| Optimism | optimism-mainnet | optimism-sepolia |
| Base | base-mainnet | base-sepolia |
| Linea | linea-mainnet | linea-sepolia |
| Avalanche C-Chain | avalanche-mainnet | avalanche-fuji |
| BNB Smart Chain | bsc-mainnet | bsc-testnet |
| Blast | blast-mainnet | blast-sepolia |
| zkSync Era | zksync-mainnet | zksync-sepolia |
| Starknet | starknet-mainnet | starknet-sepolia |
Formas de la solicitud
Solicitud individual
Solicitud por lote
Un array de hasta 100 objetos JSON-RPC 2.0. Cada elemento se valida de forma independiente; si algún método no es compatible, todo el lote se rechaza con400 y todos los nombres de método infractores se listan en el mensaje de error.
Métodos compatibles y niveles de precios
Los métodos se clasifican en tres niveles de créditos. Los créditos consumidos por llamada =baseCredits[chain] × methodTier.
| Nivel | Multiplicador | Métodos de ejemplo |
|---|---|---|
| Standard | 1× | eth_call, eth_getBalance, eth_blockNumber, eth_sendRawTransaction, eth_getLogs, eth_getTransactionReceipt, eth_estimateGas, net_version, web3_clientVersion, métodos de bundler ERC-4337 (eth_sendUserOperation, eth_estimateUserOperationGas, etc.), extensiones específicas de cada familia (zks_*, linea_*, bor_*, starknet_*) |
| Advanced | 2× | trace_block, trace_call, trace_transaction, debug_traceCall, debug_traceTransaction, debug_traceBlockByHash, txpool_inspect, txpool_status, arbtrace_* |
| Large | 4× | trace_replayBlockTransactions, trace_replayTransaction, txpool_content, arbtrace_replayTransaction, arbtrace_replayBlockTransactions |
Créditos base por cadena
| baseCredits | Cadenas |
|---|---|
| 20 | Ethereum + todas las L2 EVM anteriores (Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast) y Starknet |
| 30 | zkSync Era |
Ejemplos de coste
Al precio de Venice de~$6.25 × 10⁻⁷ por crédito:
| Llamada | Créditos | Coste en USD |
|---|---|---|
eth_call en Ethereum (20 × 1×) | 20 | $0.0000125 |
trace_transaction en Ethereum (20 × 2×) | 40 | $0.0000250 |
trace_replayTransaction en Ethereum (20 × 4×) | 80 | $0.0000500 |
eth_call en zkSync (30 × 1×) | 30 | $0.0000188 |
No compatible
- Métodos solo por WebSocket (
eth_subscribe,eth_unsubscribe): este proxy es solo HTTP. Usa polling en su lugar, o cambia a un proveedor de WebSocket directo. - Métodos de filtro con estado (
eth_newFilter,eth_getFilterChanges,eth_getFilterLogs,eth_uninstallFilter,eth_newBlockFilter,eth_newPendingTransactionFilter): el estado del filtro está vinculado a un único backend upstream y falla silenciosamente en un proxy HTTP con balanceo de carga. Usaeth_getLogs(sin estado) en su lugar. - Métodos de minero / con claves (
eth_sign,eth_accounts,eth_mining,eth_hashrate,eth_getWork,eth_submitWork): los endpoints de proveedores alojados no guardan claves privadas de usuarios, por lo que estos siempre dan error. Firma las transacciones en el cliente y envíalas medianteeth_sendRawTransaction. - Métodos no mapeados: cualquier cosa no permitida explícitamente devuelve
400. Contacta con soporte para solicitar adiciones.
Facturación por elemento en lote
Aunque la respuesta HTTP sea200, los elementos individuales del lote pueden devolver un campo error JSON-RPC (por ejemplo, un error de parámetros incorrectos o un método no admitido en la cadena de destino). Venice factura estos elementos a 5 créditos cada uno en lugar del nivel completo del método: una pequeña concesión para los errores normales de “explorar la API”.
= 25.
Límites de velocidad
Tope de solicitudes por minuto por llamador autenticado:| Nivel | Solicitudes/minuto |
|---|---|
| Standard | 100 |
| Staff | 1.000 |
429 con un customMessage y las cabeceras de respuesta estándar X-RateLimit-*.
Idempotencia
Establece la cabecera de solicitudIdempotency-Key a cualquier cadena que coincida con [A-Za-z0-9_-]{1,255} para habilitar reintentos seguros. La respuesta se almacena en caché durante 24 horas con clave (user, idempotency-key):
- Reproducir la misma clave con el mismo cuerpo devuelve la respuesta en caché y una cabecera de respuesta
Idempotent-Replayed: true. El upstream no se toca y no se cobran créditos nuevos. - Reproducir la misma clave con un cuerpo diferente devuelve
400para evitar corrupción silenciosa de estado. Elige una clave nueva para solicitudes distintas.
Cabeceras de respuesta
| Cabecera | Descripción |
|---|---|
X-Venice-RPC-Credits | Créditos cobrados por esta solicitud. En solicitudes por lote, es la suma de todos los elementos. |
X-Venice-RPC-Cost-USD | Coste en dólares con 8 decimales. Igual a X-Venice-RPC-Credits × precio por crédito. |
X-Request-ID | ID de correlación de 32 caracteres. Inclúyelo en cualquier comunicación con soporte. |
Idempotent-Replayed | Presente con el valor "true" cuando la respuesta provino de la caché de idempotencia. |
X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-Reset | Solo se establecen en respuestas 429. |
Registro forense para retransmisión de transacciones
Cada llamada aeth_sendRawTransaction se registra en el servidor con el hash de la transacción (keccak256 de los bytes en bruto), el slug de la red, el ID de la solicitud y el ID del usuario que llama. No conservamos la carga útil firmada en sí: el hash se puede recuperar del recibo en cadena. Este registro de auditoría existe para que, si la API key de un cliente se ve comprometida y se usa para retransmitir transacciones ilícitas a través de nuestra infraestructura, podamos correlacionar la actividad en cadena con la cuenta responsable.
Ejemplo
X-Venice-RPC-Credits: 20, X-Venice-RPC-Cost-USD: 0.00001250, X-Request-ID: <nanoid>.
Colección de Postman
Una colección de Postman lista para importar con 27 solicitudes de ejemplo (descubrimiento, llamadas standard/advanced/large, multi-cadena, lotes, idempotencia, casos de error) está disponible en nuestro workspace público: Venice Crypto RPC — Colección de Postman Establece la variable de colecciónapiKey con tu API key de Venice y empieza a enviar solicitudes inmediatamente.Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Encabezados
Optional idempotency key for safe retries. Pattern: [A-Za-z0-9_-]{1,255}. Retrying within 24 hours with the same key + same body replays the cached response with Idempotent-Replayed: true. Same key + different body returns 400.
^[A-Za-z0-9_-]{1,255}$"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Parámetros de ruta
Venice-side network slug. Call GET /api/v1/crypto/rpc/networks for the current list.
"ethereum-mainnet"
Cuerpo
- object
- object[]
JSON-RPC method name. See the "Supported methods" section of the endpoint description for the classification into 1×/2×/4× pricing tiers.
"eth_chainId"
2.0 "2.0"
Method parameters. Shape depends on the method; see the upstream chain documentation.
[]Caller-supplied request ID echoed back in the response. Required for batch request correlation.
1
Respuesta
JSON-RPC response forwarded from the upstream node. Content-Type is forced to application/json regardless of upstream headers.