opBNB

API Overview
Architecture
TheRPC API follows JSON-RPC 2.0 specification and provides:
- Standard HTTP and WebSocket endpoints
- Authentication via API keys
- Unified response formats
- Cross-network compatibility
Communication Protocols
HTTP Endpoints
Best for single requests and simple integrations. See examples in our HTTP/Curl guide.
WebSocket Endpoints
Ideal for subscriptions and real-time data. See eth_subscribe for subscription examples.
JSON-RPC Format
Request Structure
All API calls follow the JSON-RPC 2.0 format. See complete examples in our Basic Operations guide:
Required fields:
jsonrpc: Version identifier (always "2.0")method: The RPC method to call (see Available Methods)params: Array of parameters (can be empty)id: Request identifier
Response Format
All responses follow a consistent structure:
Or in case of error:
Authentication
All requests require an API key in the Authorization header. See our Authentication guide for detailed setup:
Method Categories
Standard Methods
- eth_: Ethereum protocol methods (eth_blockNumber, eth_getBalance, etc.)
- net_: Network status methods (net_version)
- web3_: Web3 utility methods (web3_clientVersion)
Advanced Methods
- debug_: Debugging capabilities (debug_traceTransaction)
- trace_: Transaction tracing (trace_transaction)
- txpool_: Transaction pool information (txpool_status)
Error Handling
Common error codes (see FAQ for detailed error handling strategies):
-32700: Parse error-32600: Invalid request-32601: Method not found-32602: Invalid params-32603: Internal error
Implementation Examples
For practical implementation examples, check our language-specific guides:
- JavaScript/TypeScript Guide
- Python Guide
- HTTP/Curl Examples
- View all available SDKs in our Tools & SDKs section
Rate Limits
For information about request limits and quotas, see our Rate Limits documentation.
See Also
- Authentication Guide - Detailed Auth Info
- Available Methods - Complete Method List
- Basic Operations - Common Usage Patterns
- FAQ - Common Questions and Answers