OKX

App · Cryptocurrency · 14 actions

Read live market data from OKX, one of the largest crypto exchanges: prices and 24-hour moves for any spot pair or futures contract, price history going back years, order books, recent trades, index prices and what they are built from, mark prices, perpetual funding rates and their history, open interest, the exchange's own trading volume, and whether OKX is in maintenance. Everything here is public market data: no account, no API key, and no access to anyone's balances or orders.

Actions

ActionWhat it does
Check for OKX maintenanceCheck whether OKX is in maintenance or about to be, and what it affects.
Get a mark priceRead the mark price of a contract: the price OKX values open positions at, and the one liquidations are measured against.
Get a priceRead what one thing is trading at on OKX right now: the last traded price, the best bid and ask, and how far it has moved in the last 24 hours, as an amount and as a percentage, so a price alert needs no arithmetic of its own.
Get an index priceRead an OKX index: the reference price it computes from several exchanges rather than from its own order book, and the price its contracts settle against.
Get funding rate historyList what funding actually cost on a perpetual over a window, settlement by settlement, with the average across them.
Get index sourcesShow where an OKX index price comes from: which exchanges feed it, what each of them is quoting, and how much each one counts for.
Get OKX trading volumeRead how much OKX itself traded in the last 24 hours, across everything it lists.
Get open interestRead how much is open on a contract: the size of every position still outstanding, in contracts, in coins and in US dollars.
Get price historyGet an instrument's price over time as candles: open, high, low, close and volume for each minute, hour, day, week or month, plus how it moved across the whole window in one summary.
Get the funding rateRead the next funding payment on a perpetual contract: the rate, when it settles, and which side pays, as a plain true/false rather than a sign you have to interpret.
Get the order bookRead the orders currently resting on both sides of an instrument, with the spread, the mid price and the volume stacked on each side already worked out.
List instrumentsList what OKX has listed on a market, with the rules each one trades under: its smallest order, its tick size, its leverage cap and, for a dated contract, when it settles.
List pricesTake a snapshot of a whole OKX market at once and order it: the day's biggest gainers, the biggest fallers, or simply what is busiest.
List recent tradesList the trades that have just executed on an instrument, newest first, with how much of the volume was buying and how much was selling.

Check for OKX maintenance

Check whether OKX is in maintenance or about to be, and what it affects. The answer carries two plain flags, one for maintenance under way and one for maintenance scheduled, so a workflow can hold off without reading any dates. No API key required.

Inputs

Showstatetext
Which maintenance windows to list. The default covers anything running now and anything still to come, which is what a check before doing work wants.One of: current (Happening now or scheduled), ongoing (Happening now), scheduled (Scheduled for later), completed (Finished), canceled. Default: current.
How manylimitnumber
How many windows to return, most recent first.From 1 to 200. Default: 25.

Outputs

countnumber
How many windows came back.
maintenancelist
The windows, most recent first.
maintenance_in_progresstrue/false
True when a window is running right now. Branch on this to pause a workflow.
maintenance_scheduledtrue/false
True when a window is announced but has not started.
statetext
The filter that was applied.
state_labeltext
The same filter in words.
status_page_urltext
OKX's status page, to link a reader to the source.
total_countnumber
How many matched before the cut.
Example output
{
  "count": 1,
  "maintenance": [
    {
      "affected_service": "Copy trading",
      "details_url": "https://www.okx.com/status",
      "ends_at": "2026-09-09T08:20:00Z",
      "is_in_progress": false,
      "maintenance_type": "Scheduled maintenance",
      "reschedule_note": "",
      "starts_at": "2026-09-09T08:00:00Z",
      "state": "scheduled",
      "system": "unified",
      "title": "Copy trading system scheduled maintenance"
    }
  ],
  "maintenance_in_progress": false,
  "maintenance_scheduled": true,
  "state": "current",
  "state_label": "Happening now or scheduled",
  "status_page_url": "https://www.okx.com/status",
  "total_count": 1
}

Get a mark price

Read the mark price of a contract: the price OKX values open positions at, and the one liquidations are measured against. It is deliberately not the last traded price, so compare the two when a market looks stretched. No API key required.

Inputs

