Hermoddocs

Endpoints

Base URL, path layout, HTTP and WebSocket forms.

The gateway has one base URL. Everything else is paths on top of it.

Base URL

https://infra.originstake.com

All HTTP JSON-RPC calls hit this host. WebSocket subscriptions hit the same host with the wss:// scheme.

Path layout

/<chain>/<arch>[/<key>]
  • <chain> is the chain slug, e.g. pharos. See chains for the full list.
  • <arch> is the chain architecture. EVM chains use evm. Non-EVM chains (solana-style, cosmos-style) use their own values once we add them.
  • <key> is optional. Including it authenticates the request via the URL form. Omit it and pass the key in a header instead.

Non-EVM: Tron has its own path

Tron doesn't fit the /<chain>/<arch> layout because it exposes three endpoint surfaces per chain (full node, solidity node, EVM-compat JSON-RPC). Its paths live under /v1/tron/<network>/...:

https://infra.originstake.com/v1/tron/mainnet/wallet/getnowblock
https://infra.originstake.com/v1/tron/mainnet/walletsolidity/getaccount
https://infra.originstake.com/v1/tron/mainnet/jsonrpc

See Tron for the full reference, code samples (TronWeb / ethers.js / cURL), and pricing notes.

Example, EVM Pharos with the key in the path:

https://infra.originstake.com/pharos/evm/originrpc_live_YOUR_KEY

Same chain, key in header:

https://infra.originstake.com/pharos/evm

HTTP requests

POST JSON-RPC payloads to the endpoint. Set Content-Type: application/json.

curl https://infra.originstake.com/pharos/evm \
  -H "X-OriginRPC-Token: originrpc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

Batch requests (an array of JSON-RPC envelopes) are supported and recommended when you have many independent reads to issue at once.

curl https://infra.originstake.com/pharos/evm \
  -H "X-OriginRPC-Token: originrpc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]},
    {"jsonrpc":"2.0","id":2,"method":"eth_gasPrice","params":[]}
  ]'

Each item in the batch counts as one billable request.

WebSocket

For subscriptions (new heads, logs, pending txs) use the same path on wss://:

wss://infra.originstake.com/<chain>/<arch>[/<key>]

Example with viem:

import { createPublicClient, webSocket } from "viem";
 
const client = createPublicClient({
  transport: webSocket(
    "wss://infra.originstake.com/pharos/evm/originrpc_live_YOUR_KEY",
  ),
});
 
const unwatch = client.watchBlockNumber({
  onBlockNumber: (n) => console.log("new block", n),
});

WebSocket is available on chains where at least one upstream advertises WebSocket support. See the ws flag in the chains table.

WebSocket connections count active subscriptions against your plan's subscription cap. Idle connections with no subscriptions are cheap; heavy fan-out subscriptions are not. If you need many subscribers, prefer running one connection in your backend and fanning out yourself.

Timeouts

Method categoryTimeout
eth_*Filter (newFilter, getFilterChanges, etc.)60 s
Heavy reads: eth_getLogs, trace_*, debug_*30 s
Everything else15 s

Requests that exceed these will be answered with 504 Gateway Timeout. For long-range eth_getLogs, narrow the block range or split into chunks; the proxy will not stream partial results.

Compression

The gateway accepts and emits gzip. Set Accept-Encoding: gzip on requests with large responses (think eth_getLogs over wide windows) to cut bandwidth significantly.

What you do not need to handle

  • Failover between upstreams: handled internally. If a primary upstream is unhealthy, traffic moves to a fallback automatically.
  • Retries for transient upstream errors: the gateway retries internally before surfacing a 5xx. Your client should still retry once on its own, in case the failure was at our edge.
  • Hot-path caching for read-heavy methods (e.g. eth_chainId, eth_blockNumber, recent eth_getBlockByNumber): handled internally with short TTLs. You can still cache on your side; we just save you the round trip when you don't.

On this page