Esc

    Integrate

    Web proxy API

    The JSON WebSocket and the GET routes that oracle-proxy serves to browsers.

    oracle-proxy is one listed client of the nodes. It runs the Rust SDK with its signature checks and its quorum, and it serves the result as JSON over one plain WebSocket. A browser cannot keep a client API key secret, so it uses the proxy. A reverse proxy in front of it terminates TLS.

    Important

    The node signatures stop at the proxy, so the proxy operator can change prices. The browser trusts the operator, through TLS. A consumer that must not trust an operator uses the Rust SDK directly. See Trust when you use the web proxy.

    Endpoints

    Path Method Purpose
    /v1/ws GET, WebSocket upgrade The data socket. Open to anyone, within the limits.
    /v1/catalog GET The prices, venue feeds and books that the proxy serves now.
    /v1/nodes GET The latest node reports: the nodes message.
    /v1/registry GET The registry document as governance signed it, for a client that verifies the nodes itself.
    /v1/history GET One feed's past prices from the archive, for a chart.
    /v1/carry GET The newest top of book of each market, and the funding of each perpetual.
    /v1/carry/hourly GET Each perpetual's hourly funding over 7 days, and a year of settled funding.
    /v1/carry/settled GET A year of settled funding, day by day, for 1 to 4 perpetuals.
    /v1/carry/gap GET The mean bid, ask and mid of 1 to 4 markets by hour and by day.
    /v1/arbitrage GET The best cycles of trades between the spot markets, after taker fees.
    /v1/arbitrage/usdc GET Every route through USDC, with the conversion on the venue of the USDT book.
    /v1/arbitrage/history GET What the arbitrage board found over the last day or week, from the archive.
    /v1/canister GET The registry canister's prices next to the XRC, CoinGecko and CoinMarketCap.
    /v1/canister/history GET One coin of /v1/canister over the last hour.
    /v1/nodes/history GET Each node's session and feeds over the last day, week or month.
    /health GET The state of the SDK client inside the proxy.

    A browser connects to wss://<operator host>/v1/ws. The proxy itself speaks plain ws, by default on 127.0.0.1:8792. The reverse proxy adds TLS.

    The GET routes send Access-Control-Allow-Origin: *, so a page on any origin can read them. The socket does not check Origin. Each refusal of a GET route is an error body.

    /v1/catalog

    json
    {
      "prices": ["CRYPTO.BTC/USD", "CRYPTO.BTC/USDT", "CRYPTO.ETH/USD"],
      "venues": ["CRYPTO.BTC/USDT"],
      "books": ["binance:spot:BTCUSDT", "bybit:spot:BTCUSDT", "okx:spot:BTC-USDT"],
      "funding": ["bybit:linear_perp:BTCUSDT", "okx:linear_perp:BTC-USDT-SWAP"],
      "nodes": true,
      "frames": ["CRYPTO.BTC/USD", "CRYPTO.BTC/USDT", "CRYPTO.ETH/USD"]
    }
    Field Contents
    prices Feed symbols whose prices the proxy serves, sorted.
    venues Feed symbols whose venue reports the proxy serves, sorted.
    books Book names, venue:market:symbol, sorted.
    funding Perpetual names, venue:market:symbol, sorted.
    nodes true: the proxy serves the node reports.
    frames Feed symbols whose signed node frames the proxy forwards, sorted. It is the prices list, or empty on a proxy that runs its archive in the same process.

    The operator configures prices and venues. The books and funding lists grow as frames arrive from the nodes, so a book that has not arrived yet is not in the list. The venue symbol is the venue's own, so it differs between venues. The funding of a node that leaves the registry goes from the list.

    /health

    json
    {
      "status": "ok",
      "registry_version": 7,
      "quorum": 3,
      "nodes": 3,
      "connected": 3,
      "last_frame_ns": "1791299498663252000",
      "clients": 12,
      "accepted": 10452,
      "venue_reports": 881,
      "book_updates": 20311,
      "rejected": 0
    }
    Field Contents
    status How the nodes deliver now. See the list below.
    registry_version The registry version that the SDK client trusts.
    quorum Nodes that must agree on a price.
    nodes Nodes in the registry.
    connected Nodes with a connection now.
    last_frame_ns When the newest frame from any node arrived. null before the first.
    clients Open web sockets.
    accepted Price frames accepted.
    venue_reports Venue report frames accepted.
    book_updates Book frames accepted.
    rejected Frames refused: untrusted, replayed, out of time, incoherent or from a retired key.
    archive The archive's counters, only on a proxy that runs the archive.

    The status values:

    • ok: a quorum of nodes is connected, and the newest frame is at most 10 s old.
    • degraded: the newest frame is fresh, but fewer nodes than the quorum are connected.
    • starting: no frame has arrived yet.
    • down: no frame has arrived in the last 10 s.

    The HTTP status is 200 for ok and degraded, and 503 for starting and down. The body is the same in each case. The fields update once a second.

    /v1/nodes

    The latest nodes message, as the socket sends it. Before the first report, the proxy answers 503 with the error unavailable.

    /v1/registry

    The registry document as governance signed it: the version, the nodes with their addresses, endpoints and weights, the quorum guidance, and the governance signature. A client verifies the signature against the governance address it pins, so the route carries no trust. Before the first fetch, the proxy answers 503.

    /v1/history

    One feed's past prices and venue values, from the proxy's archive. Only a proxy with a [history] section has this route. Another proxy answers 404 with the error not_found.

    text
    GET /v1/history?feed=CRYPTO.BTC/USD&from=1791619200000&to=1791621000000
    Parameter Contents
    feed A symbol from the catalog's prices or venues.
    from The start, unix milliseconds. Default: 30 minutes before to.
    to The end, unix milliseconds. Default: now. A later time stops at now.

    One request covers at most 24 hours (max_range_hours). The proxy picks the step, from 1 s to 1 day, so that each line has at most 2000 values. Each step divides a day and starts on a whole multiple of the step since the unix epoch. So the first step can start before from, and two requests share their step times. The archive keeps 7 days by default (retention_days). A step before that has no value.

    json
    {
      "type": "history",
      "feed": "CRYPTO.BTC/USD",
      "from_ms": 1791619200000,
      "to_ms": 1791621000000,
      "step_ms": 1000,
      "times_ms": [1791619200000, 1791619201000],
      "price": ["82776.45", null],
      "conf": ["11.7064", null],
      "sources": [
        {
          "venue": "binance",
          "market": "spot",
          "symbol": "BTCUSDT",
          "bid": ["82858.53", "82858.6"],
          "ask": ["82858.54", "82858.61"]
        }
      ]
    }
    Field Contents
    step_ms The length of one step.
    times_ms The start of each step. The first step holds from_ms. Each line below has one value for each step.
    price The quorum price at the end of the step. null when the feed was halted or the archive has no row.
    conf The confidence half-width at the end of the step.
    sources The feed's venues, in the order of the venue report. Each has bid, ask, mark, index and funding at the end of the step. A field the venue never sent is absent.

    The venue values are the venue report's own, before any peg conversion. To draw a USDT venue on a USD chart, multiply it by the CRYPTO.USDT/USD price of the same step.

    Each address can send 30 requests a minute (requests_per_minute). Errors use the error format: bad_request (400), not_found (404), rate_limited (429, Retry-After: 60), busy (503, Retry-After: 1) and unavailable (503).

    /v1/arbitrage

    The best cycles of trades between the spot markets of the served venue reports: trades that end in the asset they start with. The proxy writes the reply every second, and sends Cache-Control: public, max-age=1. Before its first write, it answers 503 with the error unavailable and Retry-After: 1.

    The proxy builds a matrix of the best rate from each asset to each other asset, over every spot market whose status is used, outlier, feed_halted, peg_unavailable or quote_only and whose newest venue report is at most 3 s old, max_leg_age_ms. A venue sends on change, and such a status says that the connection was alive in the last 2 s, so a quiet book stays current. A market whose top has not changed for 60 s, max_unchanged_ms, is left out, because one market can freeze inside a live feed. A buy pays the ask and a sell gets the bid, less the venue's base-tier taker fee. USDCUSDT on Binance and MEXC has no fee. Toobit's spot pairs have a taker fee of 0%, Toobit's public rate for its standard spot pairs. It takes −ln of each rate, so a cycle whose logs add to less than zero gains. The matrix holds the best route of two trades for each pair of assets, and every other route of two trades with a gain also counts, so that each pair of venues has its own seconds. The reply holds the best 50 cycles of two trades and the best 50 of three, losing ones too, best first.

    A gap is real only if both prices are from the same moment, so the legs of a cycle must also meet:

    • Each side of a book stood from the first venue report that showed its price and size to the newest report. apart_ms is the time from the oldest of the legs' reports to the last change of a leg's price or size, and 0 when every leg's price stood at one moment. A cycle counts only when it is at most max_apart_ms, 1 s: one venue report interval, so that two feeds that report at different times still meet.
    • A venue report has no time of its own for the book top: the newest data can be a trade. So age_ms is the age of the newest data, which can pass max_leg_age_ms on a quiet leg, and a book top that stopped while trades still arrive is caught only at max_unchanged_ms.
    • A market whose report is timed more than 100 ms after the proxy's clock is left out, and markets_ahead counts it: its node's clock runs ahead, which makes the data look newer than it is.
    • A leg with status outlier is more than 10 bp from the venues' median. A gap that pays after two taker fees nearly always has such a leg, so it counts like any other; its status tells it.
    • A leg with status feed_halted stays on the board, but the node halted its feed, so its cycle counts in no gain total: not in profitable, and in the history its gain counts as at most zero.
    • A leg with status quote_only is a live quote that its feed keeps out of the oracle's price, so it counts like any other. Every Toobit source is quote-only. The node reads Toobit's books over REST once a second, so a Toobit quote can be up to about 1 s old.

    A proxy before 2026-10-30 sends no apart_ms, max_apart_ms or markets_ahead, checks each leg's age alone, and counts every leg in profitable. A proxy before 2026-11-05 sends no max_unchanged_ms and leaves out a leg with no new data for 3 s, also a quiet book on a live connection. So the history shows less time for such routes before that date.

    json
    {
      "type": "arbitrage",
      "time_ns": "1792500000000000000",
      "max_leg_age_ms": 3000,
      "max_unchanged_ms": 60000,
      "max_apart_ms": 1000,
      "max_depth_age_ms": 1800000,
      "markets": 356,
      "markets_ahead": 0,
      "assets": 78,
      "profitable": 1,
      "fees": { "binance": 0.001, "coinbase": 0.009, "mexc": 0.0005 },
      "cycles": [
        {
          "path": ["USDT", "ETH", "USDT"],
          "gross_bps": 12.4,
          "net_bps": 7.4,
          "size": 28.55,
          "profit": 0.02,
          "size_usd": 28.55,
          "profit_usd": 0.02,
          "oldest_ms": 579,
          "apart_ms": 0,
          "legs": [
            {
              "from": "USDT",
              "to": "ETH",
              "market": "bitfinex:spot:tETHUST",
              "venue": "bitfinex",
              "side": "buy",
              "price": "2317.3",
              "qty": "0.52046135",
              "fee": 0,
              "status": "used",
              "age_ms": 579,
              "depth_age_ms": 241000,
              "depth_levels": 100
            }
          ],
          "depth": {
            "size": 6180.4,
            "profit": 1.92,
            "size_usd": 6180.4,
            "profit_usd": 1.92,
            "net_bps": 3.11,
            "at_least": false
          },
          "break_even_bps": 10.01,
          "transfers": {
            "state": "unknown",
            "moves": [
              {
                "asset": "ETH",
                "from": "bitfinex",
                "to": "binance",
                "state": "unknown",
                "unknown": "no_data",
                "fee": "unknown"
              },
              {
                "asset": "USDT",
                "from": "binance",
                "to": "bitfinex",
                "state": "unknown",
                "unknown": "no_data",
                "fee": "unknown"
              }
            ]
          }
        }
      ]
    }
    Field Meaning
    path The assets in trade order, back to the first. A cycle starts at USD, USDT or USDC when it holds one, else at BTC or ETH.
    gross_bps The gain before fees, in basis points.
    net_bps The gain after taker fees, in basis points. Below zero is a loss.
    size The most of the first asset that every leg's best price takes. null when a venue sent no size.
    profit size times the gain after fees, in the first asset.
    size_usd, profit_usd size and profit in US dollars, at the first asset's best bid in USD, USDT or USDC. null without a size or a dollar market.
    legs Each trade: buy pays the quote currency at the ask, sell gets it at the bid. qty is in the base asset.
    oldest_ms The age of the oldest leg's newest data. On a quiet leg it can pass max_leg_age_ms.
    apart_ms How far apart the legs' prices are in time, at most max_apart_ms. See above.
    token, bridged In a leg: the token that the market trades, and true when it is another token than the leg's asset. See below.
    depth The size from the order books, when every leg has a depth read. See below.
    depth_age_ms In a leg: how long ago the proxy read the market's book. depth_levels is the levels of that read on the side that the trade takes.
    break_even_bps The gap before fees at which the gain after taker fees is zero: about the sum of the legs' taker fees. Below it, the route loses.
    transfers The refill of a cycle on two venues or more. See below.

    A cycle that crosses venues needs a balance on each venue. Withdrawals and their fees are not in any gain: a refill is paid once for many trades. The markets quoted in BTC or ETH, such as binance:spot:ETHBTC, are in this reply only, not in /v1/carry.

    size is what the best prices take, and it is often small. With [carry.depth], the proxy reads each book of /v1/carry about every 10 minutes (see /v1/carry), and a cycle of the reply whose legs all have a read at most max_depth_age_ms old also has depth:

    • Each leg costs its live best price, plus the cost of the size past the best price of the last read. Between two read sizes the cost follows a log interpolation; below the smallest size it is the cost of the smallest.
    • depth.size is the amount of the first asset with the largest gain after taker fees: past it, each further unit loses. profit, size_usd, profit_usd and net_bps are at that size. They are null when no size gains.
    • The size stops at the largest size that a leg's read filled. at_least is true when the gain still grows there, so a larger size can gain more.
    • A book changes by the second, and a read can be 30 minutes old. depth shows what the books could take, not what one order gets now.

    A cycle with a leg on a market without a read, such as a market quoted in BTC or ETH, has no depth. A proxy before 2026-10-30 sends no depth, depth_age_ms, depth_levels or max_depth_age_ms.

    After trades, the balances must be refilled: the coin moves from the venue that buys it to the venue that sells it, and the quote currency comes back. Each cycle of the reply on two venues or more has transfers, with one move for each asset that one trade receives and the next trade pays on another venue:

    Field in a move Meaning
    asset The asset as the route names it: ZEC for Hyperliquid's UZEC.
    from, to The venue it leaves and the venue it enters.
    state open on a network that both venues share, closed on every shared network, else unknown.
    unknown Why the state is unknown: no_data (a venue has no transfer data for the asset), no_shared_network (the venues name no network in common) or no_status (a venue does not state whether the way is open).
    closed When closed: each closed way (withdraw or deposit) with its venue, and the venue's reason when it gives one.
    network The network of the note: the cheapest open one, else the cheapest whose state is unknown, else the cheapest closed one.
    fee, fees fees lists the withdrawal fee, and the deposit fee where a source states one, such as the Unit bridge's, by asset. fee is fixed when fees is all of it, variable when the venue sets it at each withdrawal, else unknown.
    fee_usd fees in US dollars, when fee is fixed and each asset has a dollar price. The history uses the live board's prices.
    eta_s The withdrawal's and the deposit's time where a source states them, in seconds: the Unit bridge's, Hyperliquid's USDC bridge, Binance's and Kraken's deposit times. A side without a time adds none, so the move can take longer.

    A move is closed when it is closed on every network that both venues share, or when one venue closes that way on every network that it lists, whatever the other venue publishes. transfers.state is closed when one move is closed and open when every move is open. transfers.fee_usd adds up the moves' fees when each has one, and transfers.eta_s is the longest time of the moves, which can go at the same time.

    The proxy starts with a snapshot of each source, with fees and no status. With [carry.transfers], it reads them at start and every hour: Binance, Bitget, KuCoin, Kraken, Gate, Coinbase and Bitstamp give the status of each network; Gate gives no fees, and Coinbase and Bitstamp set a network fee at each withdrawal. OKX's fees come from a snapshot, with no status. Hyperliquid's Unit tokens (UBTC, UETH, USOL, UPUMP, UZEC) refill through the Unit bridge, whose fees and times come from Unit; USDC leaves Hyperliquid for $1 in about 5 minutes. Unit and Hyperliquid state no status. Bybit, MEXC and Bitfinex have no public source, so their moves are unknown. Two venues share a network only when both name it and their token contracts do not differ: a wrapped coin is another token.

    A proxy before 2026-10-30 sends no break_even_bps or transfers.

    A Hyperliquid spot pair has a name such as @272, and it can trade a bridged token. With [carry.lots], the proxy reads Hyperliquid's spotMeta at start and every hour, and each leg on such a pair has token, such as UZEC, and bridged. bridged is true when the token is another token than the leg's asset: @272 in a ZEC feed trades UZEC, Unit's bridged ZEC, not ZEC. Its price can leave ZEC's when the bridge is slow, and a balance there refills only through the bridge, which can take hours. A leg on another market, and every leg from a proxy before 2026-10-30, has neither field.

    /v1/arbitrage/usdc

    Every route through USDC, in both directions, best first. A route has a coin's USDC book on one venue, its USDT book on another venue, and the conversion between USDC and USDT on the venue of the USDT book. So it suits an account that can trade only one of the coin's two books on a venue. The conversion stays on one venue, because the matrix of /v1/arbitrage takes the best conversion of any venue, and a trader's USDT sits on this one.

    The proxy writes the reply every second, and sends Cache-Control: public, max-age=1. Before its first write, it answers 503 with the error unavailable. The legs follow the rules of /v1/arbitrage: each has a report at most max_leg_age_ms old and a top that changed within max_unchanged_ms, and they meet within max_apart_ms.

    json
    {
      "type": "arbitrage_usdc",
      "time_ns": "1793865354796254650",
      "max_leg_age_ms": 3000,
      "max_unchanged_ms": 60000,
      "max_apart_ms": 1000,
      "routes": [
        {
          "coin": "ETH",
          "buy": "binance",
          "sell": "mexc",
          "convert_on": "mexc",
          "gross_bps": 16.2,
          "net_bps": 1.1,
          "direct_net_bps": 3.4,
          "size_usd": 840.5,
          "profit_usd": 0.09,
          "oldest_ms": 420,
          "apart_ms": 0,
          "in_gains": true
        }
      ]
    }
    Field Meaning
    coin The asset that the route buys and sells.
    buy, sell The venue that buys the coin, and the venue that sells it.
    convert_on The venue of the USDT book, which also converts between USDC and USDT.
    direct_net_bps What the coin's USDT books on the same two venues gain after fees in the same second, or null without both books, or when their prices did not meet. The difference from net_bps is what the route costs.
    gross_bps, net_bps The gap before fees and the gain after taker fees, in basis points. Below zero is a loss.
    size_usd, profit_usd What every leg's top of book takes, in US dollars, and the gain on it.
    oldest_ms, apart_ms As in /v1/arbitrage.
    in_gains Whether every leg's quote adds to the gains. It is false when the oracle halted a feed.

    A route has no depth read and no refill, so that a reply of all routes stays small. A route with a high rank is also in /v1/arbitrage, with both.

    /v1/canister

    The registry canister's on-chain prices next to three other sources, and each node's last push to the canister. The proxy writes the reply every 10 s, and sends Cache-Control: public, max-age=5. Before its first write, or without a [canister_view] section, it answers 503.

    • canister: the canister's /prices.json, with the IC certificate checked. It changes every 10 s.
    • xrc: the rate of the IC's exchange rate canister, as the Liquidium lending canister caches it for its pools' assets. Liquidium quotes it in USDT (price_usdt); price converts it to USD at the proxy's own CRYPTO.USDT/USD, which usdt_usd shows. liquidium marks the coins that Liquidium has a rate for; xrc_error says why such a coin has no rate now. It changes every minute.
    • coingecko and coinmarketcap: each site's USD price and the time it last changed. The proxy reads CoinMarketCap every 3 minutes and CoinGecko every 5.
    • nodes: for each node, the newest publish time and the feed count of its frames on the canister's /frames.json.

    Each coin that the canister prices has a row. errors names a source that gave nothing, and why.

    json
    {
      "time_ns": "1793092080000000000",
      "canister": "xb5gv-diaaa-aaaaf-qg5qa-cai",
      "xrc_via": "hyk4r-jqaaa-aaaar-qb4ca-cai",
      "usdt_usd": "0.99835",
      "coins": [
        {
          "symbol": "CRYPTO.BTC/USD",
          "canister": {
            "status": "ok",
            "price": "79717.02097452",
            "nodes": 3,
            "publish_time_ns": "1793092079907292488"
          },
          "liquidium": true,
          "xrc": { "price_usdt": "79847.915", "price": "79716.03" },
          "xrc_error": null,
          "coingecko": { "price": 79730, "updated_s": 1793092061 },
          "coinmarketcap": { "price": 79725.41, "updated_s": 1793092020 }
        }
      ],
      "nodes": [{ "address": "0x92EEfB29…", "last_publish_ns": "1793092075000000000", "feeds": 12 }],
      "errors": {}
    }

    /v1/canister/history

    One coin of /v1/canister over the last hour: symbol names the canister's feed, such as CRYPTO.BTC/USD. The reply has a point for each write of /v1/canister, 10 s apart, oldest first. The proxy keeps the points in memory, so they start again after a restart. A coin that the canister does not price gets 400 with the error bad_request. Without a [canister_view] section, or before the first write, the proxy answers 503. The reply has Cache-Control: public, max-age=5.

    json
    {
      "type": "canister_history",
      "symbol": "CRYPTO.BTC/USD",
      "times_ms": [1793092070000, 1793092080000],
      "canister": ["79716.11", "79717.02097452"],
      "xrc": ["79716.03", "79716.03"],
      "coingecko": [79730, 79730],
      "coinmarketcap": [79725.41, 79725.41]
    }

    canister is null for a halted feed, and xrc when Liquidium had no fresh rate.

    /v1/nodes/history

    Each node's session and feeds over the last 24 hours (range=24h, the default), 7 days (range=7d) or 30 days (range=30d), from the proxy's archive. Each minute the archive stores each node: the seconds it recorded, the seconds with a session to the node, the price frames accepted and refused, the most feeds degraded, stale, halted or with no update at one second, and the delivery time. The reply groups the minutes in steps of 5 minutes, 1 hour or 6 hours. Only a proxy with a [history] section has this route; another proxy answers 404. The proxy reads the archive every minute, and sends Cache-Control: public, max-age=60. Before its first read, it answers 503.

    json
    {
      "type": "nodes_history",
      "range": "24h",
      "from_ms": 1793006400000,
      "to_ms": 1793092800000,
      "step_ms": 300000,
      "first_ms": 1793090000000,
      "quorum": 2,
      "times_ms": [1793006400000, 1793006700000],
      "minutes": [5, 5],
      "quorum_lost": [0, 0],
      "nodes": [
        {
          "address": "0x92eefb296d308812daeb1082ccfef22a24f94107",
          "seconds": [300, 300],
          "connected": [300, 280],
          "degraded": [3, 3],
          "stale": [0, 0],
          "halted": [0, 0],
          "frames": [17269, 17102],
          "refused": [0, 0],
          "p99_us": [22000, 26000]
        }
      ],
      "incidents": [
        {
          "address": "0x92eefb296d308812daeb1082ccfef22a24f94107",
          "kind": "down",
          "from_ms": 1793006760000,
          "to_ms": 1793006820000,
          "halted": 0
        }
      ]
    }
    Field Contents
    first_ms The first minute that the archive holds. The steps before it have no record. null before the first minute.
    minutes For each step, the minutes that the archive recorded. A step with 0 has no record.
    quorum_lost For each step, the minutes when fewer than quorum nodes had a session for most of the minute.
    nodes For each node and step: seconds recorded and connected with a session, the most feeds degraded, stale and halted, the frames and the p99_us.
    incidents The newest 100 runs of minutes when a node had no session for most of each minute (down), or had halted feeds (halted, with the most halted feeds).

    /v1/arbitrage/history

    What the arbitrage board found over the last 24 hours (range=24h, the default) or 7 days (range=7d), from the proxy's archive. Each minute the archive stores every route that showed a gap before fees in a second of that minute: its seconds with a gap, its seconds with a gain after fees, and its largest gap, gain, size and profit. Losing routes after fees count too, so the reply shows how close the markets came.

    Only a proxy with a [history] section has this route. Another proxy answers 404 with the error not_found. Another range gets 400 with the error bad_request. The proxy reads both ranges every minute and sends Cache-Control: public, max-age=60. Before its first read, it answers 503 with the error unavailable and Retry-After: 60. The route counts against routes_per_minute.

    json
    {
      "type": "arbitrage_history",
      "range": "24h",
      "from_ms": 1792414800000,
      "to_ms": 1792501200000,
      "step_ms": 300000,
      "venues": [
        {
          "buy": "mexc",
          "sell": "binance",
          "seconds_gross": 15840,
          "seconds_net": 12,
          "max_gross_bps": 63.6,
          "routes": 12
        }
      ],
      "coins": [
        {
          "coin": "ADA",
          "seconds_gross": 9120,
          "max_gross_bps": [12.4, null, 8.1],
          "seconds": [420, 0, 310]
        }
      ],
      "series": [
        {
          "time_ms": 1792414800000,
          "best_net_bps": -3.9,
          "best_gross_bps": 6.1,
          "profitable_routes": 0,
          "routes": 31
        }
      ],
      "routes": [
        {
          "path": ["USDT", "XRP", "USDT"],
          "venues": ["mexc", "bybit"],
          "sides": ["buy", "sell"],
          "minutes": 162,
          "seconds_gross": 9720,
          "seconds_net": 29,
          "max_gross_bps": 63.2,
          "max_net_bps": 43.2,
          "max_size": 4810.5,
          "max_profit": 0.7
        }
      ]
    }
    Field Contents
    step_ms 5 minutes for 24h, 1 hour for 7d.
    venues The routes of two trades by the venue that buys and the venue that sells. seconds_gross adds the seconds of every route of the pair, so it can pass the span.
    coins The 20 coins of routes of two trades with the most seconds of gaps. max_gross_bps and seconds have 24 values, one for each hour of the day in UTC; null is no gap.
    series One entry for each step with a gap. A missing step had none. profitable_routes counts the routes with a gain after fees in a second of the step.
    routes The 20 routes with the most seconds of gain after fees, then by their best gain. max_profit is the largest gain and max_size its size, in US dollars; max_size is null when no minute paid or a venue sent no size. tokens and bridged have one value for each trade, as token and bridged of a leg of /v1/arbitrage, with null for a market without a token.
    pairs The 20 pairs of two trades with the largest gain_usd: a coin against its quote. An opening is a run of minutes in which the pair (any of its pairs of venues) gained after fees; for each of its venues, the same for that pair of venues. It ends only after more than 10 minutes without a gain: a minute without a gain can be a closed gap or missing prices, and the archive cannot tell which, so a shorter pause is part of the opening. gain_usd adds up the best gain of each opening, taken once, and volume_usd adds up the sizes of those gains. minutes_gross and minutes_net count the minutes with a gap and with a gain, on the clock: a minute with one second counts whole. clock_seconds_gross and clock_seconds_net count the seconds instead: in each minute, those of the route with the most. Other routes can add seconds, so these are the least time. openings_by_gain counts the openings under $1, to $5, to $20, to $100 and above; openings_by_length counts them by their whole minutes with a gain, at 1, to 5, to 15, to 60 and more; openings_by_seconds_net counts them by their seconds with a gain, to 1 minute, to 5, to 15, to 60 and longer. best_openings lists the 5 largest, each with the venues of its best minute. best_venue_openings lists the 5 largest openings of single pairs of venues: runs of minutes in which one pair of venues gained. Two of them can overlap in time, and gain_usd counts only the best trade of each run of the pair, so their gains can add up to more. Each opening has minutes, its whole minutes with a gain, and seconds_net, its seconds with a gain: in each minute, those of the route that gained longest. gain_by_balance gives the gain that a balance of $500 to $50,000 on each venue catches, as [balance, gain]: all of a trade that fits, a share of a larger one at its edge. balance_90_usd is the least balance that catches 90% of the gain. Each pair also has its pairs of venues (buy and sell, each with its own openings, as above, and gain_usd), its steps as [time_ms, seconds_gross, seconds_net], and its seconds with a gap in each of the 24 hours of the day, UTC.
    usdc_routes The routes of /v1/arbitrage/usdc over the span, at most 500, those with the most seconds of gain first: coin, buy, sell, convert_on, minutes, seconds_gross, seconds_net, max_gross_bps, max_net_bps, max_profit and last_ms. The list has its own read, and it is absent when that read fails or the span has none.

    The 7d reply starts at a whole hour and sums the hours that the archive stores, and the newest hours from the minutes. The openings, the gains, and the minutes and seconds on the clock come from the minutes in both replies, so the 7d reply counts seconds too. The minutes and the hours stay for arbitrage_retention_days of the [archive] section, 30 by default.

    Each route and each pair also has last_ms, the last minute with a gap, and best_ms, the minute of its best gain after fees.

    Each of a pair's venues, best_openings and best_venue_openings has buy_token and buy_bridged for a market with a token on buy, and sell_token and sell_bridged on sell, as token and bridged of a leg of /v1/arbitrage. The venues at the top of the reply group all coins, so they name no token. A proxy before 2026-10-30 sends none of these fields.

    A proxy before 2026-10-30 also sends no clock_seconds_gross, clock_seconds_net, openings_by_seconds_net, best_venue_openings or seconds_net of an opening.

    Each of a pair's venues also has break_even_bps and transfers, as a cycle of /v1/arbitrage, with the fees in dollars at the live board's last prices. A pair of venues with a bridged token and a known refill time has outlast_refill: the share of its openings, 0 to 1, whose seconds with a gain outlast that time. A proxy before 2026-10-30 sends none of these fields.

    Each route of usdc_routes has transfers, with the moves of its coin from buy to sell and of USDC back. Each of a pair's venues, and each route of usdc_routes, says how its gaps after fees went, from 2026-11-05 on. gaps opened, and gaps_reached were still open 2 s later, on the board's seconds. pays is the price levels that paid, and paid_usd is what they gain after fees. A level pays once until it has been gone for 5 minutes, at most once in each 2 s on a route, on at most $1,000 and not below $10. This is an estimate, not a promise: it leaves out refills, depth and other traders. These numbers are in whole hours, and the proxy reads them apart, so a failed read leaves them at 0.

    Each pair and each of its venues has seconds_off_median: its seconds with a gap in which a leg was outlier, more than 10 bp from the venues' median. They count like any other second. A second with a feed_halted leg adds to seconds_gross and the largest gap, but its gain after fees counts as at most zero, so it adds to no gain, opening or seconds_net. Minutes before 2026-10-30 hold 0. A proxy before 2026-10-30 sends no seconds_off_median.

    /v1/carry

    The newest top of book of each spot and perpetual market in the served venue reports, and the newest funding of each perpetual. The proxy writes the reply every 5 s, and sends Cache-Control: public, max-age=5. Before its first write, it answers 503 with the error unavailable and Retry-After: 5.

    json
    {
      "type": "carry",
      "time_ns": "1792500000000000000",
      "peg": { "symbol": "CRYPTO.USDT/USD", "status": "ok", "price": "0.99981" },
      "perps": [
        {
          "perp": "binance:linear_perp:BTCUSDT",
          "base": "BTC",
          "funding": {
            "basis": "interval",
            "rate": "0.0001",
            "predicted_rate": null,
            "interval_ns": "28800000000000",
            "next_funding_time_ns": "1792512000000000000",
            "publish_time_ns": "1792499999100000000"
          },
          "top": {
            "status": "used",
            "bid": "82538.1",
            "ask": "82538.2",
            "bid_qty": "4.21",
            "ask_qty": "1.07",
            "mark": "82538.01",
            "index": "82574.25",
            "impact": { "notional": "20000", "bid": "82537.9", "ask": "82538.4" },
            "recv_ns": "1792499999800000000",
            "report_time_ns": "1792499999900000000"
          },
          "lot": { "step": "0.001", "unit": "base" }
        }
      ],
      "spots": [
        {
          "spot": "coinbase:spot:BTC-USD",
          "base": "BTC",
          "top": {
            "status": "used",
            "bid": "82551.3",
            "ask": "82551.4",
            "bid_qty": "0.5",
            "ask_qty": "0.32",
            "mark": null,
            "index": null,
            "recv_ns": "1792499999700000000",
            "report_time_ns": "1792499999900000000"
          }
        }
      ]
    }
    Field Contents
    peg The CRYPTO.USDT/USD result, to convert a USDT market to USD. null when the proxy does not serve the feed.
    perps Each perpetual by name, with base, the asset of the feed that names it. base is null for a perpetual that only a funding frame names, and top is then null too.
    funding The newest funding frame of any node, with the rates as decimals. A rate is over interval_ns, or over 8 hours with the basis eight_hours. null before the first frame.
    top The top of book with the newest venue data, from any feed and any node: the venue's own prices, before any peg conversion. A size is in coins on every venue, also on a venue that counts in contracts. A later report of the same node also replaces it, so a venue that went silent shows no_data. status is the status in the feed of that report.
    impact The average fills of notional in the quote currency, from the node's book. Only for a feed whose impact_notional is in the proxy's [carry] section, and only in the last 30 s. Absent when the book is too thin for the notional.
    lot The order size step of the perpetual, from the venue's list of instruments, read at start and every 6 hours. step is in unit: base for coins, or contract for contracts of contract each. contract_unit is base for coins, or quote for the quote currency of an inverse perpetual. Only a proxy with a [carry.lots] section sends it, after its first read.
    tiers The risk tiers of a Bybit, OKX, Hyperliquid, KuCoin, MEXC, Bitget or Gate USDT perpetual, and of a Lighter or dYdX perpetual (one tier, from its margin fractions), smallest first, read with the lots: the largest position of each tier (limit, in base coins or the quote currency), its maintenance margin mmr and its max_leverage. Only a proxy with a [carry.lots] section sends them. Absent on the other venues: Binance publishes its tiers only to a signed request, and Bitfinex's public config holds no tiers.
    depth The cost of a market order on the market, from the proxy's reading of the venue's order book every 10 minutes: for each of sizes (in the quote currency), the average fill of a buy and of a sell past the mid as a fraction, or null where the book cannot fill the size; the notional on each side of the book; and read_ns. On perpetuals and spots. Only a proxy with a [carry.depth] section sends it, after its first reading, about 2 minutes after the proxy starts.
    spots Each spot market by name, with its base and top.

    A market that no report or frame named for 15 minutes leaves the reply. The route does not count against routes_per_minute.

    /v1/carry/hourly

    The mean funding rate of each perpetual in each of the last 168 hours, and a year of its settled funding, from the proxy's archive. Only a proxy with a [history] section has this route. Another proxy answers 404 with the error not_found. The proxy reads the archive every 10 minutes, or 30 s after a failed read, and sends Cache-Control: public, max-age=300. Before its first read, it answers 503 with the error unavailable and Retry-After: 30. The route counts against routes_per_minute.

    json
    {
      "type": "carry_hourly",
      "from_ms": 1791896400000,
      "step_ms": 3600000,
      "hours": 168,
      "perps": {
        "binance:linear_perp:BTCUSDT": ["0.0000823", null, "0.0001"]
      },
      "settled": {
        "binance:linear_perp:BTCUSDT": {
          "days": 365,
          "means": { "30": "0.000005512", "90": "0.000006031", "365": "0.000005644" },
          "averages": { "30": "0.000005906", "90": "0.000006412", "365": "0.000005804" },
          "negative_share": 0.1781,
          "spike_share": 0.3012
        }
      },
      "intervals": {
        "binance:linear_perp:BTCUSDT": [
          { "from_ms": 1791878400000, "to_ms": 1792396800000, "interval_s": 28800 },
          { "from_ms": 1792396800000, "to_ms": 1792497600000, "interval_s": 14400 }
        ]
      }
    }
    Field Contents
    from_ms The start of the first hour. The archive stores each hour 10 to 25 minutes after it ends, so the current hour, and often the one before it, are null.
    perps For each perpetual, one value for each hour: the mean rate of the venue report samples in that hour, over the venue's interval at that time. null for an hour with no rate.
    settled For each perpetual, a year of the funding that the venue settled, from the venue's own API. Empty when the archive fetches none.
    intervals For each perpetual, its settlements after from_ms as runs of one interval, oldest first: from_ms, the start of the first interval, to_ms, the last settlement, and interval_s. Absent when the archive fetches no settled funding, and on a proxy before 2026-10-30.

    The hours in perps are a time average of the venue's live rate, not of the settled payments. To compare venues, divide each rate by its interval: the interval_s of the run in intervals that holds the hour, or for an hour after the last run, the interval of the same perpetual in /v1/carry. A run ends at a change of interval, or at a gap of more than a minute between two settlements.

    Warning

    Without intervals, the hours have no interval. When a venue changes the interval of a perpetual, the hours before the change are over the old interval. Divided by today's interval, they are wrong by the ratio of the two intervals. The settled values do not have this problem: each payment keeps its own interval.

    Each settled entry has these fields. Each rate is for one hour, on every venue.

    Field Contents
    days The UTC days with a settlement in the last year. A new perpetual has only its own days. OKX's API serves about 3 months; the proxy fills the rest of the year from OKX's daily files.
    means By window in days, 30, 90 and 365: the plain mean rate for each hour. Only the days with data count.
    averages By window in days, 30, 90 and 365: the mean rate for each hour, weighted with a half-life of 7, 14 and 60 days. Only the days with data count.
    negative_share The share of days when the funding was below 0.
    spike_share The share of the positive funding that came on the top 10% of days. null when no day was positive. A high share means that a few days made most of the average.
    weekly For each of the last 52 weeks, oldest first: the funding that the week settled, which a long paid for one unit of notional. null for a week without data. Absent on an older proxy.

    For what a position earned, take means over the longest window that every leg covers. The weighted averages follow a change in the rate sooner.

    /v1/carry/gap

    The mean mid (markets), bid (bids) and ask (asks) of 1 to 4 markets, markets=venue:market:symbol,…, in each hour of the last 7 days (hourly) and each UTC day of the last year (daily), from the archive's hourly view. Each series also has peg: USDT in USD, the mean of Coinbase's and Kraken's USDT/USD. A step without samples is null.

    Each series also has depth: the cost to fill each size in each step, by market, from the book reads that the archive keeps. It has the shape of the /v1/carry depth, with a value for each step: sizes, then buy and sell for each size, and the least bid_notional and ask_notional that a read in the step held. A size is null in a step where a read could not fill it, and a step with no read is null throughout. A market with no read in the range is absent, and so is depth on a proxy before 2026-10-29.

    The Funding page takes the entry gap of a pair from these: the gap between the mids, less the entry's fees, slippage and the larger of the step's spread and the cost to fill your size, with a USDT leg in USD at the peg. The cost to fill comes from the step's own depth, or from today's book where the step has no read. A step where a read could not fill your size has no value. The archive keeps the hours for 400 days, from the deploy of the view on, and the depth from 2026-10-29 on. The route counts against the [history] limits, like /v1/history, and sends Cache-Control: public, max-age=300. A proxy without a [history] section answers 404.

    json
    {
      "type": "carry_gap",
      "hourly": {
        "from_ms": 1792501200000,
        "step_ms": 3600000,
        "markets": { "binance:linear_perp:BTCUSDT": [80005.0, null] },
        "bids": { "binance:linear_perp:BTCUSDT": [80000.0, null] },
        "asks": { "binance:linear_perp:BTCUSDT": [80010.0, null] },
        "peg": [0.9991, null],
        "depth": {
          "binance:linear_perp:BTCUSDT": {
            "sizes": [1000, 10000, 100000, 250000, 500000, 1000000],
            "buy": [
              [0.0001, null],
              [0.0001, null],
              [0.0003, null],
              [0.0006, null],
              [0.0011, null],
              [0.0021, null]
            ],
            "sell": [
              [0.0001, null],
              [0.0001, null],
              [0.0002, null],
              [0.0005, null],
              [0.001, null],
              [null, null]
            ],
            "bid_notional": [900000.0, null],
            "ask_notional": [22000000.0, null]
          }
        }
      },
      "daily": {
        "from_ms": 1761696000000,
        "step_ms": 86400000,
        "markets": {},
        "bids": {},
        "asks": {},
        "peg": []
      }
    }

    /v1/carry/settled

    A year of settled funding, day by day, for the perpetuals in perps: 1 to 4 venue:market:symbol keys, with commas between them. It is the series behind the settled averages of /v1/carry/hourly.

    text
    GET /v1/carry/settled?perps=binance:linear_perp:BTCUSDT,okx:linear_perp:BTC-USDT-SWAP
    json
    {
      "type": "carry_settled",
      "from_ms": 1761177600000,
      "step_ms": 86400000,
      "days": 365,
      "perps": {
        "binance:linear_perp:BTCUSDT": ["0.000010069167", null, "0.000008324167"]
      }
    }
    Field Contents
    from_ms The start of the first UTC day. The last day is the current one, so its value can change.
    perps For each named perpetual, one value for each day: the mean rate for each hour of that day's settlements. null for a day with no settlement. A perpetual with no settlement in the year is not in the map.

    The route has the same 404, 503, Cache-Control: public, max-age=300 and routes_per_minute rules as /v1/carry/hourly. A request without perps, or with more than 4 keys, gets 400 with the error bad_request.

    Message format

    Every message is a JSON text frame. A client op has an op field. A proxy message has a type field. A client message can be at most 64 KiB.

    Why numbers are strings

    A JavaScript number loses precision past 2^53, and a nanosecond timestamp is about 1.8 × 10^18. So every 64-bit time and every decimal is a JSON string.

    • Parse a time such as publish_time_ns with BigInt.
    • Keep a price as a string, or parse it with a decimal library.
    • Small counts stay JSON numbers: nodes, halted_nodes, weight_bps, expo, the book seq, the pong id, and the counts and microseconds in a nodes message.
    • Venue report values are integer mantissas as strings, not decimals. The value is the mantissa × 10^exponent.

    Client ops

    subscribe

    json
    {
      "op": "subscribe",
      "prices": ["CRYPTO.BTC/USD"],
      "venues": ["CRYPTO.BTC/USDT"],
      "books": ["binance:spot:BTCUSDT"],
      "funding": ["okx:linear_perp:BTC-USDT-SWAP"],
      "nodes": true
    }
    Field Type Contents
    op string "subscribe"
    prices array of strings, optional Feed symbols whose prices to send.
    venues array of strings, optional Feed symbols whose venue reports to send.
    books array of strings, optional Book names, venue:market:symbol.
    funding array of strings, optional Perpetual names, venue:market:symbol, or "*" for every perpetual.
    nodes boolean, optional true to get the node reports, once a second.
    frames array of strings, optional Feed symbols whose signed node frames to send, to verify the nodes yourself. Only the names in the catalog's frames.

    The proxy answers with subscribed, before any data of the new topics. Then it sends at once, for the names in the request:

    • the latest price message of each price feed;
    • the latest venues message of each node, for each venue feed;
    • a snapshot of each book;
    • the latest funding message of each node, for each perpetual;
    • the latest nodes message, when nodes is true;
    • the latest frame of each node, for each frame feed.

    The node reports count as one subscription, and so does "*" for funding. The limit counts the topics that the socket would hold, each once. A book or a perpetual counts once its name is valid, also before its first frame. So a client that subscribes just after a proxy restart loses nothing. A funding name must be a perpetual market. A name that the proxy does not serve goes to unknown in the reply. A request that would pass the subscription limit changes nothing; the proxy answers with the error too_many_subscriptions.

    unsubscribe

    json
    {
      "op": "unsubscribe",
      "prices": ["CRYPTO.BTC/USD"],
      "venues": [],
      "books": ["binance:spot:BTCUSDT"]
    }

    The fields are the same as for subscribe. "nodes": true stops the node reports, and "funding": ["*"] stops all funding. The proxy drops the messages that wait for those topics, and then it answers with unsubscribed. After that reply, no message for those topics comes.

    ping

    json
    { "op": "ping", "id": 1 }
    Field Type Contents
    op string "ping"
    id unsigned integer, optional Sent back in the pong.

    The id is at most 2^53 − 1, so a JavaScript number holds it. An unknown op, an unknown field or a larger id is a bad_request error.

    Server messages

    subscribed

    json
    {
      "type": "subscribed",
      "prices": ["CRYPTO.BTC/USD"],
      "venues": [],
      "books": ["binance:spot:BTCUSDT"],
      "funding": [],
      "nodes": false,
      "frames": [],
      "unknown": ["CRYPTO.X/USD"]
    }
    Field Contents
    type "subscribed"
    prices, venues, books, funding, frames The names from the request that the proxy serves, each once, in canonical form.
    nodes The nodes flag of the request.
    unknown The names from the request that the proxy does not serve. Present only when not empty.

    unsubscribed

    json
    {
      "type": "unsubscribed",
      "prices": ["CRYPTO.BTC/USD"],
      "venues": [],
      "books": ["binance:spot:BTCUSDT"],
      "funding": [],
      "nodes": false,
      "frames": []
    }
    Field Contents
    type "unsubscribed"
    prices, venues, books, funding, frames The names from the request that the proxy serves, each once, in canonical form.
    nodes The nodes flag of the request.
    unknown The names from the request that the proxy does not serve. Present only when not empty.

    price

    The resolved price of the Rust SDK, with type added. Resolved explains each field.

    json
    {
      "type": "price",
      "feed_id": "0x0523e79c7ed211911a19afaa4def68c896bc72d674bf33c5c64d4d7089e320e2",
      "symbol": "CRYPTO.BTC/USD",
      "status": "ok",
      "price": "86599.95",
      "conf": "19.71359135",
      "nodes": 3,
      "halted_nodes": 0,
      "concerns": [],
      "publish_time_ns": "1791299498663252000",
      "spread_bps": "0"
    }
    Field Type Contents
    type string "price"
    feed_id string The feed ID, 0x hex.
    symbol string The feed symbol.
    status string "ok", "degraded" or "halted".
    price decimal string or null The median of the node prices. null when halted.
    conf decimal string or null The half-width of the confidence interval. null when halted.
    nodes number Nodes that contributed.
    halted_nodes number Nodes left out because they reported their own feed halted.
    concerns array of strings insufficient_nodes, node_divergence, node_reported_degraded, node_reported_halted, registry_stale.
    publish_time_ns string The newest contributing publish time, unix nanoseconds. "0" when halted.
    spread_bps decimal string or null The spread between nodes, in basis points of the median.

    Status and concerns says what to do for each status and concern. In short: use ok and degraded prices and act on conf. Never settle or liquidate on halted.

    venues

    One node's verified venue report for one feed. The proxy does not combine reports across nodes.

    json
    {
      "type": "venues",
      "symbol": "CRYPTO.BTC/USDT",
      "node": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
      "report": {
        "feed_id": "0xf8e0c6b396a831650eced3ac35b166f564b62a172ce533ce8671d8629ceb6b52",
        "publish_time_ns": "1791299498663252000",
        "seq": "1791299498663",
        "expo": -8,
        "entries": [
          {
            "venue": "binance",
            "market": "spot",
            "symbol": "BTCUSDT",
            "status": "used",
            "weight_bps": 3400,
            "bid": "8659995000000",
            "ask": "8659996000000",
            "bid_qty": "150000000",
            "ask_qty": "42000000",
            "impact_bid": "8659980000000",
            "impact_ask": "8660010000000",
            "mark": null,
            "index": null,
            "funding": null,
            "exchange_time_ns": "1791299498623252000",
            "local_recv_ns": "1791299498661252000"
          }
        ]
      }
    }
    Field Type Contents
    type string "venues"
    symbol string The feed symbol.
    node string The address of the node that signed the report.
    report.feed_id string The feed ID, 0x hex.
    report.publish_time_ns string When the node signed the report.
    report.seq string The report sequence of this node and feed. It is separate from the price sequence.
    report.expo number The exponent of every price in the entries.
    report.entries array One entry for each configured source, in config order.

    Each entry:

    Field Type Contents
    venue string binance, bybit, okx, coinbase, kraken, deribit, hyperliquid, bitfinex, mexc, kucoin, bitstamp, bitget, gate, lighter, dydx or toobit.
    market string spot, linear_perp or inverse_perp.
    symbol string The venue's own symbol for the instrument, such as BTCUSDT.
    status string used, outlier, stale, crossed, no_data, invalid, feed_halted, peg_unavailable or quote_only.
    weight_bps number The share of the total weight of the price, 0 to 10,000. It is 0 unless the status is used.
    bid, ask string or null Mantissas at report.expo.
    bid_qty, ask_qty string or null Mantissas at exponent −8, in base units.
    impact_bid, impact_ask string or null Mantissas at report.expo, for the impact notional of the feed.
    mark, index string or null Mantissas at report.expo.
    funding string or null The venue's own rate over its own interval, a mantissa at exponent −9.
    exchange_time_ns string or null The venue's own timestamp on its newest observation.
    local_recv_ns string When the node received the newest observation, or "0" with no data.

    In the example, "bid": "8659995000000" at expo −8 is 86599.95.

    book

    A snapshot or a delta of one book.

    json
    {
      "type": "book",
      "book": "binance:spot:BTCUSDT",
      "seq": 1,
      "snapshot": true,
      "available": true,
      "node": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
      "publish_time_ns": "1791299498663252000",
      "local_recv_ns": "1791299498662252000",
      "exchange_time_ns": "1791299498660000000",
      "bids": [["86599.95", "1.5"]],
      "asks": [["86599.96", "0.42"]]
    }

    A delta for the same book. The level at 86599.95 left, and a level at 86599.9 arrived:

    json
    {
      "type": "book",
      "book": "binance:spot:BTCUSDT",
      "seq": 2,
      "snapshot": false,
      "available": true,
      "node": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
      "publish_time_ns": "1791299498763252000",
      "local_recv_ns": "1791299498761252000",
      "exchange_time_ns": "1791299498760000000",
      "bids": [
        ["86599.95", "0"],
        ["86599.9", "2.1"]
      ],
      "asks": []
    }
    Field Type Contents
    type string "book"
    book string The book name, venue:market:symbol.
    seq number The proxy's own sequence for this book.
    snapshot boolean true for the whole book. false for the changed levels only.
    available boolean false when no node has a valid book. The levels are then empty.
    node string or null The node whose book this is. null when not available.
    publish_time_ns string When the node signed its last book frame. "0" when not available.
    local_recv_ns string When the node received the newest book data. "0" when not available.
    exchange_time_ns string or null The venue's own time on the newest book data. null when the venue sends none, or when not available.
    bids array of [price, size] Decimal strings, best (highest) price first.
    asks array of [price, size] Decimal strings, best (lowest) price first.

    Sizes are in base units. In a delta, a size of "0" removes the level.

    funding

    One node's funding of one perpetual. Each message carries the whole state, so only the latest one counts. The proxy keeps one slot for each node and perpetual.

    json
    {
      "type": "funding",
      "funding": "okx:linear_perp:BTC-USDT-SWAP",
      "node": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
      "update": {
        "venue": "okx",
        "market": "linear_perp",
        "symbol": "BTC-USDT-SWAP",
        "publish_time_ns": "1791542600000000000",
        "seq": "1791542400003",
        "basis": "interval",
        "rate": "-30339016",
        "predicted_rate": null,
        "interval_ns": "28800000000000",
        "next_funding_time_ns": "1791561600000000000",
        "settled": { "rate": "6729944", "time_ns": "1791532800000000000" },
        "open_interest": null,
        "exchange_time_ns": "1791542585113000000",
        "local_recv_ns": "1791542585120000000"
      }
    }
    Field Type Contents
    type string "funding"
    funding string The perpetual, venue:market:symbol.
    node string The node that signed the update.
    update object The signed funding update. FundingUpdate v1 lists its fields.

    Rates are mantissas at exponent −12: "-30339016" is −0.000030339016. basis is interval for a fraction paid at each funding time, or eight_hours for Deribit's funding_8h. Open interest is a mantissa at −8, with its unit: base, contracts or quote. A field that the venue does not send is null.

    nodes

    Every node in the registry, as the SDK client inside the proxy sees it. The proxy sends one each second to a client that subscribed with "nodes": true.

    json
    {
      "type": "nodes",
      "time_ns": "1791469482805717000",
      "registry_version": 3,
      "quorum": 3,
      "nodes": [
        {
          "address": "0x02acaf5c6723d2ffaa8600647e32a227b22e4425",
          "weight": 1,
          "endpoints": [],
          "connection": { "state": "connected", "since_ns": "1791469442141312000" },
          "connects": 1,
          "failures": 2,
          "last_error": "IO error: Connection refused (os error 61)",
          "last_frame_ns": "1791469482797795000",
          "frames": {
            "accepted": 831,
            "venue_reports": 7199,
            "book_updates": 2798,
            "replayed": 0,
            "out_of_time": 0,
            "incoherent": 0
          },
          "delivery": { "count": 831, "p50_us": 193, "p90_us": 342, "p99_us": 606, "max_us": 24927 },
          "feeds": [
            {
              "symbol": "CRYPTO.BTC/USD",
              "state": "live",
              "price": "82437.35104361",
              "conf": "11.65840197",
              "deviation_bps": "0",
              "publish_time_ns": "1791469482765948959",
              "seq": "1791469441964"
            }
          ]
        }
      ]
    }
    Field Type Contents
    type string "nodes"
    time_ns string When the proxy took the report, unix nanoseconds.
    registry_version number The registry version that the SDK client trusts.
    quorum number Nodes that must agree on a price.
    nodes array One report for each node in the registry, in its order.

    Each node:

    Field Type Contents
    address string The node's signing address, its id in the registry.
    weight number The registry's weight hint.
    endpoints array of strings Always empty: the proxy does not publish where a node runs. /v1/registry has the signed endpoints.
    connection object state: idle, connecting, connected with since_ns, or backoff with retry_at_ns.
    connects number Handshakes that passed.
    failures number Connection attempts and sessions that ended with an error.
    last_error string or null The last such error. It stays after the node connects again.
    last_frame_ns string or null When the last accepted frame from the node arrived.
    frames object Accepted price, venue and book frames, and rejections as replayed, out_of_time and incoherent.
    delivery object or null Node signature to receipt at the proxy, in microseconds, over the last full minute: p50_us to max_us.
    feeds array The node's latest update for each price feed of the proxy.

    Each feed of a node:

    Field Type Contents
    symbol string The feed symbol.
    state string or null live, degraded, halted or stale, by the quorum rules. null before the first update.
    price, conf decimal string or null The node's own price and confidence.
    deviation_bps decimal string or null The node's price against the median, in signed basis points. null without a median.
    publish_time_ns string or null When the node signed its latest update.
    seq string or null The sequence number of that update.

    The report is for monitoring; the quorum alone decides a price. The delivery times compare the node clock with the proxy clock, so they are exact only with clocks in sync.

    frame

    One node's signed price frame, byte for byte, for a client that verifies the nodes itself. The proxy sends it for a feed in frames, each time the SDK client inside the proxy accepts a frame of that feed. The catalog's frames lists the feeds that the proxy forwards. A proxy that runs its archive in the same process forwards no frames: its catalog's frames is empty, and a subscription puts each name in unknown.

    json
    {
      "type": "frame",
      "symbol": "CRYPTO.BTC/USD",
      "node": "0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a",
      "kind": "price",
      "bytes": "0x0119e7e3…",
      "received_ns": "1791469482805717000"
    }
    Field Type Contents
    symbol string The feed.
    node string The node that signed it, as the proxy's SDK recovered it. Verify it yourself all the same.
    kind string price.
    bytes string The 182-byte frame as 0x hex: type, signer hint, the 96 signed bytes, and the signature.
    received_ns string When the proxy received it, unix nanoseconds.

    The JavaScript SDK's Verifier checks the signature against the registry from /v1/registry and resolves the price across the nodes with the rules of the Rust SDK. Verify the nodes yourself has the recipe. The frames of one feed cost about one message per node each second.

    pong

    json
    { "type": "pong", "id": 1 }
    Field Contents
    type "pong"
    id The id of the ping, or null if the ping had none.

    error

    json
    { "type": "error", "code": "rate_limited", "message": "at most 10 messages a second" }
    Field Contents
    type "error"
    code A stable code. See Limits and errors.
    message Text for a person. Do not parse it.

    Keep a book

    The proxy builds its own snapshot and delta stream for each book, from the freshest valid book of one node.

    1. Subscribe to the book. The first book message after subscribed is a snapshot.
    2. On a snapshot, clear the book and load its levels. Keep its seq.
    3. On a delta, check that seq is the kept seq plus 1. Then set the new size of each level, or remove the level when the size is "0". Keep the new seq.
    4. On a gap in seq, drop the book and ignore deltas until the next snapshot. Send unsubscribe and then subscribe for the book: the proxy answers a subscribe with a fresh snapshot.
    5. On available: false, show that there is no book. A later snapshot with available: true brings the book back.

    The seq belongs to the proxy, not to a node. The proxy sends a snapshot only at these times:

    • when a client subscribes to the book;
    • when the source node changes, because two nodes' books are not deltas of each other;
    • when the queue of a slow client for the book fills: the queue becomes one snapshot;
    • when the book becomes unavailable, and when it comes back.

    The proxy compares each book at most every book_interval_ms (100 ms by default) and sends a delta only when a level changed. It sends no periodic snapshot, so after a gap you must ask for one.

    Prices and venue reports

    • Each socket has one slot for each price feed, one for each pair of venue feed and node, and one for the node reports. A newer message replaces the one that waits, so a slow client gets the newest state, not a backlog.
    • You observe state, not transitions. Read status on each message.
    • The proxy resolves each price feed again every second. A silent upstream shows as halted, not as the last good price.
    • The proxy does not send a message again when its content is the same as the last one. Use publish_time_ns for the age of a price, not the time of the message.
    • The venue reports and the funding of a node that leaves the registry go. A new subscriber does not get them.

    Limits and errors

    The socket is open to anyone, so these limits bound the cost of one client. The operator sets them in [limits]. The values below are the defaults.

    Limit Config key Default When a client passes it
    Open sockets, in total max_connections 1024 HTTP 503 at connect, busy, Retry-After: 5
    Open sockets from one IP address connections_per_ip 8 HTTP 429 at connect, rate_limited, Retry-After: 60
    New sockets from one IP address each minute connects_per_minute 30 HTTP 429 at connect, rate_limited, Retry-After: 60
    Messages from one socket each second, pings and pongs too messages_per_second 10 Error rate_limited, then the proxy closes the socket
    GET requests from one IP address to /v1/catalog, /v1/registry, /v1/nodes, /v1/canister/history, /v1/arbitrage/history, /v1/nodes/history, /v1/carry/hourly and /v1/carry/settled each minute, in total routes_per_minute 120 HTTP 429, rate_limited, Retry-After: 60
    Subscriptions on one socket max_subscriptions 256 Error too_many_subscriptions. Nothing changes.
    Book messages that wait, for one book max_book_queue 64 The queue becomes one snapshot
    Size of one client message fixed 64 KiB Error bad_request, then the proxy closes the socket
    Replies that wait, when the client does not read fixed 64 The proxy closes the socket
    Time for one batch of messages to send fixed 30 s The proxy closes the socket
    Time with no message from the client, pongs included fixed 75 s The proxy closes the socket

    Each limit is more than 0. An IPv6 address counts by its /64. The proxy pings each socket every 30 s, and a browser answers each ping by itself, so an open page never reaches the 75 s limit.

    The live boards /v1/carry, /v1/arbitrage and /v1/canister do not count against routes_per_minute. /v1/history and /v1/carry/gap use the [history] limits instead. See /v1/history.

    Error codes:

    Code Cause The socket
    bad_request The message is not valid JSON, has an unknown op, or has an unknown field. Stays open
    bad_request The message is binary, or larger than 64 KiB. Closes
    rate_limited More than messages_per_second messages in one second. Closes
    too_many_subscriptions The request would pass max_subscriptions. Stays open
    internal The proxy cannot encode a message. This is a bug in the proxy. Stays open

    A refused HTTP request has the same error body, with the codes bad_request, not_found, rate_limited, busy and unavailable.

    A browser WebSocket does not show the HTTP status of a refused upgrade, so a refused connect looks like a socket that closes. Wait before you connect again, and wait longer after each failure.

    Behind a reverse proxy, the per-IP limits use the last X-Forwarded-For entry when the operator sets trust_forwarded_for.

    A browser client

    The JavaScript SDK subscribes, keeps each book from its snapshot and deltas, and connects again after a close. Use it in a browser or in Node.js. Its source shows the protocol without a library.