Marketmarkettext
Which market the contract trades on. It fills the contract list below. Spot is absent because a spot holding is not marked to anything.One of: MARGIN, SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SWAP.
ContractinstrumenttextRequired
Which contract to read, e.g. BTC-USDT-SWAP. The list holds everything tradable on the chosen market; you can also type an instrument id.

Outputs

as_oftext
When OKX generated this data, in UTC.
instrumenttext
The OKX instrument id, e.g. BTC-USDT.
mark_pricenumber
The price OKX is marking positions at.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
Example output
{
  "as_of": "2026-09-02T22:13:06Z",
  "instrument": "BTC-USDT-SWAP",
  "mark_price": 77139.9,
  "market": "SWAP"
}

Get a price

Read what one thing is trading at on OKX right now: the last traded price, the best bid and ask, and how far it has moved in the last 24 hours, as an amount and as a percentage, so a price alert needs no arithmetic of its own. Works on spot pairs and on futures alike. No API key required.

Inputs

Marketmarkettext
Which OKX market the instrument trades on. It fills the instrument list below, and the step refuses an instrument that belongs to a different market, so a report meant to quote the spot price can never quietly quote a perpetual's instead.One of: SPOT, MARGIN, SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SPOT.
InstrumentinstrumenttextRequired
What to look up, e.g. BTC-USDT. The list holds everything currently tradable on the chosen market; you can also type an instrument id, including an options contract, which the list does not carry.

Outputs

as_oftext
When OKX generated this data, in UTC.
ask_pricenumber
The lowest price anyone is currently asking.
ask_sizenumber
How much is offered at that price.
bid_pricenumber
The highest price anyone is currently bidding.
bid_sizenumber
How much is bid at that price.
change_24hnumber
How much the price moved in 24 hours, in the quote currency.
change_24h_percentnumber
The same move as a percentage, so an alert can compare it to a threshold without any arithmetic of its own.
high_24hnumber
The highest price in the last 24 hours.
instrumenttext
The OKX instrument id, e.g. BTC-USDT.
last_pricenumber
The price of the most recent trade.
last_sizenumber
How much changed hands in that trade.
low_24hnumber
The lowest price in the last 24 hours.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
open_24hnumber
The price 24 hours ago.
price_at_utc_midnightnumber
The price at 00:00 UTC, for a day-to-date comparison.
quote_currencytext
The currency it is priced in, e.g. USDT in BTC-USDT.
spreadnumber
Best ask minus best bid.
volume_24hnumber
24-hour volume as OKX counts it: the base currency on spot, the number of contracts on a futures contract.
volume_24h_quotenumber
24-hour volume in the quote currency: the figure that is comparable between one instrument and the next. OKX reports futures volume in the base currency, so for a futures contract this is that volume valued at the last price.
Example output
{
  "as_of": "2026-09-02T22:11:24Z",
  "ask_price": 77130.6,
  "ask_size": 0.01977781,
  "bid_price": 77130.5,
  "bid_size": 0.72606066,
  "change_24h": -169.0,
  "change_24h_percent": -0.2186,
  "high_24h": 77788.1,
  "instrument": "BTC-USDT",
  "last_price": 77130.6,
  "last_size": 0.00470764,
  "low_24h": 76261.0,
  "market": "SPOT",
  "open_24h": 77299.6,
  "price_at_utc_midnight": 77435.4,
  "quote_currency": "USDT",
  "spread": 0.1,
  "volume_24h": 5331.76050945,
  "volume_24h_quote": 411192602.83
}

Get an index price

Read an OKX index: the reference price it computes from several exchanges rather than from its own order book, and the price its contracts settle against. Use it when you want the market's price for an asset rather than one venue's, and get the 24-hour move with it. No API key required.

Inputs

Priced inquote_currencytext
Which currency the index is quoted in. It fills the index list below: OKX publishes its indexes one quote currency at a time and offers no way to list them all together.One of: USDT, USD, USDC, BTC. Default: USDT.
IndexindextextRequired
Which OKX index to read, e.g. BTC-USDT. An index is the reference price OKX computes from several exchanges; its contracts settle against it rather than against OKX's own order book.

Outputs

as_oftext
When OKX generated this data, in UTC.
change_24hnumber
How much it moved in 24 hours.
change_24h_percentnumber
The same move as a percentage.
high_24hnumber
Its high over the last 24 hours.
indextext
The index that was read, e.g. BTC-USDT.
index_pricenumber
The current index price.
low_24hnumber
Its low over the last 24 hours.
open_24hnumber
The index price 24 hours ago.
price_at_utc_midnightnumber
The index price at 00:00 UTC.
Example output
{
  "as_of": "2026-09-02T22:13:04Z",
  "change_24h": -118.9,
  "change_24h_percent": -0.1538,
  "high_24h": 77791.8,
  "index": "BTC-USDT",
  "index_price": 77175.8,
  "low_24h": 76262.2,
  "open_24h": 77294.7,
  "price_at_utc_midnight": 77437.1
}

Get funding rate history

List what funding actually cost on a perpetual over a window, settlement by settlement, with the average across them. Use it to work out the real carrying cost of holding a position, which the current rate alone never shows. OKX keeps about three months. No API key required.

Inputs

Perpetual contractinstrumenttextRequired
Which perpetual futures contract, e.g. BTC-USDT-SWAP. Funding is settled on perpetuals only, so no other market appears here.
Fromstartdate and time
The earliest settlement to include. Leave it empty for the most recent ones. OKX keeps roughly three months of funding history.
Toenddate and time
The latest settlement to include. Leave it empty to run up to now.
How many settlementslimitnumber
The most settlements to return, newest first. Funding usually settles every eight hours, so 100 is about a month.From 1 to 500. Default: 100.

Outputs

average_ratenumber
The mean realized rate across them.
average_rate_percentnumber
The same average as a percentage.
countnumber
How many settlements came back.
funding_rateslist
The settlements, newest first.
instrumenttext
The OKX instrument id, e.g. BTC-USDT.
Example output
{
  "average_rate": 7.52428e-05,
  "average_rate_percent": 0.007524,
  "count": 2,
  "funding_rates": [
    {
      "funding_rate": 7.64625270974e-05,
      "funding_time": "2026-09-02T16:00:00Z",
      "longs_paid_shorts": true,
      "realized_rate": 7.64625270974e-05,
      "realized_rate_percent": 0.007646
    },
    {
      "funding_rate": 7.40231074545e-05,
      "funding_time": "2026-09-02T08:00:00Z",
      "longs_paid_shorts": true,
      "realized_rate": 7.40231074545e-05,
      "realized_rate_percent": 0.007402
    }
  ],
  "instrument": "BTC-USDT-SWAP"
}

Get index sources

Show where an OKX index price comes from: which exchanges feed it, what each of them is quoting, and how much each one counts for. Use it to explain an index price, or to spot one venue drifting away from the rest. No API key required.

Inputs

Priced inquote_currencytext
Which currency the index is quoted in. It fills the index list below: OKX publishes its indexes one quote currency at a time and offers no way to list them all together.One of: USDT, USD, USDC, BTC. Default: USDT.
IndexindextextRequired
Which OKX index to read, e.g. BTC-USDT. An index is the reference price OKX computes from several exchanges; its contracts settle against it rather than against OKX's own order book.

Outputs

as_oftext
When OKX generated this data, in UTC.
component_countnumber
How many exchanges feed it.
componentslist
Each exchange and its contribution.
indextext
The index that was read, e.g. BTC-USDT.
index_pricenumber
The index price these components produce.
Example output
{
  "as_of": "2026-09-02T22:12:43Z",
  "component_count": 5,
  "components": [
    {
      "converted_price": 77167.62,
      "exchange": "Coinbase",
      "price": 77144.47,
      "symbol": "BTC/USD",
      "weight": 0.1875,
      "weight_percent": 18.75
    },
    {
      "converted_price": 77166.97,
      "exchange": "Binance",
      "price": 77166.97,
      "symbol": "BTC/USDT",
      "weight": 0.25,
      "weight_percent": 25.0
    },
    {
      "converted_price": 77162.8,
      "exchange": "OKX",
      "price": 77162.8,
      "symbol": "BTC/USDT",
      "weight": 0.25,
      "weight_percent": 25.0
    },
    {
      "converted_price": 77170.8,
      "exchange": "Bybit",
      "price": 77170.8,
      "symbol": "BTC/USDT",
      "weight": 0.1875,
      "weight_percent": 18.75
    },
    {
      "converted_price": 77160.0,
      "exchange": "Bitget",
      "price": 77160.0,
      "symbol": "BTC/USDT",
      "weight": 0.125,
      "weight_percent": 12.5
    }
  ],
  "index": "BTC-USDT",
  "index_price": 77165.8
}

Get OKX trading volume

Read how much OKX itself traded in the last 24 hours, across everything it lists. One number for the size of the venue, for a market report or a week-on-week comparison. No API key required.

Inputs

None.

Outputs

as_oftext
When OKX generated this data, in UTC.
exchange_urltext
OKX's own site, to link a reader to the source.
volume_cny_24hnumber
The same figure in Chinese yuan.
volume_usd_24hnumber
Everything traded on OKX in 24 hours, in US dollars.
Example output
{
  "as_of": "2026-09-02T22:12:00Z",
  "exchange_url": "https://www.okx.com",
  "volume_cny_24h": 174956529447.0,
  "volume_usd_24h": 25950241686.0
}

Get open interest

Read how much is open on a contract: the size of every position still outstanding, in contracts, in coins and in US dollars. Leave the contract empty for a whole derivatives market at once, ranked by size, with the total beside it. Rising open interest with a rising price means new money; falling means positions closing. No API key required.

Inputs

Marketmarkettext
Which derivatives market to read. Spot and margin are absent because neither has open interest.One of: SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SWAP.
Contractinstrumenttext
One contract, e.g. BTC-USDT-SWAP. Leave it empty for every contract on the market, biggest first.
How many contractslimitnumber
How many contracts to return when reading a whole market. The total value is summed over all of them, not only those returned.From 1 to 500. Default: 50.

Outputs

countnumber
How many contracts came back.
instrumenttext
The contract that was asked for, if one was.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
market_labeltext
The market's name as OKX writes it.
open_interestlist
The contracts, largest first.
total_countnumber
How many contracts the total covers.
total_usd_valuenumber
Open interest across every matching contract, in US dollars, summed before any cut, so it is the whole market even when the list is capped.
Example output
{
  "count": 2,
  "instrument": "",
  "market": "SWAP",
  "market_label": "Perpetual futures",
  "open_interest": [
    {
      "as_of": "2026-09-02T22:13:14Z",
      "base_currency_amount": 29071.3832,
      "contracts": 2907138.32,
      "instrument": "BTC-USDT-SWAP",
      "market": "SWAP",
      "usd_value": 2242499635.87
    },
    {
      "as_of": "2026-09-02T22:13:14Z",
      "base_currency_amount": 656577.827,
      "contracts": 6565778.27,
      "instrument": "ETH-USDT-SWAP",
      "market": "SWAP",
      "usd_value": 1565366894.69
    }
  ],
  "total_count": 461,
  "total_usd_value": 6948890552.6
}

Get price history

Get an instrument's price over time as candles: open, high, low, close and volume for each minute, hour, day, week or month, plus how it moved across the whole window in one summary. Leave the dates empty for the most recent candles, or pick a window years back: OKX splits recent and archived candles across two endpoints and this reads across both. No API key required.

Inputs

Marketmarkettext
Which OKX market the instrument trades on. It fills the instrument list below, and the step refuses an instrument that belongs to a different market, so a report meant to quote the spot price can never quietly quote a perpetual's instead.One of: SPOT, MARGIN, SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SPOT.
InstrumentinstrumenttextRequired
What to look up, e.g. BTC-USDT. The list holds everything currently tradable on the chosen market; you can also type an instrument id, including an options contract, which the list does not carry.
Candle sizeintervaltext
How much time each candle covers. Anything from six hours up is cut at UTC midnight, so a daily candle covers the same day as every other time here.One of: 1_minute (1 minute), 5_minutes (5 minutes), 15_minutes (15 minutes), 30_minutes (30 minutes), 1_hour (1 hour), 4_hours (4 hours), 12_hours (12 hours), 1_day (1 day), 1_week (1 week), 1_month (1 month). Default: 1_hour.
Fromstartdate and time
The earliest point to include. Leave it empty to get the most recent candles instead of a window. Older ranges are served from OKX's archive automatically, so a date years back works the same as this morning.
Toenddate and time
The latest point to include. Leave it empty to run up to now.
How many candleslimitnumber
The most candles to return. When a window holds more than this, the most recent ones are kept and the result says it was cut short.From 1 to 1000. Default: 100.

Outputs

candleslist
The candles, oldest first.
countnumber
How many candles came back.
instrumenttext
The OKX instrument id, e.g. BTC-USDT.
intervaltext
The candle size that was used, e.g. 1_day.
interval_labeltext
The same in words, e.g. 1 day.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
summaryobject
truncatedtrue/false
True when the requested window held more candles than the limit allowed and the oldest were dropped.
Example output
{
  "candles": [
    {
      "close": 78233.0,
      "high": 78336.6,
      "is_complete": true,
      "low": 77384.9,
      "open": 77844.7,
      "start_time": "2026-08-29T00:00:00Z",
      "volume": 2258.1224789,
      "volume_quote": 175712705.51
    },
    {
      "close": 77677.7,
      "high": 79401.4,
      "is_complete": true,
      "low": 77000.0,
      "open": 78233.1,
      "start_time": "2026-08-30T00:00:00Z",
      "volume": 3139.07657701,
      "volume_quote": 246147202.04
    },
    {
      "close": 77139.7,
      "high": 78120.2,
      "is_complete": false,
      "low": 76261.0,
      "open": 77677.6,
      "start_time": "2026-08-31T00:00:00Z",
      "volume": 4102.3311902,
      "volume_quote": 316489215.77
    }
  ],
  "count": 3,
  "instrument": "BTC-USDT",
  "interval": "1_day",
  "interval_label": "1 day",
  "market": "SPOT",
  "summary": {
    "change": -705.0,
    "change_percent": -0.9056,
    "close": 77139.7,
    "end_time": "2026-08-31T00:00:00Z",
    "high": 79401.4,
    "low": 76261.0,
    "open": 77844.7,
    "start_time": "2026-08-29T00:00:00Z"
  },
  "truncated": false
}

Get the funding rate

Read the next funding payment on a perpetual contract: the rate, when it settles, and which side pays, as a plain true/false rather than a sign you have to interpret. Funding is what keeps a perpetual near spot, so a persistently high rate is the market telling you it is crowded on one side. No API key required.

Inputs

Perpetual contractinstrumenttextRequired
Which perpetual futures contract, e.g. BTC-USDT-SWAP. Funding is settled on perpetuals only, so no other market appears here.

Outputs

as_oftext
When OKX generated this data, in UTC.
funding_ratenumber
The predicted rate for the coming settlement.
funding_rate_percentnumber
The same rate as a percentage.
funding_timetext
When it settles, in UTC.
instrumenttext
The OKX instrument id, e.g. BTC-USDT.
interest_ratenumber
The interest component of the funding formula.
longs_pay_shortstrue/false
True when longs pay shorts, false when shorts pay longs, so a workflow can read the direction without knowing the sign rule.
maximum_funding_ratenumber
The ceiling OKX caps the rate at.
minimum_funding_ratenumber
The floor OKX caps the rate at.
next_funding_ratenumber
The rate forecast for the settlement after that.
next_funding_timetext
When that one settles, in UTC. The gap between the two is the funding interval, which OKX varies per contract.
premiumnumber
How far the contract is trading from the index, which is what drives the rate.
previous_funding_timetext
When funding last settled, in UTC.
settled_funding_ratenumber
The rate that was actually charged last time.
settlement_statetext
settled, or processing while a settlement runs.
Example output
{
  "as_of": "2026-09-02T22:12:28Z",
  "funding_rate": 4.97067204172e-05,
  "funding_rate_percent": 0.004971,
  "funding_time": "2026-09-03T00:00:00Z",
  "instrument": "BTC-USDT-SWAP",
  "interest_rate": 0.0001,
  "longs_pay_shorts": true,
  "maximum_funding_rate": 0.00375,
  "minimum_funding_rate": -0.00375,
  "next_funding_rate": null,
  "next_funding_time": "2026-09-03T08:00:00Z",
  "premium": -0.0004809530908691,
  "previous_funding_time": "2026-09-02T16:00:00Z",
  "settled_funding_rate": 7.64625270974e-05,
  "settlement_state": "settled"
}

Get the order book

Read the orders currently resting on both sides of an instrument, with the spread, the mid price and the volume stacked on each side already worked out. Use it to judge how much can be traded before the price moves. No API key required.

Inputs

