{"openapi":"3.1.0","info":{"title":"ArbitrageX API","version":"1.0.0","summary":"Live crypto arbitrage routes, funding, listings, notices and the Proof Log.","description":"Market data only. ArbitrageX never trades, never holds funds and never asks for exchange keys.\n\nThe API is on VIP Quant and the trial. Create a key in Settings and send it as `X-API-Key`. Each key gets 120 requests a minute, and up to 3 open sockets.\n\nLive updates come over a websocket, `wss://api.arbitragex.io/v1/stream`, with the same header: a `snapshot` first, then `upsert`, `remove` and `health` messages. See https://arbitragex.io/docs/api#stream.\n\n`/v1/stream?topic=events` carries prediction market routes instead, on the same key and limits: a `snapshot`, then `upsert` and `remove`, and `signal` messages with odds moves and big trades.","contact":{"name":"ArbitrageX","url":"https://arbitragex.io/docs/api"}},"externalDocs":{"description":"Guide and examples","url":"https://arbitragex.io/docs/api"},"servers":[{"url":"https://api.arbitragex.io"}],"security":[{"apiKey":[]}],"tags":[{"name":"Opportunities","description":"Routes, listings and exchange notices."},{"name":"Funding","description":"Perp funding rates now and over 30 days."},{"name":"Markets","description":"Volume, open interest and fees."},{"name":"History","description":"Spreads over time and closed opportunities."},{"name":"Prediction markets","description":"Routes on Polymarket, Polymarket US and Kalshi, live and ended."}],"paths":{"/v1/opportunities":{"get":{"operationId":"listOpportunities","summary":"Live opportunities","description":"Every route on the feed right now, as the plan sees it. Reading it often is fine; the stream is better past a few times a minute.","tags":["Opportunities"],"parameters":[{"name":"strategy","in":"query","description":"`all`, the default, or one trade type.","schema":{"type":"string","enum":["all","spot","spot_perp","perp_perp","funding_spread","carry","basis","triangular"]}}],"responses":{"200":{"description":"The feed.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Opportunity"}},"delayedMs":{"type":"number","description":"0 on a live plan."}},"required":["rows","delayedMs"]}}}},"400":{"description":"An unknown strategy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/opportunities\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/opportunities\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"][:5]:\n    print(row[\"coin\"], row[\"buy\"][\"venue\"], row[\"sell\"][\"venue\"], row[\"netBps\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/opportunities\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows.slice(0, 5)) console.log(row.coin, row.buy.venue, row.sell.venue, row.netBps);"}]}},"/v1/listings":{"get":{"operationId":"listListings","summary":"New listings","description":"Markets first seen in the last 72 hours, newest first, and listings exchanges have announced but don't list yet.","tags":["Opportunities"],"responses":{"200":{"description":"Listings.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Listing"}},"upcoming":{"type":"array","items":{"$ref":"#/components/schemas/Upcoming"}},"delayedMs":{"type":"number"}},"required":["rows","upcoming","delayedMs"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/listings\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/listings\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"]:\n    print(row[\"venue\"], row[\"kind\"], row[\"coin\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/listings\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows) console.log(row.venue, row.kind, row.coin);"}]}},"/v1/notices":{"get":{"operationId":"listNotices","summary":"Exchange notices","description":"Delistings, deposit and withdrawal suspensions, maintenance and announced listings still in effect, newest first. The same for every plan.","tags":["Opportunities"],"responses":{"200":{"description":"Notices.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/Notice"}}},"required":["rows"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/notices\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/notices\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"]:\n    print(row[\"venue\"], row[\"kind\"], row[\"coins\"], row[\"title\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/notices\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows) console.log(row.venue, row.kind, row.coins, row.title);"}]}},"/v1/funding":{"get":{"operationId":"listFunding","summary":"Funding rates","description":"Every perp's current funding rate, per interval and annualised.","tags":["Funding"],"responses":{"200":{"description":"Rates.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/FundingRow"}}},"required":["rows"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/funding\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/funding\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\ntop = sorted(data[\"rows\"], key=lambda r: -abs(r[\"aprPct\"]))[:5]\nfor row in top:\n    print(row[\"coin\"], row[\"venue\"], row[\"aprPct\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/funding\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nconst top = [...data.rows].sort((a, b) => Math.abs(b.aprPct) - Math.abs(a.aprPct)).slice(0, 5);\nfor (const row of top) console.log(row.coin, row.venue, row.aprPct);"}]}},"/v1/funding/history":{"get":{"operationId":"fundingHistory","summary":"Funding history","description":"One coin's funding settlements over the last 30 days, oldest first. A gap is never filled in.","tags":["Funding"],"parameters":[{"name":"coin","in":"query","required":true,"description":"The coin, in any case.","schema":{"type":"string"},"example":"BTC"}],"responses":{"200":{"description":"Settlements.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingHistory"}}}},"400":{"description":"No coin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/funding/history?coin=BTC\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/funding/history?coin=BTC\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"]:\n    print(row[\"venue\"], len(row[\"points\"]), \"settlements\")"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/funding/history?coin=BTC\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows) console.log(row.venue, row.points.length, \"settlements\");"}]}},"/v1/premiums":{"get":{"operationId":"listPremiums","summary":"Regional premiums","description":"Each coin's premium in each local currency over the middle USDT price on order book venues, priced through each venue's own USDT book, with each currency's index and its 24 hours of 5-minute means. With coin, that coin's rows only, each with its own 24 hours.","tags":["Funding"],"parameters":[{"name":"coin","in":"query","required":false,"description":"One coin, in any case.","schema":{"type":"string"},"example":"BTC"}],"responses":{"200":{"description":"Premiums.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"updatedMs":{"type":"integer","format":"int64","description":"When they were worked out. Unix ms."},"bucketMs":{"type":"number","description":"Length of one history point, in ms."},"fiats":{"type":"array","items":{"type":"object","properties":{"fiat":{"type":"string"},"premiumBps":{"type":["number","null"]},"coins":{"type":"integer"},"history":{"type":"array","items":{"type":"array","prefixItems":[{"type":"integer"},{"type":"number"}],"description":"[unix ms, bps]"}}},"required":["fiat","premiumBps","coins","history"]}},"rows":{"type":"array","items":{"type":"object","description":"coin, fiat, premiumBps, avg24hBps, referenceUsdt, referenceVenues, venues[], verified, and history with coin."}}},"required":["updatedMs","bucketMs","fiats","rows"]}}}},"400":{"description":"A coin name too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/premiums\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/premiums\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"][:5]:\n    print(row[\"coin\"], row[\"fiat\"], row[\"premiumBps\"], row[\"verified\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/premiums\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows.slice(0, 5)) console.log(row.coin, row.fiat, row.premiumBps, row.verified);"}]}},"/v1/markets":{"get":{"operationId":"listMarkets","summary":"Volume and open interest","description":"One row per market, busiest first, as arrays: [venue, kind, coin, symbol, volumeUsd, oiUsd]. Null where the venue publishes no figure.","tags":["Markets"],"responses":{"200":{"description":"Markets.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"$ref":"#/components/schemas/Kind"},{"type":"string"},{"type":"string"},{"type":["number","null"]},{"type":["number","null"]}]}}},"required":["rows"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/markets\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/markets\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor venue, kind, coin, symbol, volume, oi in data[\"rows\"][:5]:\n    print(venue, kind, symbol, volume, oi)"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/markets\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const [venue, kind, , symbol, volume, oi] of data.rows.slice(0, 5)) console.log(venue, kind, symbol, volume, oi);"}]}},"/v1/fees":{"get":{"operationId":"listFees","summary":"Taker fees","description":"Each venue's published base taker fee, the rate net figures are priced at. Re-price a route at your own fees with the formula on /docs/api#fees.","tags":["Markets"],"responses":{"200":{"description":"Fees.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/VenueFee"}}},"required":["rows"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/fees\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/fees\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"]:\n    print(row[\"venue\"], row[\"spotTakerBps\"], row[\"perpTakerBps\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/fees\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows) console.log(row.venue, row.spotTakerBps, row.perpTakerBps);"}]}},"/v1/reliability":{"get":{"operationId":"listReliability","summary":"Venue reliability","description":"Each venue's track record over the last 7 and 30 UTC days, from watched time only: uptime, outages, how fresh its prices were, the share of its routes that lasted 30 seconds, and wallet list changes. A figure with too little behind it is null, never a guess.","tags":["Markets"],"responses":{"200":{"description":"Records, in roster order.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"atMs":{"type":"integer","format":"int64","description":"When they were worked out. Unix ms."},"rows":{"type":"array","items":{"type":"object","description":"venue, online, sinceMs, watchedMs7d, watchedMs30d, uptime7d, uptime30d, outages7d, medianFreshMs ([from, to] ms bucket), routes30d, heldShare30d, walletChanges7d, walletChanges30d, walletCoins, publishedFees."}}},"required":["atMs","rows"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/reliability\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/reliability\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"][:5]:\n    print(row[\"venue\"], row[\"online\"], row[\"uptime7d\"], row[\"heldShare30d\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/reliability\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows.slice(0, 5)) console.log(row.venue, row.online, row.uptime7d, row.heldShare30d);"}]}},"/v1/spread/{id}":{"get":{"operationId":"routeSpread","summary":"A route's spread over time","description":"Net bps over time for one route. Without a range, the latest row, up to 72 points. With `from` or `to`, every row in that stretch, at most 2,000 points, keeping the peaks.","tags":["History"],"parameters":[{"name":"id","in":"path","required":true,"description":"A route id, URL-encoded.","schema":{"type":"string"},"example":"BTC|Binance:spot|OKX:perp"},{"name":"from","in":"query","description":"Earliest point, unix ms.","schema":{"type":"integer","format":"int64"}},{"name":"to","in":"query","description":"Latest point, unix ms.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Points.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"$ref":"#/components/schemas/SpreadPoint"}},"historyFromMs":{"type":"integer","format":"int64","description":"Where this key's history starts, 0 for no limit. Unix ms."}},"required":["points","historyFromMs"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/spread/BTC%7CBinance%3Aspot%7COKX%3Aperp\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/spread/BTC%7CBinance%3Aspot%7COKX%3Aperp\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nprint(len(data[\"points\"]), \"points, peak\", max((p[\"netBps\"] for p in data[\"points\"]), default=None))"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/spread/BTC%7CBinance%3Aspot%7COKX%3Aperp\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nconsole.log(data.points.length, \"points, peak\", Math.max(...data.points.map((p) => p.netBps)));"}]}},"/v1/proof":{"get":{"operationId":"listProof","summary":"Proof Log","description":"Closed opportunities that lasted at least 30 seconds, newest first, with a cursor for the next page.","tags":["History"],"parameters":[{"name":"limit","in":"query","description":"Rows per page, 50 by default, at most 500.","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"from","in":"query","description":"Earliest close, unix ms.","schema":{"type":"integer","format":"int64"}},{"name":"to","in":"query","description":"Latest close, unix ms.","schema":{"type":"integer","format":"int64"}},{"name":"coin","in":"query","description":"One coin, exact in any case.","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"`next` from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/ProofRow"}},"next":{"type":["string","null"],"description":"Null on the last page."},"historyFromMs":{"type":"integer"}},"required":["rows","next","historyFromMs"]}}}},"400":{"description":"A bad cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/proof?limit=100\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/proof?limit=100\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"][:5]:\n    print(row[\"coin\"], row[\"buyVenue\"], row[\"sellVenue\"], row[\"peakNetBps\"])\nprint(\"next page:\", data[\"next\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/proof?limit=100\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows.slice(0, 5)) console.log(row.coin, row.buyVenue, row.sellVenue, row.peakNetBps);\nconsole.log(\"next page:\", data.next);"}]}},"/v1/events":{"get":{"operationId":"listEventRoutes","summary":"Prediction market routes","description":"Sets of contracts on Polymarket, Polymarket US and Kalshi that cost less after fees than the $1 they pay at settlement, best net first, as the plan sees them. Every `cross` route is Caution: each exchange settles by its own rules, attached in `rules`.","tags":["Prediction markets"],"parameters":[{"name":"kind","in":"query","description":"`all`, the default, or one route kind.","schema":{"type":"string","enum":["all","basket","cross"]}}],"responses":{"200":{"description":"The routes.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/EventRoute"}},"delayedMs":{"type":"number","description":"0 on a live plan."}},"required":["rows","delayedMs"]}}}},"400":{"description":"An unknown kind.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/events\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/events\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"][:5]:\n    print(row[\"kind\"], row[\"title\"], row[\"netBps\"], row[\"days\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/events\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows.slice(0, 5)) console.log(row.kind, row.title, row.netBps, row.days);"}]}},"/v1/events/proof":{"get":{"operationId":"listEventProof","summary":"Prediction market Proof Log","description":"Prediction market routes that ended after lasting at least 30 seconds, newest first, with a cursor for the next page. Kept a year.","tags":["Prediction markets"],"parameters":[{"name":"limit","in":"query","description":"Rows per page, 50 by default, at most 500.","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"from","in":"query","description":"Earliest close, unix ms.","schema":{"type":"integer","format":"int64"}},{"name":"to","in":"query","description":"Latest close, unix ms.","schema":{"type":"integer","format":"int64"}},{"name":"kind","in":"query","description":"`all`, the default, or one route kind.","schema":{"type":"string","enum":["all","basket","cross"]}},{"name":"cursor","in":"query","description":"`next` from the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/EventProofRow"}},"next":{"type":["string","null"],"description":"Null on the last page."},"historyFromMs":{"type":"integer"}},"required":["rows","next","historyFromMs"]}}}},"400":{"description":"A bad cursor or an unknown kind.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/events/proof?limit=100\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/events/proof?limit=100\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"][:5]:\n    print(row[\"kind\"], row[\"title\"], row[\"venues\"], row[\"peakNetBps\"])\nprint(\"next page:\", data[\"next\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/events/proof?limit=100\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows.slice(0, 5)) console.log(row.kind, row.title, row.venues, row.peakNetBps);\nconsole.log(\"next page:\", data.next);"}]}},"/v1/events/markets":{"get":{"operationId":"listEventMarkets","summary":"Prediction market browser","description":"Every open market on Polymarket, Polymarket US and Kalshi, routes or not, joined into events so each venue's odds for the same outcome stand side by side. Odds are YES's probability, 0 to 1. With `group`, one event whole; with `markets`, the events holding those markets. Live on every plan.","tags":["Prediction markets"],"parameters":[{"name":"q","in":"query","description":"Every word in the title, outcomes or questions. At most 100 characters.","schema":{"type":"string","maxLength":100}},{"name":"category","in":"query","description":"One category.","schema":{"type":"string","enum":["politics","sports","crypto","economy","culture","tech","world","weather"]}},{"name":"venue","in":"query","description":"Events on this venue.","schema":{"type":"string","enum":["Polymarket","Polymarket US","Kalshi"]}},{"name":"days","in":"query","description":"An outcome resolving within this many days.","schema":{"type":"integer","minimum":1,"maximum":365}},{"name":"sort","in":"query","description":"`volume`, the default, `closing` or `movers`.","schema":{"type":"string","enum":["volume","closing","movers"]}},{"name":"limit","in":"query","description":"Rows per page, 25 by default, at most 50.","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","description":"`next` from the previous page.","schema":{"type":"string"}},{"name":"group","in":"query","description":"One event's id, for all its outcomes.","schema":{"type":"string"}},{"name":"markets","in":"query","description":"Up to 50 `<venue>|<market id>`, comma separated.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of events.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","description":"id, title, category, venues, resolvesMs, lineCount, and lines: { outcome, quotes: { venue, marketId, question, prob, quotedMs, change24h, volume24h, volumeUnit, resolvesMs, url }[] }[]. A row carries up to 6 outcomes."}},"next":{"type":["string","null"],"description":"Null on the last page."},"total":{"type":"integer"},"builtMs":{"type":"integer","format":"int64","description":"When the list was built. Unix ms."}},"required":["rows","next","total","builtMs"]}}}},"400":{"description":"A bad parameter or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/events/markets?category=crypto&sort=closing\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/events/markets?category=crypto&sort=closing\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor row in data[\"rows\"][:5]:\n    print(row[\"title\"], [(q[\"venue\"], q[\"prob\"]) for q in row[\"lines\"][0][\"quotes\"]])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/events/markets?category=crypto&sort=closing\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const row of data.rows.slice(0, 5)) console.log(row.title, row.lines[0].quotes.map((q) => [q.venue, q.prob]));"}]}},"/v1/events/history":{"get":{"operationId":"eventOddsHistory","summary":"A market's odds over time","description":"YES's probability over a day, week or month, oldest first: from the venue where it keeps a history, else sampled by us.","tags":["Prediction markets"],"parameters":[{"name":"venue","in":"query","required":true,"description":"The market's venue.","schema":{"type":"string","enum":["Polymarket","Polymarket US","Kalshi"]}},{"name":"market","in":"query","required":true,"description":"The market id, as in a quote's `marketId`.","schema":{"type":"string"}},{"name":"range","in":"query","description":"`1d`, `1w` or `1m`.","schema":{"type":"string","enum":["1d","1w","1m"]}}],"responses":{"200":{"description":"Points.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"type":"array","prefixItems":[{"type":"integer"},{"type":"number"}],"description":"[unix ms, probability]"}},"source":{"type":"string","enum":["venue","engine"]},"fromMs":{"type":"integer","format":"int64","description":"Where the points start. Unix ms."}},"required":["points","source","fromMs"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"A market not open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"502":{"description":"The venue couldn't be read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/events/history\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/events/history\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nprint(len(data[\"points\"]), \"points from\", data[\"source\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/events/history\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nconsole.log(data.points.length, \"points from\", data.source);"}]}},"/v1/events/holders":{"get":{"operationId":"eventHolders","summary":"A Polymarket market's holders and big bets","description":"The top 10 holders of each outcome and the latest 20 bets of $1,000 or more, as Polymarket's public data states them.","tags":["Prediction markets"],"parameters":[{"name":"market","in":"query","required":true,"description":"Polymarket's condition id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Holders and bets.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per 60-second window."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Left in this window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets."}},"content":{"application/json":{"schema":{"type":"object","properties":{"holders":{"type":"array","items":{"type":"object","description":"address, name, side (yes or no), shares, followable."}},"bets":{"type":"array","items":{"type":"object","description":"address, name, side, buy, shares, price, usd, atMs, followable."}}},"required":["holders","bets"]}}}},"401":{"description":"Unknown or revoked key, or a plan without the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"A market not open on Polymarket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the key's limit, or over 3 open sockets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"Keys can't be checked right now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}}},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -s -H \"X-API-Key: $ARBITRAGEX_KEY\" \"https://api.arbitragex.io/v1/events/holders\""},{"lang":"Python","label":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://api.arbitragex.io/v1/events/holders\",\n    headers={\"X-API-Key\": os.environ[\"ARBITRAGEX_KEY\"]},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()\nfor h in data[\"holders\"][:5]:\n    print(h[\"side\"], h[\"name\"] or h[\"address\"], h[\"shares\"])"},{"lang":"JavaScript","label":"JavaScript","source":"const res = await fetch(\"https://api.arbitragex.io/v1/events/holders\", {\n  headers: { \"X-API-Key\": process.env.ARBITRAGEX_KEY },\n});\nif (!res.ok) throw new Error((await res.json()).error);\nconst data = await res.json();\nfor (const h of data.holders.slice(0, 5)) console.log(h.side, h.name ?? h.address, h.shares);"}]}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"axk_ plus 43 characters, from Settings."}},"schemas":{"Kind":{"type":"string","enum":["spot","perp"]},"Strategy":{"type":"string","enum":["spot","spot_perp","perp_perp","funding_spread","carry","basis","triangular"]},"Settle":{"type":"string","enum":["transfer","close","funding","instant"],"description":"How the route pays: the coin moves, a hedge closes, funding is earned, or every leg fills at once."},"NoticeKind":{"type":"string","enum":["delisting","suspension","maintenance","resumed","listing","other"]},"Status":{"type":"string","enum":["verified","caution"],"description":"Verified passed every check. Caution says why in `reasons`."},"Transfer":{"type":"string","enum":["open","closed","unknown","not_needed"]},"NetUsd":{"type":"object","properties":{"100":{"type":["number","null"]},"1000":{"type":["number","null"]},"10000":{"type":["number","null"]},"100000":{"type":["number","null"]},"1000000":{"type":["number","null"]}},"required":["100","1000","10000","100000","1000000"],"description":"Net dollars at each trade size, at the average price across every level. Null when the book can't fill it."},"Leg":{"type":"object","properties":{"venue":{"type":"string","description":"The exchange, as we name it.","examples":["Binance"]},"kind":{"$ref":"#/components/schemas/Kind"},"symbol":{"type":"string","description":"The exchange's own symbol."},"price":{"type":"number","description":"Ask on the buy leg, bid on the sell leg, in USDT per whole coin."},"sizeUsd":{"type":"number","description":"USD available at the depth read."},"ageMs":{"type":"number","description":"Since the exchange last updated this quote."},"fundingBps8h":{"type":["number","null"],"description":"Perps only, normalised to 8 hours."},"nextFundingMs":{"type":["integer","null"],"description":"Perps only, the next settlement. Null where the venue publishes no time."},"url":{"type":"string","description":"The exchange's trade page.","format":"uri"},"takerBps":{"type":"number","description":"The taker fee this leg is priced at."},"needs":{"type":"string","description":"What placing this leg takes, in plain words."}},"required":["venue","kind","symbol","price","sizeUsd","ageMs","fundingBps8h","nextFundingMs","url","takerBps","needs"]},"NewListing":{"type":"object","properties":{"venue":{"type":"string"},"kind":{"$ref":"#/components/schemas/Kind"},"symbol":{"type":"string"},"listedMs":{"type":"integer","format":"int64","description":"When we first saw it. Unix ms."}},"required":["venue","kind","symbol","listedMs"]},"RouteNotice":{"type":"object","properties":{"venue":{"type":"string"},"kind":{"$ref":"#/components/schemas/NoticeKind"},"publishedMs":{"type":"integer","format":"int64","description":"The exchange's own time. Unix ms."}},"required":["venue","kind","publishedMs"]},"Opportunity":{"type":"object","properties":{"id":{"type":"string","description":"Stable route id.","examples":["BTC|Binance:spot|OKX:perp"]},"coin":{"type":"string"},"strategy":{"$ref":"#/components/schemas/Strategy"},"buy":{"$ref":"#/components/schemas/Leg"},"sell":{"$ref":"#/components/schemas/Leg"},"grossBps":{"type":"number","description":"Before all costs."},"netBps":{"type":"number","description":"After fees and transfer, at $1,000 or the size that earns most."},"netUsd":{"$ref":"#/components/schemas/NetUsd"},"maxSizeUsd":{"type":"number","description":"Largest size with positive net."},"exitBps":{"type":["number","null"],"description":"Cost to reverse today. Null when unknown."},"transfer":{"$ref":"#/components/schemas/Transfer"},"network":{"type":["string","null"],"description":"Cheapest shared open chain."},"status":{"$ref":"#/components/schemas/Status"},"reasons":{"type":"array","items":{"type":"string"}},"firstSeenMs":{"type":"integer","format":"int64","description":"First seen. Unix ms."},"updatedMs":{"type":"integer","format":"int64","description":"Last updated. Unix ms."},"spark":{"type":"array","items":{"type":"number"}},"bestSizeUsd":{"type":"number","description":"The size that earns the most dollars at published fees."},"bestNetUsd":{"type":"number","description":"What that size nets."},"settle":{"$ref":"#/components/schemas/Settle"},"fundingNext8hBps":{"type":["number","null"],"description":"Funding over the next 8 hours, held routes only."},"fundingNextMs":{"type":["integer","null"],"description":"The soonest settlement across both legs. Unix ms."},"dex":{"type":"boolean","const":true,"description":"A leg is on a swap venue."},"hedgeable":{"type":"boolean","const":true,"description":"A spot route whose coin has a live perp, so it can be shorted while it moves."},"transferSec":{"type":"number","description":"Estimated transfer time on `network`."},"verdict":{"type":"string","enum":["can_finish","too_slow"]},"newListing":{"oneOf":[{"$ref":"#/components/schemas/NewListing"},{"type":"null"}]},"notice":{"$ref":"#/components/schemas/RouteNotice"}},"required":["id","coin","strategy","buy","sell","grossBps","netBps","netUsd","maxSizeUsd","exitBps","transfer","network","status","reasons","firstSeenMs","updatedMs","spark","settle","fundingNext8hBps","fundingNextMs","bestSizeUsd","bestNetUsd"]},"Listing":{"type":"object","properties":{"venue":{"type":"string"},"kind":{"$ref":"#/components/schemas/Kind"},"coin":{"type":"string"},"listedMs":{"type":"integer","format":"int64","description":"When we first saw it. Unix ms."}},"required":["venue","kind","coin","listedMs"]},"Upcoming":{"type":"object","properties":{"venue":{"type":"string"},"market":{"oneOf":[{"$ref":"#/components/schemas/Kind"},{"type":"null"}]},"coin":{"type":"string"},"title":{"type":"string","description":"The exchange's own words."},"url":{"type":"string","format":"uri"},"announcedMs":{"type":"integer","format":"int64","description":"Announced. Unix ms."},"startsMs":{"type":["integer","null"],"description":"When trading starts, only when the title states it in full. Unix ms."}},"required":["venue","market","coin","title","url","announcedMs","startsMs"]},"Notice":{"type":"object","properties":{"seq":{"type":"integer","description":"Counts up and never repeats."},"venue":{"type":"string"},"kind":{"$ref":"#/components/schemas/NoticeKind"},"market":{"oneOf":[{"$ref":"#/components/schemas/Kind"},{"type":"null"}]},"coins":{"type":"array","items":{"type":"string"}},"title":{"type":"string","description":"The exchange's own words."},"url":{"type":"string","format":"uri"},"publishedMs":{"type":"integer","format":"int64","description":"The exchange's own time. Unix ms."},"seenMs":{"type":"integer","format":"int64","description":"When we first read it. Unix ms."}},"required":["seq","venue","kind","market","coins","title","url","publishedMs","seenMs"]},"FundingRow":{"type":"object","properties":{"coin":{"type":"string"},"venue":{"type":"string"},"symbol":{"type":"string"},"ratePct":{"type":"number","description":"Per interval."},"hours":{"type":"number","description":"Interval length."},"aprPct":{"type":"number","description":"Annualised."},"nextFundingMs":{"type":["integer","null"],"description":"Next settlement, unix ms. Null where the venue publishes no time."},"realised7dPct":{"type":["number","null"],"description":"Kept settlements over the last 7 days, summed per interval, percent a short was paid. Null with none kept."},"realised30dPct":{"type":["number","null"],"description":"The same over the last 30 days."},"settled7d":{"type":"integer","description":"Settlements in the 7-day sum. Fewer than the interval allows is a gap, never filled in."},"settled30d":{"type":"integer","description":"Settlements in the 30-day sum."}},"required":["coin","venue","symbol","ratePct","hours","aprPct","nextFundingMs","realised7dPct","realised30dPct","settled7d","settled30d"]},"FundingHistory":{"type":"object","properties":{"coin":{"type":"string"},"fromMs":{"type":"integer","format":"int64","description":"Start of the 30 days. Unix ms."},"rows":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"string"},"symbol":{"type":"string"},"hours":{"type":"number"},"points":{"type":"array","items":{"type":"array","prefixItems":[{"type":"integer"},{"type":"number"}],"description":"[unix ms, ratePct]"}}},"required":["venue","symbol","hours","points"]}}},"required":["coin","fromMs","rows"]},"VenueFee":{"type":"object","properties":{"venue":{"type":"string"},"spotTakerBps":{"type":"number","description":"Published base taker fee, per fill."},"perpTakerBps":{"type":"number"}},"required":["venue","spotTakerBps","perpTakerBps"]},"SpreadPoint":{"type":"object","properties":{"t":{"type":"integer","format":"int64","description":"Time. Unix ms."},"netBps":{"type":"number"}},"required":["t","netBps"]},"ProofRow":{"type":"object","properties":{"id":{"type":"string"},"coin":{"type":"string"},"strategy":{"$ref":"#/components/schemas/Strategy"},"buyVenue":{"type":"string"},"sellVenue":{"type":"string"},"peakNetBps":{"type":"number","description":"The highest it reached. Nobody trades the peak, so don't sum it."},"maxSizeUsd":{"type":"number"},"openNetBps":{"type":["number","null"]},"openSizeUsd":{"type":["number","null"]},"closeNetBps":{"type":["number","null"]},"closeSizeUsd":{"type":["number","null"]},"status":{"$ref":"#/components/schemas/Status"},"openedMs":{"type":"integer","format":"int64","description":"Opened. Unix ms."},"closedMs":{"type":"integer","format":"int64","description":"Closed. Unix ms."}},"required":["id","coin","strategy","buyVenue","sellVenue","peakNetBps","maxSizeUsd","openNetBps","openSizeUsd","closeNetBps","closeSizeUsd","status","openedMs","closedMs"]},"EventVenue":{"type":"string","enum":["Polymarket","Polymarket US","Kalshi"]},"EventKind":{"type":"string","enum":["basket","cross"],"description":"`basket`: YES on every outcome of one event on one exchange. `cross`: YES on one exchange and NO on the other."},"EventLeg":{"type":"object","properties":{"venue":{"$ref":"#/components/schemas/EventVenue"},"marketId":{"type":"string","description":"The exchange's own market id."},"outcome":{"type":"string","description":"What YES is on this market."},"side":{"type":"string","enum":["yes","no"],"description":"The side bought. Every leg is a buy."},"avgPrice":{"type":"number","description":"Dollars a contract at the shown size, before fees."},"size":{"type":"number","description":"Contracts at the shown size, one a set."},"url":{"type":"string","description":"The event's page on the exchange.","format":"uri"}},"required":["venue","marketId","outcome","side","avgPrice","size","url"]},"EventRule":{"type":"object","properties":{"venue":{"$ref":"#/components/schemas/EventVenue"},"text":{"type":"string","description":"The exchange's settlement rules, at most 2,000 characters."},"source":{"type":["string","null"],"description":"Settlement sources the rules name, as sites. Null when they name none."}},"required":["venue","text","source"]},"EventRoute":{"type":"object","properties":{"id":{"type":"string","description":"Stable while its legs stand.","examples":["basket:0f3c5e1a9b7d2c4e6f8a0b1c2d3e4f5a"]},"kind":{"$ref":"#/components/schemas/EventKind"},"title":{"type":"string"},"legs":{"type":"array","items":{"$ref":"#/components/schemas/EventLeg"}},"costPerSet":{"type":"number","description":"Dollars one set costs at the shown size, fees in. A set pays $1."},"netBps":{"type":"number","description":"At $1,000, or where that loses, at the size that earns the most dollars."},"netUsd":{"$ref":"#/components/schemas/NetUsd"},"maxSizeUsd":{"type":"number","description":"The most that nets above zero."},"resolvesMs":{"type":"integer","format":"int64","description":"The latest leg's stated resolution. It can come later. Unix ms."},"days":{"type":"integer","description":"Whole days to resolvesMs, rounded up, at least 1."},"yearlyBps":{"type":"number","description":"netBps / days × 365, with no compounding."},"status":{"$ref":"#/components/schemas/Status"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/EventRule"}},"reasons":{"type":"array","items":{"type":"string"}},"firstSeenMs":{"type":"integer","format":"int64","description":"When this route opened. Unix ms."},"updatedMs":{"type":"integer","format":"int64","description":"Last change. Unix ms."}},"required":["id","kind","title","legs","costPerSet","netBps","netUsd","maxSizeUsd","resolvesMs","days","yearlyBps","status","rules","reasons","firstSeenMs","updatedMs"]},"EventProofRow":{"type":"object","properties":{"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/EventKind"},"title":{"type":"string"},"venues":{"type":"array","items":{"$ref":"#/components/schemas/EventVenue"}},"peakNetBps":{"type":"number","description":"The highest it reached. Nobody trades the peak, so don't sum it."},"maxSizeUsd":{"type":"number"},"closeNetBps":{"type":"number"},"status":{"$ref":"#/components/schemas/Status","description":"Caution if it was ever Caution."},"resolvesMs":{"type":"integer","format":"int64","description":"Stated resolution. Unix ms."},"openedMs":{"type":"integer","format":"int64","description":"Opened. Unix ms."},"closedMs":{"type":"integer","format":"int64","description":"Closed. Unix ms."}},"required":["id","kind","title","venues","peakNetBps","maxSizeUsd","closeNetBps","status","resolvesMs","openedMs","closedMs"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong, in English.","examples":["Rate limit reached."]}},"required":["error"]}}}}