For the complete documentation index, see llms.txt. This page is also available as Markdown.

Crossbar API Endpoints

This page documents the HTTP and WebSocket endpoints exposed by Crossbar.

Base URL examples:

  • Public: https://crossbar.switchboard.xyz

  • Local: http://localhost:8080

For machine-readable schema and live testing:

  • Swagger UI: GET /docs

  • OpenAPI JSON: GET /api-docs/openapi.json

Core Endpoints

Method
Path
Purpose

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

Parameter units are surface-specific. Raw v2 OracleFeed.maxJobRangePct and raw gateway max_variance values are percentages scaled by 1e9; 1_000_000_000 means 1%. See Feed Parameter Units.

Use /v2/fetch/{feed_id} for v2 feed IDs created by Feed Builder or Crossbar v2 storage. The older /fetch/{hash} route is for v1 feed definitions and legacy compatibility.

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.

Use case
Use these routes
Identifier
Notes

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.

Solana/SVM Route Selection

For new Solana/SVM feed-hash integrations, prefer the SDK managed update path: queue.fetchManagedUpdateIxs(...). It fetches Ed25519 oracle signatures and builds the quote-program verified_update instruction that writes the canonical OracleQuote account.

The classic PullFeed.fetchUpdateIx(...) and Crossbar /updates/solana/... flows target legacy PullFeed accounts and pullFeedSubmitResponseConsensus. Use them only for existing classic PullFeed integrations where the selected queue/gateway environment supports that path.

Simulation Endpoints

Generic

Method
Path
Purpose

POST

/simulate

Simulate jobs from request body

POST

/simulate/jobs

Alias for /simulate

GET

/simulate/{feedHashes}

Simulate comma-separated feed hashes

Chain-specific

Method
Path
Purpose

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

Method
Path
Purpose

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

Method
Path
Purpose

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

Method
Path
Purpose

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

Method
Path
Purpose

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

Method
Path
Purpose

POST

/randomness/evm

Fetch EVM randomness result payload

Stream (Surge) Endpoints

Method
Path
Purpose

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:

Method
Path
Purpose

GET

/v1/surge/stream

Legacy Surge WebSocket endpoint

POST

/v1/surge/session

Legacy Surge session endpoint

Flamegraph Endpoints

Method
Path
Purpose

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

Purpose: simulate raw OracleJob[] directly (without fetching feed definitions from IPFS).

Request body:

Response (200):

Notes:

  • jobs also accepts base64-encoded protobuf entries.

  • variableOverrides is optional.

  • network defaults to mainnet when omitted.

POST /simulate/solana

Purpose: 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:

  • network accepts values such as mainnet-beta, devnet, testnet.

  • mainnet is normalized to mainnet-beta.

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

Purpose: simulate v2 feed hashes with optional network and variable overrides.

Request body:

Response (200):

Updates

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; use evm for EVM)

  • network (string, optional; mainnet or testnet)

  • 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 hash

  • oracleResponses: per-oracle response detail

  • timestamp: signed consensus timestamp

  • slot: slot or sequence metadata from the gateway

  • recentHash: recent hash used for the signed payload

  • encoded: 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}

Purpose: generate Solana pull update instructions and oracle response metadata.

Path:

  • network: mainnet, mainnet-beta, devnet, testnet

  • feedPubkeys: 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 bincode serialization of solana_sdk::instruction::Instruction.

  • Raw HTTP responses return these serialized strings directly.

  • SDK helpers such as CrossbarClient.fetchSolanaUpdates may decode them into native instruction objects before returning to your application.

  • lookupTables are still returned separately for address lookup table usage in versioned transactions.

Rust decode example:

GET /updates/eclipse/{network}/{feedPubkeys}

Response schema is the same as /updates/solana/{network}/{feedPubkeys}:

  • success: bool

  • pullIxns: array of hex-encoded serialized Instruction values

  • responses: array of oracle responses

  • lookupTables: array of address lookup table pubkeys (base58)

GET /updates/evm/{chainId}/{aggregatorIds}

Purpose: fetch EVM-compatible encoded updates and supporting oracle response data.

Path:

  • chainId: EVM chain ID (example 1, 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 normalized result and additional gateway-returned fields).

  • failures: array of errors for feeds/oracles that failed during fetch/update building.

  • encoded: array of 0x-prefixed ABI-encoded update payloads.

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}

Response (200):

Sui response schema:

  • responses: per-aggregator update objects returned by Sui SDK (fetchUpdateInfo output).

  • failures: top-level route errors.

GET /updates/iota/{network}/{aggregatorAddresses}

Response (200) matches the Sui endpoint shape:

Gateways

GET /gateways

Purpose: discover active gateway URLs from cached oracle state.

Query:

  • network: mainnet (default), devnet, or testnet

Response (200):

POST /gateways/fetch_signatures

Purpose: fetch signatures for a single feed/jobs request. Supports both legacy and new request shapes.

maxVariance in these raw gateway request bodies is already scaled by 1e9; 50_000_000 means 0.05%.

Legacy body (feed-hash based):

New body (jobs-based):

Response (200): gateway signature response object (signatures + timestamp + variance).

POST /gateways/fetch_signatures_consensus

Purpose: fetch consensus signatures using feed request objects.

Request body:

Response (200):

Stream (Surge)

GET /stream/surge_feeds

Purpose: 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

Purpose: validate API key and create session token + WebSocket URL.

Auth input:

  • Header x-api-key: <key> preferred

  • Also supports Authorization: Bearer <key>

  • Also supports query param api_key=<key>

Request body:

Response (200):

Error responses:

  • 400 missing API key

  • 401 invalid API key

GET /stream/ws

Purpose: 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:

Surface
Public limit behavior
Source

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