OysBio nodes speak standard Ethereum JSON-RPC. The public endpoints run behind the OysBio RPC gateway, which allows read and send methods and refuses anything that could reach node keys or node administration.
| OysBio Chain | |
|---|---|
| HTTPS | https://rpc.oys.bio |
| WebSocket | wss://rpc.oys.bio/ws |
| With an API key | https://rpc.oys.bio/v1/<key> or header X-API-Key: <key> |
| Chain ID | 69797 (0x110a5) |
curl -s https://rpc.oys.bio -H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Methods#
| Group | Methods |
|---|---|
| Chain and fees | eth_chainId, net_version, eth_blockNumber, eth_syncing, eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory |
| State | eth_getBalance, eth_getCode, eth_getStorageAt, eth_getTransactionCount, eth_getProof, eth_call, eth_estimateGas, eth_createAccessList (any block: the nodes are archive nodes) |
| Blocks and transactions | eth_getBlockByNumber, eth_getBlockByHash, eth_getBlockReceipts, eth_getTransactionByHash, eth_getTransactionReceipt, the ...ByBlock...AndIndex and ...Count... variants |
| Sending | eth_sendRawTransaction |
| Logs and filters | eth_getLogs, eth_newFilter, eth_newBlockFilter, eth_newPendingTransactionFilter, eth_getFilterChanges, eth_getFilterLogs, eth_uninstallFilter |
| Subscriptions (WebSocket) | eth_subscribe (newHeads, logs, newPendingTransactions), eth_unsubscribe |
| Validators (Clique) | clique_getSigners, clique_getSignersAtHash, clique_getSnapshot, clique_getSnapshotAtHash, clique_getSigner (who sealed a block), clique_status |
| Other | web3_clientVersion, web3_sha3, net_listening, net_peerCount, txpool_status |
Refused on public RPC: personal_*, admin_*, miner_*, engine_*, eth_sign*, eth_sendTransaction, eth_signTransaction, debug_*, txpool_content. Tracing (debug_trace*) and pool contents are on the private RPC for partners with an API key.
Block tags#
latest, earliest, pending and safe. safe is the newest final block: a quorum of the validators (n − ⌊(n−1)/3⌋: all 3 of 3 today, 3 of 4 with four) sealed it or built on it, twice, and the node refuses any reorganisation below it. finalized is not used; use safe.
curl -s https://rpc.oys.bio -H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["safe",false]}'
Limits#
| Without a key | With an API key | |
|---|---|---|
| Requests | 50 credits per second per IP, bursts of 200 | per key: standard 200, partner 1,000, internal 5,000 credits per second |
| Cost | 1 credit; eth_call, eth_estimateGas, eth_sendRawTransaction 5; eth_getLogs, eth_getBlockReceipts, eth_getProof 10 |
same |
| Batch | 50 calls | 100 / 500 / 1,000 |
| Request size | 256 KB at the gateway, 512 KB at the proxy | up to 8 MB |
eth_getLogs |
5,000 blocks per call | same |
| Response | 10 MB | same |
| WebSocket | 10 connections per IP, 25 subscriptions each, 256 KB messages, closed after 10 idle minutes | more connections per tier |
eth_call gas cap |
50,000,000 | same |
API keys are issued by the OysBio team to partners who need more.
Errors#
| Code / HTTP | Meaning | What to do |
|---|---|---|
-32601 |
Method not available on this RPC (data says why) |
Use another method, or sign locally and use eth_sendRawTransaction |
-32005, HTTP 429 |
Rate limit exceeded (retry-after header) |
Back off and retry; batch reads; ask for an API key |
-32005 "block range too large" |
eth_getLogs over more than 5,000 blocks |
Page through the range |
-32005 "response too large" |
Answer over 10 MB | Narrow the request |
-32600 "batch too large", HTTP 413 |
Too many calls in one batch, or request too large | Split the batch or the call |
-32001, HTTP 401/403 |
Unknown or revoked API key, or a key without the needed scope | Check the key |
HTTP 403 -32005 "temporarily blocked" |
This IP sent too many rejected requests | Wait 10 minutes; respect the rate limit |
| HTTP 503 | No healthy node behind this endpoint | Retry after a few seconds; with your own node, add it as a fallback (below) |
max priority fee per gas higher than max fee per gas, transaction underpriced |
Fee fields | Let the library estimate fees, or set a tip of at least 1 wei |
Endpoints and a fallback#
Each network has one public endpoint (rpc.oys.bio, testnet-rpc.oys.bio); wallets added from the explorer get it, and the SDK chains carry it (rpcUrls.default.http). If you run your own node, put it first and keep the public endpoint as a fallback:
import { createPublicClient, fallback, http } from 'viem';
import { oysbioTestnet } from '@oysbio/sdk';
const client = createPublicClient({
chain: oysbioTestnet,
transport: fallback([http('http://127.0.0.1:9545'), ...oysbioTestnet.rpcUrls.default.http.map((u) => http(u))]),
});