Genesis Arbitrage

Genesis Arbitrage · · 13 min read

Crypto API: types of crypto market data APIs and how to choose one for trading

In short

  • A crypto API gives your code market data: prices, order books, funding rates, on-chain transactions and prediction market quotes. An exchange API covers one venue and takes orders with a key; a market data API merges many venues into one format.
  • Pick an API on nine criteria: venue and chain coverage, freshness, field normalization, deposit and withdrawal status, order book depth, rate limits, price, documentation and data terms of use.
  • Genesis API is a read-only REST API: CEX, DEX, on-chain, prediction markets and sportsbook surebets in one JSON format, with plans from $20 a month. It does not place orders.

A crypto API is a programming interface through which code reads crypto market data or sends orders to an exchange: prices, order books, funding rates, blockchain transactions, prediction market quotes. API types differ in scope: an exchange API knows one venue and takes orders with a key, a market data API merges many venues into one format, and an on-chain API reads the blockchain.

Types of crypto APIs

API typeWhat it givesWhen you need it
Exchange APIOne exchange's prices, order books and trades; orders with a keyTrading on that exchange, a pair's trade stream
Market data APIMany exchanges in one format, ready-made spreadsComparing exchanges, scanners, alerts
On-chain APITransactions, transfers, balances, contract eventsWhales, exchange flows, unlocks
DEX APIPool prices and liquidity, swaps, slippageTokens not on CEX, DEX – CEX setups
Derivatives dataFunding, open interest, futures pricesFunding arbitrage, position skew
Prediction market and odds APIsYES and NO prices, order books, bookmaker oddsPrediction market arbitrage, surebets

Exchange APIs

A crypto exchange API is one venue's interface, and it has two parts. The public part serves market data without a key: on Binance these endpoints have the NONE security type, and GET /api/v3/ticker/price returns a pair's price. The private part — orders, balances, trade history — needs an API key and a request signature; on Binance these are the TRADE and USER_DATA types (Binance docs).

Such an API covers one exchange: to compare a coin's price on 20 exchanges, you need 20 connections with different formats and limits.

Market data APIs

A market data API collects data from many exchanges, normalizes it and returns it in one request. The response already contains what merging venues takes: cross-exchange spreads, funding rates normalized to one period, open interest by exchange.

On-chain APIs

An on-chain API reads the blockchain: transactions, token transfers, address balances, smart contract events. The bottom layer is a network node: every Ethereum client speaks JSON-RPC, where eth_getBalance returns a balance in wei as a hex number and eth_getLogs returns contract events matching a filter.

A node doesn't know which addresses belong to an exchange, a team or a whale; indexers and on-chain analytics services add those labels. Which data a trader needs is covered in On-chain data API.

DEX APIs

A DEX API serves pool prices and liquidity on decentralized exchanges, swaps and slippage. The larger a swap is relative to pool liquidity, the more it moves the price, so a DEX – CEX setup needs slippage for your size, and new tokens need the token tax and a honeypot check. More in DEX API.

Derivatives data: funding and open interest

Perpetual futures call for the funding rate, open interest (the volume of open positions) and the futures price next to spot. Exchanges settle funding every 8, 4 or 1 hour, so rates are compared after normalizing them to one period. More in Funding rate API and Open interest API.

Prediction market and odds APIs

Prediction platforms serve YES and NO contract prices and order books. On Polymarket public market data needs no credentials, while an order needs authentication and a wallet signature (Polymarket docs).

Formats differ here too: Kalshi's order book holds only bids, and the YES ask is $1 minus the best NO bid, so a $0.56 NO bid means a $0.44 YES ask (Kalshi docs). Bookmaker odds are compared with YES and NO prices through implied probability — see Polymarket API and Kalshi API and Sports odds API.

REST and WebSocket

A REST API answers a request with a snapshot filtered your way, and you get updates by polling on a schedule.

A WebSocket keeps the connection open, and the server pushes every trade and order book change. In return you process the stream without gaps, reconnect after drops and rebuild the book from a snapshot plus updates, and Kalshi requires authentication to connect even for public channels. Sub-second reactions need a WebSocket; scanners and alerts across 20+ exchanges work over REST.

Genesis API is REST only, with no WebSocket and no webhooks: every request is a GET, responses are gzip-compressed JSON, and data refreshes every meta.freshness_sec seconds. Repeating an unfiltered full-set request with the previous ETag in If-None-Match returns a bodyless 304 when nothing has changed, and that response uses no quota. Polling patterns are in API polling best practices.

