Crossbar API Endpoints
This page documents the HTTP and WebSocket endpoints exposed by Crossbar.
Base URL examples:
Public:
https://crossbar.switchboard.xyzLocal:
http://localhost:8080
For machine-readable schema and live testing:
Swagger UI:
GET /docsOpenAPI JSON:
GET /api-docs/openapi.json
Core Endpoints
GET
/health
Health check
GET
/version
Service version info
GET
/test
Basic test endpoint
GET
/protos/job_schemas.proto
Oracle job protobuf schema
POST
/store
Store v1 feed definition
GET
/fetch/{hash}
Fetch v1 feed definition
POST
/v2/store
Store v2 feed definition
GET
/v2/fetch/{feed_id}
Fetch v2 feed definition
GET
/v2/update/{feedHashes}
Build v2 multi-feed update payload
ANY
/rpc/{network}
RPC passthrough/proxy endpoint
GET
/debug/cid/{hash}
CID conversion/debug
GET
/debug/bnb
Binance debug endpoint
EVM Route Selection
Use different Crossbar routes depending on whether you are integrating a current Feed Builder/custom feed or an older aggregator-based EVM integration.
Feed Builder/custom feed on EVM
/v2/fetch/{feed_id}, /v2/simulate/{feedHashes}, /v2/update/{feedHashes}
deterministic bytes32 feed ID / feed hash
Recommended flow for Monad and current custom-feed integrations. Use chain=evm, `network=mainnet
Legacy aggregator-based EVM integration
/simulate/evm/{network}/{aggregator_ids}, /updates/evm/{chainId}/{aggregatorIds}
legacy aggregator ID
Compatibility flow for older EVM integrations. Do not use this as the primary path for Feed Builder custom feeds.
Simulation Endpoints
Generic
POST
/simulate
Simulate jobs from request body
POST
/simulate/jobs
Alias for /simulate
GET
/simulate/{feedHashes}
Simulate comma-separated feed hashes
Chain-specific
POST
/simulate/solana
Simulate Solana feeds
GET
/simulate/solana/{network}/{feedpubkeys}
Simulate Solana feed pubkeys
POST
/simulate/eclipse
Simulate Eclipse feeds
GET
/simulate/eclipse/{network}/{feedpubkeys}
Simulate Eclipse feed pubkeys
POST
/simulate/evm
Simulate EVM aggregators
GET
/simulate/evm/{network}/{aggregator_ids}
Simulate EVM aggregator IDs
POST
/simulate/aptos
Simulate Aptos feeds
GET
/simulate/aptos/{network}/{feedhashes}
Simulate Aptos feed hashes
POST
/simulate/sui
Simulate Sui feeds
POST
/simulate/sui/feeds
Alias for Sui simulation
GET
/simulate/sui/{network}/{feedids}
Simulate Sui feed IDs
POST
/simulate/iota
Simulate Iota feeds
GET
/simulate/iota/{network}/{feedids}
Simulate Iota feed IDs
V2 simulation
POST
/v2/simulate
Simulate v2 feed input payload
GET
/v2/simulate/{feedHashes}
Simulate v2 feed hashes
POST
/v2/simulate/proto
Simulate base64-encoded OracleFeed proto
Backward-compatible API prefix
Crossbar also exposes simulation routes under /api/simulate for compatibility.
Example: POST /api/simulate, GET /api/simulate/{feedHashes}.
Update Endpoints
GET
/updates/solana/{network}/{feedPubkeys}
Solana update instructions and oracle responses
GET
/updates/eclipse/{network}/{feedPubkeys}
Eclipse update instructions and oracle responses
GET
/updates/evm/{chainId}/{aggregatorIds}
EVM encoded updates
GET
/updates/evm/fetch_update_data/{chain_id}/{feed_ids}
EVM update-data variant
GET
/updates/aptos/{network}/{aggregatorAddresses}
Aptos aggregator updates
GET
/updates/sui/{network}/{aggregatorAddresses}
Sui aggregator updates
GET
/updates/iota/{network}/{aggregatorAddresses}
Iota aggregator updates
Gateway Endpoints
GET
`/gateways?network=mainnet
devnet
POST
/gateways/fetch_signatures
Fetch signatures (single feed/job request)
POST
/gateways/fetch_signatures_consensus
Fetch consensus signatures
Oracle and Guardian Endpoints
GET
/oracles
List Solana oracles
GET
/oracles/sui
List Sui oracles
GET
/oracles/aptos
List Aptos oracles
POST
/oracles/fetch_signatures
Fetch oracle signatures
GET
/guardians
List guardians
Randomness Endpoints
POST
/randomness/evm
Fetch EVM randomness result payload
Stream (Surge) Endpoints
GET
/stream/ws
WebSocket stream endpoint
GET
/stream/surge_feeds
List available Surge feeds
POST
/stream/request_session
Create Surge stream session token
GET
/stream/socket_metrics
Stream/socket metrics
GET
/stream/debug_binance
Binance stream debug info
Legacy Surge endpoints are also exposed when Surge is enabled:
GET
/v1/surge/stream
Legacy Surge WebSocket endpoint
POST
/v1/surge/session
Legacy Surge session endpoint
Flamegraph Endpoints
GET
/flamegraph
Flamegraph status/info
POST
/flamegraph/start
Start profiling
POST
/flamegraph/stop
Stop profiling
GET
/flamegraph/ui
Flamegraph UI
Detailed Request/Response Reference
Use this section for implementation-level request and response shapes. The tables above remain the quick index.
Simulation
POST /simulate/jobs
POST /simulate/jobsPurpose: simulate raw OracleJob[] directly (without fetching feed definitions from IPFS).
Request body:
Response (200):
Notes:
jobsalso accepts base64-encoded protobuf entries.variableOverridesis optional.networkdefaults tomainnetwhen omitted.
POST /simulate/solana
POST /simulate/solanaPurpose: simulate one or more Solana feed pubkeys by loading on-chain feed state, resolving feed hash, loading jobs from IPFS, and running jobs.
Request body:
Response (200): array of per-feed simulation results.
Notes:
networkaccepts values such asmainnet-beta,devnet,testnet.mainnetis normalized tomainnet-beta.
GET /simulate/{feedHashes}
GET /simulate/{feedHashes}Purpose: simulate one or more feed hashes directly from IPFS definitions.
Path:
feedHashes: comma-separated feed hashes
Query:
includeReceipts(bool, optional)
Response (200): array
POST /v2/simulate
POST /v2/simulatePurpose: simulate v2 feed hashes with optional network and variable overrides.
Request body:
Response (200):
Updates
GET /v2/update/{feedHashes}
GET /v2/update/{feedHashes}Purpose: build a chain-specific consensus payload for one or more v2 feed hashes.
Path:
feedHashes: comma-separated deterministic feed IDs / feed hashes
Query:
chain(string, required for chain-specific payloads; useevmfor EVM)network(string, optional;mainnetortestnet)use_timestamp(bool, optional)num_oracles(u32, optional)gateway(string, optional)
Response (200): object
V2 update response schema:
medianResponses: one consensus value per requested feed hashoracleResponses: per-oracle response detailtimestamp: signed consensus timestampslot: slot or sequence metadata from the gatewayrecentHash: recent hash used for the signed payloadencoded: chain-specific encoded update payload
For EVM, wrap encoded into a one-element bytes[] when calling getFee or updateFeeds.
Monad example:
GET /updates/solana/{network}/{feedPubkeys}
GET /updates/solana/{network}/{feedPubkeys}Purpose: generate Solana pull update instructions and oracle response metadata.
Path:
network:mainnet,mainnet-beta,devnet,testnetfeedPubkeys: comma-separated feed pubkeys
Query:
numSignatures(u32, optional)payer(string, required)
Response (200): array of update objects
pullIxns wire format:
Each array entry is a hex-encoded
bincodeserialization ofsolana_sdk::instruction::Instruction.Raw HTTP responses return these serialized strings directly.
SDK helpers such as
CrossbarClient.fetchSolanaUpdatesmay decode them into native instruction objects before returning to your application.lookupTablesare still returned separately for address lookup table usage in versioned transactions.
Rust decode example:
GET /updates/eclipse/{network}/{feedPubkeys}
GET /updates/eclipse/{network}/{feedPubkeys}Response schema is the same as /updates/solana/{network}/{feedPubkeys}:
success:boolpullIxns: array of hex-encoded serializedInstructionvaluesresponses: array of oracle responseslookupTables: array of address lookup table pubkeys (base58)
GET /updates/evm/{chainId}/{aggregatorIds}
GET /updates/evm/{chainId}/{aggregatorIds}Purpose: fetch EVM-compatible encoded updates and supporting oracle response data.
Path:
chainId: EVM chain ID (example1,42161,1116)aggregatorIds: comma-separated feed IDs
Query:
numSignatures(u32, optional)gateway(string, optional)
Response (200): object
EVM response schema:
results: array of oracle response objects (includes normalizedresultand additional gateway-returned fields).failures: array of errors for feeds/oracles that failed during fetch/update building.encoded: array of0x-prefixed ABI-encoded update payloads.
GET /updates/aptos/{network}/{aggregatorAddresses}
GET /updates/aptos/{network}/{aggregatorAddresses}Response (200):
Aptos response schema:
responses: per-aggregator update objects returned by Aptos SDK.failures: top-level route errors.encoded: flattened list of encoded Aptos update payloads.
GET /updates/sui/{network}/{aggregatorAddresses}
GET /updates/sui/{network}/{aggregatorAddresses}Response (200):
Sui response schema:
responses: per-aggregator update objects returned by Sui SDK (fetchUpdateInfooutput).failures: top-level route errors.
GET /updates/iota/{network}/{aggregatorAddresses}
GET /updates/iota/{network}/{aggregatorAddresses}Response (200) matches the Sui endpoint shape:
Gateways
GET /gateways
GET /gatewaysPurpose: discover active gateway URLs from cached oracle state.
Query:
network:mainnet(default),devnet, ortestnet
Response (200):
POST /gateways/fetch_signatures
POST /gateways/fetch_signaturesPurpose: fetch signatures for a single feed/jobs request. Supports both legacy and new request shapes.
Legacy body (feed-hash based):
New body (jobs-based):
Response (200): gateway signature response object (signatures + timestamp + variance).
POST /gateways/fetch_signatures_consensus
POST /gateways/fetch_signatures_consensusPurpose: fetch consensus signatures using feed request objects.
Request body:
Response (200):
Stream (Surge)
GET /stream/surge_feeds
GET /stream/surge_feedsPurpose: list currently available Surge feed symbols.
Query:
symbol(optional)exchange(optional)
Response (200): feed list object from Surge core. Response (503): no feeds available.
POST /stream/request_session
POST /stream/request_sessionPurpose: validate API key and create session token + WebSocket URL.
Auth input:
Header
x-api-key: <key>preferredAlso supports
Authorization: Bearer <key>Also supports query param
api_key=<key>
Request body:
Response (200):
Error responses:
400missing API key401invalid API key
GET /stream/ws
GET /stream/wsPurpose: WebSocket stream endpoint for Surge updates. For full handshake, auth headers, subscribe payload, and ping/pong flow, see Surge Gateway Protocol.
Minimal curl examples
Simulate Solana feed:
Fetch EVM updates:
Fetch a Monad custom-feed payload with the v2 route:
Discover gateways:
Public Rate Limits
For https://crossbar.switchboard.xyz, rate limiting is layered and route-dependent:
Network-level Switchboard oracle requests
Default 20 requests/second per user wallet; can be increased with stake
Crossbar public REST (/updates/*, gateway/signature routes)
Additional IP-based edge throttling; 429 Too Many Requests can appear under burst traffic
Public endpoint behavior, observed on March 3, 2026
Surge WebSocket access
Plan-based max connections (Plug: 1, Pro: 10, Enterprise: 15)
Operational guidance:
Keep update polling conservative on public Crossbar and avoid burst fan-out.
On
429, apply exponential backoff with jitter and retry.For steady high-throughput workloads, self-host Crossbar.
Notes
Some stream and gateway flows require signature/auth headers. See Surge Gateway Protocol.
Endpoint behavior can vary by network and environment configuration.
Public Crossbar is rate limited by IP. Production systems should self-host.
For complete machine schema and current field contracts, use
GET /api-docs/openapi.json.
Last updated