Skip to main content

Get Public Recent Trading History

Query recent public trading data in Bybit.

Covers: Spot / USDT perpetual / USDC contract / Inverse contract / Option

You can download archived historical trades from the website

HTTP Request

GET /v5/market/recent-trade

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct type. spot,linear,inverse,option
symbolfalsestringSymbol name
  • required for spot/linear/inverse
  • optional for option
baseCoinfalsestringBase coin
  • Apply to option only
  • If the field is not passed, return BTC data by default
  • optionTypefalsestringOption type. Call or Put. Apply to option only
    limitfalseintegerLimit for data size per page
    • spot: [1,60], default: 60
    • others: [1,1000], default: 500

    Response Parameters

    ParameterTypeComments
    categorystringProducts category
    listarrayObject
    > execIdstringExecution ID
    > symbolstringSymbol name
    > pricestringTrade price
    > sizestringTrade size
    > sidestringSide of taker Buy, Sell
    > timestringTrade time (ms)
    > isBlockTradebooleanWhether the trade is block trade
    > mPstringMark price, unique field for option
    > iPstringIndex price, unique field for option
    > mIvstringMark iv, unique field for option
    > ivstringiv, unique field for option

    Request Example

    GET /v5/market/recent-trade?category=spot&symbol=BTCUSDT&limit=1 HTTP/1.1
    Host: api-testnet.bybit.com

    Response Example

    {
    "retCode": 0,
    "retMsg": "OK",
    "result": {
    "category": "spot",
    "list": [
    {
    "execId": "2100000000007764263",
    "symbol": "BTCUSDT",
    "price": "16618.49",
    "size": "0.00012",
    "side": "Buy",
    "time": "1672052955758",
    "isBlockTrade": false
    }
    ]
    },
    "retExtInfo": {},
    "time": 1672053054358
    }