What a crypto API is and what you can automate
In short
- A crypto API is a programming interface your program uses to request market data and get a JSON response: the same spread you see in a site table, delivered as
exchange_buy,exchange_sellandspread_pctfields. - An exchange API covers the data and account of one venue, a market data API merges many exchanges into one format, and an on-chain API reads the blockchain. Genesis API is a read-only market data API.
- With an API, traders automate spread, funding and open interest monitoring, alerts, a signal log, dashboards and historical research.
- Without experience, keep trade execution and withdrawals manual: data snapshots lag the exchange, and a bug in your code repeats on every cycle.
A crypto API is a programming interface your code uses to request crypto market data and get back an answer it can work with: prices, spreads between exchanges, funding rates, open interest. A person reads these numbers in a table; a program receives them as JSON fields and can compare them with a threshold, log them or send an alert right away. The general definition is in the glossary entry API.
Request and response
Working with an API is an exchange of two messages: your program sends a request to an address, and the server sends back a response. The shortest example is the Genesis API status check, which needs no key:
curl "https://api.genesisarbitrage.com/health"
{"ok":true}
curl is a command-line program for HTTP requests; curl --version tells you whether it is installed. Data requests need an API key, a string the server uses to identify your account and plan. An illustrative example: Spot – Spot pairs for the FUEL coin, with the key taken from the GENESIS_API_KEY environment variable:
URL="https://api.genesisarbitrage.com/v1/arbitrage/spot-spot"
curl "$URL?coin=FUEL" -H "X-API-Key: $GENESIS_API_KEY"
{
"success": true,
"data": [
{
"coin": "FUEL",
"exchange_buy": "ByBit",
"exchange_sell": "Gate",
"price_buy": 0.0007029,
"price_sell": 0.0007037,
"spread_pct": 0.11,
"withdraw_enabled_buy": true,
"deposit_enabled_sell": true,
…
}
],
"meta": {
"count": 1,
"updated_at": 1794675861,
"freshness_sec": 60,
"plan": "trial"
}
}
The response holds one pair: buy FUEL on ByBit at 0.0007029 and sell it on Gate at 0.0007037. The spread is already computed in spread_pct: (0.0007037 − 0.0007029) / 0.0007029 × 100 ≈ 0.11%. The withdraw_enabled_buy and deposit_enabled_sell flags show that withdrawals from ByBit and deposits to Gate are open, and meta.updated_at tells you when the snapshot was built. The Spot – Spot table shows the same numbers, and every field is described in the Spot — Spot section of the docs.
The request address is built from a base URL, an endpoint path and parameters, while the key travels separately in the X-API-Key header. Lesson 2 takes each part of the request apart, covers status codes and reading JSON, and shows how to set the key variable.
This kind of exchange, a request followed by a response with a data snapshot, is called a REST API. You get new data by sending the request again: Genesis API refreshes its output every meta.freshness_sec seconds, from 60 on Trial down to 5 on Max. Exchanges also offer a second channel, WebSocket: the connection stays open and the server pushes trades and order book changes as they happen, as in Binance streams. Genesis API has no WebSocket.
Types of crypto APIs
Crypto APIs differ in where the data comes from and what you can do through them:
- Exchange API: data and account access for one venue. The exchange serves prices, order books and trades publicly, while balances, orders and trade history require a key and a signed request. Binance spells this out as security types:
NONEfor open market data,TRADEfor placing and canceling orders,USER_DATAfor account details (Binance docs). - Market data API: many exchanges and networks in one format. It serves what requires combining venues: spreads between exchanges, funding rates normalized to one period, open interest by exchange. Genesis API is this type, and it only reads data.
- On-chain API: blockchain data such as transactions, token transfers and address balances. Labels like "exchange", "project team" or "whale" come from analytics services built on top of the network data.
A comparison of six API types, REST versus WebSocket and a nine-point selection checklist are in the overview crypto API types and how to choose one.
What a trader can automate
Automate what you repeat by a fixed rule: open a table, compare a number with a threshold, write down the result. A program does this on a schedule and does not skip the night hours.
| Task | What the program does | Genesis API data |
|---|---|---|
| Spread monitoring | Pairs above a threshold with open deposits and withdrawals | /arbitrage/spot-spot, /arbitrage/spot-futures |
| Funding | Compares exchange rates normalized to 8 hours | /funding/rates, /funding/spread |
| Open interest | Catches sharp OI changes over 5 minutes to 1 hour | /market/open-interest |
| Alerts | Messages you in Telegram when a condition is met | Any data endpoint |
| Log | Saves every pair it finds with a timestamp | The response and meta.updated_at |
| Dashboard | Shows your columns and thresholds on your own page | Requests from your server |
| Historical research | Looks for patterns in past data | /funding/analytics/daily (Pro, Max) |
Alerts are a common first project: the program polls an endpoint no more often than meta.freshness_sec and messages you when a spread or rate crosses your threshold. Without code, similar signals come from the Genesis Arbitrage Telegram Alerts on the site's Pro plan.
A log tests an idea before any money is at stake. An illustrative example: a bot records pairs with a spread of 1% or more every 30 seconds, which is 86,400 / 30 = 2,880 snapshots a day. They show how many pairs lasted longer than a minute and how many were gone by the next poll.
For history, Genesis API offers funding analytics, up to a year of daily settled-funding sums across 13 exchanges, and order book slippage history; both are on the Pro and Max plans. Genesis API has no historical candles: exchange APIs serve those, on Binance through GET /api/v3/klines with up to 1,000 candles per request (Binance docs). Your program builds the history of cross-exchange spreads itself, from the snapshots in its log.
What not to automate without experience
Two operations are costly when they go wrong: trade execution and withdrawals.
Trade execution
A bot that places orders through an exchange trading API makes mistakes as often as it runs: a bug in the entry condition with polling every 10 seconds produces 3,600 / 10 = 360 orders an hour. The data lags too: a Genesis API snapshot refreshes every 60 to 5 seconds depending on the plan, order books lag the exchange by 5–20 seconds, and the spread can close in that time. Genesis API does not place orders: it finds the pairs, and you open the trade on the exchange yourself.
Withdrawals
An exchange key with withdrawal permission allows anyone who gets hold of it to move funds off the account, so a leak of such a key can cost the whole balance. Bots that read data or trade do not need this permission. On Binance, a new API key cannot even trade by default: trading permission is enabled separately.
Site, exchange APIs or Genesis API
| Task | Better fit | Why |
|---|---|---|
| Browse pairs and charts | Genesis Arbitrage site | Tables and filters, no code |
| Signals without programming | Telegram Alerts on the site | Thresholds set in the interface |
| Your own rules across 20+ exchanges | Genesis API | Spreads computed, one format |
| Orders, balances, withdrawals | Exchange API | Only the exchange accepts orders |
| Every trade in real time | Exchange WebSocket | Genesis API serves snapshots every 60–5 s |
| Past candles | Exchange API | Genesis API has no candles |
| Funding history across 13 exchanges | Genesis API, Pro and Max | Up to a year of daily sums, one format |
A practical setup to start with: Genesis API finds a pair, your bot sends an alert, and you check the exchange order book and open the trade yourself. Genesis API plans run from Trial at $20 a month (500K calls, 60 s freshness) to Max at $200 (10M calls, 5 s), and there is no free plan. Compare them on the Genesis API pricing page.
What you will need for the rest of the course
- A Genesis API key: pick a plan on the pricing page and get the key with the "Get key" button in your profile; the steps are in the Genesis API quick start. Keep the key in the
GENESIS_API_KEYenvironment variable and never put it in a request URL. - curl for your first requests from the terminal.
- Python 3.10+ and the
requestslibrary (pip install requests) for the scripts in lessons 2 and 4. - The Genesis API documentation: every endpoint has its parameters, fields, a curl example and a "Try it" form that sends the request straight from the page.
The lessons build on each other:
- lesson 2: your first request, with the address, headers, status codes and JSON;
- lesson 3: which data serves which decisions, from spreads and order books to funding and on-chain flows;
- lesson 4: a spread and funding monitor in Python;
- lesson 5: automation risks, including stale data, errors, keys and AI agents.
Try it yourself
Send a request without a key
Run
curl "https://api.genesisarbitrage.com/health"in a terminal. The{"ok":true}response means the request arrived and the server answered in JSON.Match the table to the fields
Open the Spot – Spot table and the Spot — Spot docs section. Find the fields for exchanges, prices, spread and transfer status:
exchange_buy,price_sell,spread_pct,withdraw_enabled_buy.List your routine tasks
Take three things you do every day and mark each one using the table above: site, Genesis API or exchange API.
Find the endpoint for one task
For a Genesis API task, find the endpoint in the documentation and write down the parameters you need, such as
coinandmin_spread. You will send that request in lesson 2.