How to choose a crypto API: checklist

The first six criteria show up in a live API response; the rest are in the docs and pricing.

CriterionWhat to check
Venue and chain coverageYour exchanges, spot and futures, DEXes and chains
Freshness and latencyBuild time in the response, refresh step, order book age
Field normalizationConsistent tickers, units, percentages and time
Deposit and withdrawal statusDeposit and withdrawal flags per exchange and network
Order book depthExecution price for your size
Rate limits and quotasRequests per second, calls per period, what counts as a call
PricePlan or pay-per-call, what happens over the limit
Docs and OpenAPIRequest and response examples, a spec
Data terms of useWhether you can build your own product on the data

Coverage and freshness

Check coverage against your own list: if your bot works with MEXC and Gate, an API missing either one won't do. Data freshness is how many seconds have passed since the snapshot was built; latency is the whole path from a trade on the exchange to your code. On a minute-old snapshot a bot sees spreads that are already gone.

Field normalization

The same BTC/USDT pair is written differently across exchange APIs: BTCUSDT on Binance, BTC-USDT on OKX (the perpetual is BTC-USDT-SWAP), BTC_USDT on Gate. Binance returns prices as strings ("price": "4.00000200" in its docs example) and time in milliseconds. Your code has to handle each of these differences.

A market data API brings fields to one shape, as in this /funding/rates entry from the Genesis API docs:

{
  "coin": "TON",
  "exchanges": [
    {
      "exchange": "MEXC",
      "funding_pct": 0.02,
      "funding_8h_pct": 0.04,
      "next_payout": "00:00",
      "interval": "4h",
      "price": 2.184,
      "trade_url": "https://futures.mexc.com/exchange/TON_USDT"
    }
  ]
}

MEXC settles funding for this coin every 4 hours, and the 0.02% per-interval rate is normalized to 8 hours in funding_8h_pct: 0.02 × 8 / 4 = 0.04% (see Funding rates).

Deposit and withdrawal status

A cross-exchange spot setup is executable only if the coin can be withdrawn from the buy exchange and deposited on the sell exchange. On Binance network statuses come from GET /sapi/v1/capital/config/getall, a signed USER_DATA endpoint that needs your account's API key (Binance docs). In Genesis API the statuses arrive in every Spot – Spot row as withdraw_enabled_buy and deposit_enabled_sell (Spot — Spot docs).

Order book depth

The best-price spread shows the gap at the top of the book, while a $5,000 trade walks several levels of market depth. In the Genesis API docs example for /orderbooks/spreads/spot-futures, the BTC spread is 0.031% at best prices and 0.0202% after walking the books for $5,000. The Execution prices endpoint returns execution prices for $500–10,000; more in Crypto order book API.

Limits, price and documentation

Limits are counted differently. On Binance every endpoint has a weight, requests across many symbols weigh more, and an IP that keeps sending requests after a 429 gets banned for anywhere from 2 minutes to 3 days (Binance limits). For a data API, check the call quota, the per-second rate limit and what counts as a call: in Genesis API only a 200 response uses quota.

Pricing is either a plan with a quota or pay-per-call; find out what happens over the limit — a 429 error or extra charges. An OpenAPI spec is a machine-readable description of the API for generating a client and connecting AI agents, and the terms of use tell you whether you can build a product on the data and what you can't resell.

One-request check

This script pulls the full Spot – Spot set (available on every Genesis API plan) and uses one response to check coverage, snapshot age and the share of transferable setups:

import os
import time

import requests

BASE = "https://api.genesisarbitrage.com/v1"
HEADERS = {"X-API-Key": os.environ["GENESIS_API_KEY"]}

r = requests.get(BASE + "/arbitrage/spot-spot",
                 headers=HEADERS, timeout=15)
r.raise_for_status()
body = r.json()
rows, meta = body["data"], body["meta"]

# Coverage: which exchanges appear in the setups
venues = {x["exchange_buy"] for x in rows}
venues |= {x["exchange_sell"] for x in rows}
print("exchanges in response:", len(venues), sorted(venues))

# Freshness: snapshot age and the plan's refresh step
age = time.time() - meta["updated_at"]
print(f"snapshot {age:.0f} s old, plan step {meta['freshness_sec']} s")

# Transfer: withdrawals open on the buy side, deposits on the sell side
ok = [x for x in rows
      if x["withdraw_enabled_buy"] and x["deposit_enabled_sell"]]
print(f"transferable setups: {len(ok)} of {len(rows)}")

Retries on 429 and 503 come from the get_json function in Genesis API responses and errors. Then check prices and statuses of 3–5 setups against the exchanges via trade_url_buy and trade_url_sell.

Build it yourself or use a ready-made API

For one or two exchanges plus trading, your own code on their APIs is the natural choice. For 20 exchanges with spot and futures that means up to 40 market data connectors: on Binance, spot and USDⓈ-M futures are separate APIs, api.binance.com and fapi.binance.com. Each connector carries REST snapshots, a WebSocket stream with reconnects, its own limits and symbol format, and on top comes the merging: coins are matched by contract and network, since one ticker can be different tokens on different exchanges.

TaskYour own code on exchange APIsGenesis API
Placing ordersThe only way: the exchange trading APINo, read-only
Every trade of one pairExchange WebSocketNo, snapshots every 60–5 s
Spreads across 20+ exchangesUp to 40 connectors plus mergingOne request
Deposit and withdrawal statusAn endpoint per exchange, with a key on BinanceFields in the setup row
DEX, on-chain, prediction marketsNodes, indexers, platform APIsThe same JSON format

The approaches combine: a data API finds setups, and the trade is opened on the exchange by hand or through its trading API with a key that has no withdrawal rights (see How to secure your crypto exchange account). A bot with Telegram alerts is built in Crypto arbitrage bot in Python.

Where Genesis API fits

Genesis API is the REST API of Genesis Arbitrage data: CEX, DEX, on-chain, prediction markets and sportsbook surebets in one JSON format, with the key in the X-API-Key header. It serves the same data the site publishes through 35+ endpoints (37 operations in the spec) and only reads data.

DataExample endpointAPI plans
CEX spreads/arbitrage/spot-spotAll
DEX and cross-chain/arbitrage/dex-spotPro, Max
Order books/orderbooks/execPro, Max
Funding and OI/funding/ratesAll
On-chain/onchain/{section}Start, Pro, Max
Prediction markets and surebets/predictions/arbitrageStart: exact, dutch; Pro, Max: llm, sport

Coverage: 20+ CEX exchanges (Binance, OKX, Bybit, Bitget, MEXC, Gate, BingX, Kraken, WhiteBit, Coinbase, CoinW, edgeX, HTX, Hyperliquid and others), funding for 1000+ coins normalized to 8 hours, open interest across 13+ futures exchanges. Prediction markets are Polymarket, Kalshi, Limitless, Predict.fun and Opinion; the sport mode builds sportsbook surebets across 13 platforms, pre-match only.

PlanCalls per monthRequests per secondFreshness
Trial, $20/mo500K160 s
Start, $502M230 s
Pro, $1005M510 s
Max, $20010M155 s

API plans are separate from the site subscription; you pay in crypto, with 10% off for 3 months and 20% off for 6. Over the limits the server returns 429 and charges nothing, and an endpoint outside your plan returns 403 plan_restricted. Compare plans on Genesis API pricing; the rules are in Plans & limits.

Every section of the documentation has its own URL with parameters, fields, a curl example and a Try it form. For programs and AI agents there is the OpenAPI 3.1 spec and the llms-full.txt reference; setup is covered in Genesis API for AI agents. You can build your own services, bots and dashboards on Genesis API; you can't resell the raw data as is.

The first request — a plan, a key in your profile and a GET with X-API-Key — is covered in the quick start, and the basics in the lesson What a crypto API is and what you can automate. Without code, the same data is in the site's tables and in Telegram alerts.

Questions and answers

Is there a free crypto API?

Yes: public exchange APIs serve prices, order books and trades for free and without a key (on Binance, NONE endpoints), but each covers a single exchange. Genesis API has no free plan: Trial costs $20 a month for 500K calls.

Do I need an SDK to use a crypto API?

For a REST API an HTTP client is enough: curl, requests in Python or fetch in JavaScript. Genesis API has no official SDK, and every request is a GET with one header; you can generate a typed client from the OpenAPI 3.1 spec.

Can I trade through a market data API?

Not if the API is read-only, like Genesis API: it finds setups but places no orders. Orders go through the exchange, by hand or via its trading API with a key and a signature (on Binance, TRADE endpoints), which is outside Genesis API and at your own risk.

How do I get a crypto price from an API?

An exchange's public endpoint returns a pair's price on that exchange: on Binance it is GET /api/v3/ticker/price, and the price comes as a string. A coin's prices on every exchange, with deposit and withdrawal status, come from /coins/search?query=BTC in Genesis API (see Coin Search).