Get Exchange Records
Query the coin exchange records.
HTTP Request
GET /asset/v2/private/exchange/exchange-order-all
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| fromCoin | false | string | The currency to convert from. e.g,BTC |
| toCoin | false | string | The currency to convert to. e.g,USDT |
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| totalCount | string | Records size |
| order | array | Object |
| > fromCoin | string | The currency to convert from |
| > fromAmount | string | The amount to convert from |
| > toCoin | string | The currency to convert to |
| > toAmount | string | The amount to convert to |
| > exchangeRate | string | Exchange rate |
| > createdTime | string | Exchange created timestamp (ms) |
| > exchangeTxId | string | Exchange 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
}