Connection URLs
All WebSocket endpoints follow the patternws://host/ws/rpc/... (or wss:// for secure connections).
Base Endpoint
load_balanced).
Example:
Strategy-Specific Endpoints
Provider Override
Profile-Scoped Endpoints
All routes above are available under a profile namespace:"default" profile.
Example:
Chain Identifier
The:chain parameter accepts either:
- Chain name (string):
ethereum,base,arbitrum - Chain ID (numeric):
1,8453,42161
Authentication
All WebSocket endpoints require an API key. Provide it via: | Method | Example | |--------|---------|| | Query parameter |?key=lasso_abc123 |
| Header (at connection) | X-Lasso-Api-Key: lasso_abc123 |
| Bearer token | Authorization: Bearer lasso_abc123 |
Connection Example:
Protocol
Lasso uses raw JSON-RPC 2.0 over WebSocket (not Phoenix Channels).Unary Request/Response
Client sends:Subscription Flow
See Subscriptions for detailed subscription patterns.Supported Methods
Read-Only Methods
All standard Ethereum read-only methods are supported:eth_blockNumbereth_getBlockByNumbereth_getBlockByHasheth_getLogseth_getBalanceeth_getTransactionCounteth_getCodeeth_calleth_estimateGaseth_gasPriceeth_maxPriorityFeePerGaseth_feeHistoryeth_chainId(served locally, no upstream call)eth_getTransactionByHasheth_getTransactionReceipteth_getStorageAt
Subscription Methods
eth_subscribe- Create subscription (newHeads, logs)eth_unsubscribe- Cancel subscription
Error Responses
Errors follow JSON-RPC 2.0 format:Common Error Codes
| Code | Meaning | |------|---------|| |-32700 | Parse error (malformed JSON) |
| -32600 | Invalid Request (missing required fields) |
| -32601 | Method not found or not supported |
| -32602 | Invalid params (unsupported chain, missing parameters) |
| -32603 | Internal error |
| -32000 | Server error (rate limit, strategy access denied, quota exceeded) |
Observability Metadata
Request routing metadata by adding"lasso_meta": "notify" to your request:
- The RPC response (unmodified)
- A metadata notification: