GET /api/v5/market/trades
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/web3okx/api/v5/market/tradesCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeRecent public trades
Parameters
| name | in | type | description | |
|---|---|---|---|---|
instId | query | str | required | example: BTC-USDT |
limit | query | int | optional | example: 10 |
Response
type: array
pagination: none
sample: {
"[0]": "object{instId:str,tradeId:str,px:str,sz:str,side:str,ts:str,source:str}"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/web3okx/api/v5/market/trades?instId=BTC-USDT&limit=10"