Marketmarkettext
Which OKX market the instrument trades on. It fills the instrument list below, and the step refuses an instrument that belongs to a different market, so a report meant to quote the spot price can never quietly quote a perpetual's instead.One of: SPOT, MARGIN, SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SPOT.
InstrumentinstrumenttextRequired
What to look up, e.g. BTC-USDT. The list holds everything currently tradable on the chosen market; you can also type an instrument id, including an options contract, which the list does not carry.
Levels a sidedepthnumber
How many price levels to return on each side. Twenty is enough to see the shape of the book; the maximum is 400.From 1 to 400. Default: 20.

Outputs

as_oftext
When OKX generated this data, in UTC.
ask_volumenumber
Everything resting on the sell side, added up.
askslist
Sell orders, best price first.
best_asknumber
The lowest price anyone is asking.
best_bidnumber
The highest price anyone is bidding.
bid_volumenumber
Everything resting on the buy side, added up.
bidslist
Buy orders, best price first.
depthnumber
How many levels were requested per side.
instrumenttext
The OKX instrument id, e.g. BTC-USDT.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
mid_pricenumber
Halfway between the two.
spreadnumber
Best ask minus best bid.
spread_percentnumber
The spread as a percentage of the mid price.
Example output
{
  "as_of": "2026-09-02T22:11:49Z",
  "ask_volume": 0.01904157,
  "asks": [
    {
      "order_count": 4,
      "price": 77130.6,
      "size": 0.01901835
    },
    {
      "order_count": 1,
      "price": 77131.2,
      "size": 1.02e-05
    },
    {
      "order_count": 1,
      "price": 77133.5,
      "size": 1.302e-05
    }
  ],
  "best_ask": 77130.6,
  "best_bid": 77130.5,
  "bid_volume": 0.42502065,
  "bids": [
    {
      "order_count": 13,
      "price": 77130.5,
      "size": 0.39957753
    },
    {
      "order_count": 1,
      "price": 77130.2,
      "size": 0.00284363
    },
    {
      "order_count": 1,
      "price": 77129.9,
      "size": 0.02259949
    }
  ],
  "depth": 3,
  "instrument": "BTC-USDT",
  "market": "SPOT",
  "mid_price": 77130.55,
  "spread": 0.1,
  "spread_percent": 0.00013
}

List instruments

List what OKX has listed on a market, with the rules each one trades under: its smallest order, its tick size, its leverage cap and, for a dated contract, when it settles. Search it by name to find how OKX spells a pair before filtering on it elsewhere. No API key required.

Inputs

Marketmarkettext
Which OKX market the instrument trades on. It fills the instrument list below, and the step refuses an instrument that belongs to a different market, so a report meant to quote the spot price can never quietly quote a perpetual's instead.One of: SPOT, MARGIN, SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SPOT.
Name containsquerytext
Only instruments whose id contains this text. Leave it empty for all of them.
Tradable onlytradable_onlytrue/false
Leave this on to skip anything suspended, in a pre-open auction or listed for testing.Default: true.
How manylimitnumber
How many instruments to return, alphabetically. The total before this cut is reported beside them.From 1 to 2000. Default: 100.

Outputs

countnumber
How many instruments came back.
instrumentslist
The instruments, alphabetically.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
market_labeltext
The market's name as OKX writes it.
querytext
The text filter that was applied, if any.
total_countnumber
How many matched before the cut.
Example output
{
  "count": 1,
  "instruments": [
    {
      "base_currency": "BTC",
      "contract_type": "",
      "contract_value": null,
      "contract_value_currency": "",
      "expires_at": null,
      "instrument": "BTC-USDT",
      "is_tradable": true,
      "listed_at": "2020-11-27T09:16:12Z",
      "market": "SPOT",
      "market_label": "Spot",
      "max_leverage": 10.0,
      "minimum_size": 1e-05,
      "price_increment": 0.1,
      "quote_currency": "USDT",
      "settlement_currency": "",
      "size_increment": 1e-08,
      "status": "live",
      "underlying": ""
    }
  ],
  "market": "SPOT",
  "market_label": "Spot",
  "query": "BTC",
  "total_count": 11
}

List prices

Take a snapshot of a whole OKX market at once and order it: the day's biggest gainers, the biggest fallers, or simply what is busiest. Narrow it to one quote currency to compare like with like, every USDT pair against every other. Use it for a daily market digest. No API key required.

