Overview
All HTTP RPC endpoints acceptPOST requests with Content-Type: application/json and follow the JSON-RPC 2.0 specification.
Base Endpoint
Routes requests using the default strategy (configurable, defaults toload_balanced).
Parameters
:chain- Chain identifier (name or numeric ID)- Chain name:
ethereum,base,arbitrum - Chain ID:
1,8453,42161
- Chain name:
Example
Strategy Endpoints
Explicitly specify the routing strategy for provider selection.Fastest
Load Balanced
Latency Weighted
Provider Override Endpoints
Route directly to a specific provider, bypassing strategy selection.Parameters
:provider_id- Provider identifier (e.g.,alchemy,infura,quicknode):chain- Chain identifier
Example
Profile-Scoped Endpoints
All routes above are available under a profile namespace for multi-tenancy.Parameters
:profile- Profile slug (e.g.,default,testnet,production)
Example
Without an explicit profile in the URL, requests automatically use the
"default" profile. Ensure config/profiles/default.yml exists at startup.Supported Methods
Lasso supports read-only Ethereum JSON-RPC methods:Block Methods
eth_blockNumber- Latest block numbereth_getBlockByNumber- Block data by numbereth_getBlockByHash- Block data by hash
Account Methods
eth_getBalance- Account balanceeth_getTransactionCount- Account nonceeth_getCode- Contract bytecode
Transaction Methods
eth_getTransactionByHash- Transaction detailseth_getTransactionReceipt- Transaction receipt
Call Methods
eth_call- Read-only contract calleth_estimateGas- Gas estimation
State Methods
eth_getLogs- Historical log querieseth_getStorageAt- Storage slot value
Gas & Fee Methods
eth_gasPrice- Current gas priceeth_maxPriorityFeePerGas- EIP-1559 priority feeeth_feeHistory- Historical fee data
Metadata Methods
eth_chainId- Chain ID (served locally, no upstream call)
Unsupported Methods
Subscription Methods
Subscription methods (eth_subscribe, eth_unsubscribe) are rejected over HTTP with a WebSocket URL hint:
Write Methods
Write methods (eth_sendRawTransaction, eth_sendTransaction) are not currently supported.
Request Headers
Required Headers
Optional Headers
Provider Override Header
You can specify a provider via header instead of URL path:Query Parameters
Strategy Query Parameter
Response Format
Success Response
Error Response
Error Codes
| Code | Meaning | |------|---------|| |-32700 | Parse error (malformed JSON) |
| -32600 | Invalid Request (missing fields, batch too large) |
| -32601 | Method not found or not supported on this transport |
| -32602 | Invalid params (unsupported chain, missing chain_id) |
| -32603 | Internal error |
| -32000 | Server error (rate limit, strategy access denied, quota exceeded) |
Response Headers
Standard Headers
Observability Headers
Withinclude_meta=headers:
CORS
All origins are allowed (*). Allowed headers:
Content-TypeAuthorizationX-Requested-WithX-Lasso-ProviderX-Lasso-TransportX-Lasso-Api-Key