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
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 /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 object schema:
keys: account metas for the instruction.keys[].pubkey: 32-byte pubkey encoded as lowercase hex (64 chars, no0x).keys[].isSigner: signer flag for that account.keys[].isWritable: writable flag for that account.programId: 32-byte program ID encoded as lowercase hex (64 chars, no0x).data: instruction data bytes encoded as lowercase hex.
Required accounts behavior (important):
There is no separate
requiredAccountsfield for this endpoint.The canonical account list is
pullIxns[i].keys.Account order is significant and must be preserved exactly.
isSignerandisWritableflags are part of the instruction contract and must be preserved exactly.Do not reorder, sort, dedupe, or recompute account metas when reconstructing the instruction.
lookupTablesare provided separately for address lookup table usage in versioned transactions; they do not replacekeys.
Non-JS deserialization flow:
Decode hex fields to bytes.
Convert
programIdand eachkeys[].pubkeyfrom 32-byte arrays into native pubkey types.Build account metas from
isSigner+isWritablein the same order as returned.Use decoded
databytes as instruction payload.
Example (Rust):
GET /updates/eclipse/{network}/{feedPubkeys}
GET /updates/eclipse/{network}/{feedPubkeys}Response schema is the same as /updates/solana/{network}/{feedPubkeys}:
success:boolpullIxns: array of instruction objects (keys,programId,data)responses: 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:
Discover gateways:
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