Skip to main content

Get Exchange Records

Query the coin exchange records.

HTTP Request

GET /asset/v2/private/exchange/exchange-order-all

Request Parameters

ParameterRequiredTypeComments
fromCoinfalsestringThe currency to convert from. e.g,BTC
toCoinfalsestringThe currency to convert to. e.g,USDT

Response Parameters

ParameterTypeComments
totalCountstringRecords size
orderarrayObject
> fromCoinstringThe currency to convert from
> fromAmountstringThe amount to convert from
> toCoinstringThe currency to convert to
> toAmountstringThe amount to convert to
> exchangeRatestringExchange rate
> createdTimestringExchange created timestamp (ms)
> exchangeTxIdstringExchange transaction id

Request Example

GET /asset/v2/private/exchange/exchange-order-all HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1673079087093
X-BAPI-RECV-WINDOW: 5000

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"order": [
{
"fromCoin": "ETH",
"fromAmount": "0.10000000",
"toCoin": "XRP",
"toAmount": "372.37487085",
"exchangeRate": "3723.74870857",
"createdTime": "1672989418000",
"exchangeTxId": "251239533285211865273079980032"
},
{
"fromCoin": "BTC",
"fromAmount": "0.10000000",
"toCoin": "ETH",
"toAmount": "1.38586623",
"exchangeRate": "13.85866238",
"createdTime": "1672197760000",
"exchangeTxId": "145102533285208544812654440448"
}
],
"totalCount": "2"
},
"retExtInfo": {},
"time": 1673079089361
}