Inputs

Marketmarkettext
Which OKX market to snapshot. Margin is not listed separately because margin trades the spot book, so its prices are the spot ones.One of: SPOT, SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SPOT.
Priced inquote_currencytext
Only instruments quoted in this currency, e.g. USDT. The list is read from the market itself, with how many instruments use each. Leave it unset for all of them, which mixes currencies and makes prices incomparable.
Order bysorttext
How to order the results before they are cut to length.One of: volume_desc (24-hour volume (busiest first)), change_desc (24-hour change (biggest gainers first)), change_asc (24-hour change (biggest fallers first)), price_desc (Last price (highest first)), name_asc (Instrument (A to Z)). Default: volume_desc.
How manylimitnumber
How many instruments to return. The total before this cut is reported beside them.From 1 to 500. Default: 25.

Outputs

countnumber
How many instruments came back.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
market_labeltext
The market's name as OKX writes it.
quote_currencytext
The currency filter that was applied, if any.
sorttext
The ordering that was applied.
tickerslist
The instruments, in the chosen order.
total_countnumber
How many matched before the cut, so a capped list is never mistaken for the whole market.
Example output
{
  "count": 1,
  "market": "SPOT",
  "market_label": "Spot",
  "quote_currency": "USDT",
  "sort": "volume_desc",
  "tickers": [
    {
      "as_of": "2026-09-02T22:11:24Z",
      "ask_price": 77130.6,
      "ask_size": 0.01977781,
      "bid_price": 77130.5,
      "bid_size": 0.72606066,
      "change_24h": -169.0,
      "change_24h_percent": -0.2186,
      "high_24h": 77788.1,
      "instrument": "BTC-USDT",
      "last_price": 77130.6,
      "last_size": 0.00470764,
      "low_24h": 76261.0,
      "market": "SPOT",
      "open_24h": 77299.6,
      "price_at_utc_midnight": 77435.4,
      "quote_currency": "USDT",
      "spread": 0.1,
      "volume_24h": 5331.76050945,
      "volume_24h_quote": 411192602.83
    }
  ],
  "total_count": 396
}

List recent trades

List the trades that have just executed on an instrument, newest first, with how much of the volume was buying and how much was selling. Use it to see where the pressure is coming from rather than only where the price ended up. No API key required.

Inputs

Marketmarkettext
Which OKX market the instrument trades on. It fills the instrument list below, and the step refuses an instrument that belongs to a different market, so a report meant to quote the spot price can never quietly quote a perpetual's instead.One of: SPOT, MARGIN, SWAP (Perpetual futures), FUTURES (Expiry futures). Default: SPOT.
InstrumentinstrumenttextRequired
What to look up, e.g. BTC-USDT. The list holds everything currently tradable on the chosen market; you can also type an instrument id, including an options contract, which the list does not carry.
How manylimitnumber
How many of the most recent trades to return.From 1 to 500. Default: 100.

Outputs

buy_volumenumber
How much of that was buying.
countnumber
How many trades came back.
instrumenttext
The OKX instrument id, e.g. BTC-USDT.
last_pricenumber
The price of the most recent one.
markettext
The market it trades on: SPOT, MARGIN, SWAP or FUTURES.
sell_volumenumber
How much of it was selling.
tradeslist
The trades, newest first.
volumenumber
Everything traded across them, added up.
Example output
{
  "buy_volume": 0.00502253,
  "count": 3,
  "instrument": "BTC-USDT",
  "last_price": 77173.8,
  "market": "SPOT",
  "sell_volume": 0.00045647,
  "trades": [
    {
      "price": 77173.8,
      "side": "sell",
      "size": 1.02e-05,
      "trade_id": "1052497460",
      "traded_at": "2026-09-02T22:13:02Z"
    },
    {
      "price": 77174.1,
      "side": "sell",
      "size": 0.00044627,
      "trade_id": "1052497459",
      "traded_at": "2026-09-02T22:13:02Z"
    },
    {
      "price": 77174.2,
      "side": "buy",
      "size": 0.00502253,
      "trade_id": "1052497458",
      "traded_at": "2026-09-02T22:13:01Z"
    }
  ],
  "volume": 0.005479
}

On this page