Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.binibit.com/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

HTTP:       https://rpc.binibit.com
WebSocket:  wss://rpc.binibit.com   (when published)

Standard JSON-RPC

BiniChain implements the standard Ethereum JSON-RPC API. Common methods:
MethodPurpose
eth_chainIdGet the chain ID
eth_blockNumberLatest block number
eth_getBalanceGet account balance
eth_getTransactionCountGet account nonce
eth_gasPriceSuggested gas price
eth_estimateGasEstimate gas for a transaction
eth_sendRawTransactionSubmit signed transaction
eth_getTransactionByHashLookup transaction
eth_getTransactionReceiptLookup receipt
eth_getLogsQuery event logs
eth_callRead contract state
net_versionNetwork ID (mirror of chainId)
Plus standard web3_clientVersion and others.

Curl examples

Get latest block:
curl https://rpc.binibit.com \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Get balance:
curl https://rpc.binibit.com \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xYourAddress","latest"]}'

ethers.js example

import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("https://rpc.binibit.com");

// Read state
const balance = await provider.getBalance("0xYourAddress");
const block = await provider.getBlock("latest");

// Subscribe (HTTP doesn't support subscriptions; use WebSocket below)

// Send transaction (requires signer)
const wallet = new ethers.Wallet(privateKey, provider);
const tx = await wallet.sendTransaction({
  to: "0xRecipient",
  value: ethers.parseEther("0.01"),
});
await tx.wait();

WebSocket subscriptions

For real-time data:
import { ethers } from "ethers";

const provider = new ethers.WebSocketProvider("wss://rpc.binibit.com");

// Subscribe to new blocks
provider.on("block", (blockNumber) => {
  console.log("New block:", blockNumber);
});

// Subscribe to events on a contract
const contract = new ethers.Contract(addr, abi, provider);
contract.on("Transfer", (from, to, amount) => {
  console.log(`${from} sent ${amount} to ${to}`);
});

Rate limits

Standard rate limits apply per IP:
TierLimit
Public RPC60 req/min, 10 req/sec burst
WebSocket100 concurrent subscriptions per IP
Higher limits available for whitelisted integrations — contact api@binibit.com.

Error responses

Standard JSON-RPC errors:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32603,
    "message": "Internal error",
    "data": "..."
  }
}
Common codes:
CodeMeaning
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error
-32000Server error (rate limited, etc.)
Rate-limited responses also return HTTP 429 with Retry-After header.

Public archive node

For historical queries beyond the standard pruning window:
  • Production RPC (rpc.binibit.com) keeps recent state and a moving window of historical
  • For deep historical, use a third-party archive node provider (when available)
For now, primary use case is real-time and recent-history. Deep archive is a v2.x roadmap item.

Tooling

ToolNotes
MetaMaskAdd chain via Network Parameters
ethers.jsStandard provider works
viemStandard createPublicClient works
HardhatConfigure as a network in hardhat.config.js
FoundryConfigure as RPC endpoint in foundry.toml
1inch / ParaSwapWhen integrated, will route through BaiDEX

Network parameters

chainId and config

Block explorer

Visual block / tx browser

BaiDEX Trading guide

Use RPC for swap calls

Architecture

What’s running behind the RPC