Get Coin Exchange Records
Query the coin exchange records.
caution
You may have a long delay of this endpoint.
HTTP Request
GET /v5/asset/exchange/order-record
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 |
limit | false | integer | Limit for data size per page. [1 , 50 ]. Default: 10 |
cursor | false | string | Cursor. Used for pagination |
Response Parameters
Parameter | Type | Comments |
---|---|---|
nextPageCursor | string | Cursor. Used for pagination |
orderBody | 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 (sec) |
> exchangeTxId | string | Exchange transaction ID |
Request Example
- HTTP
- Python
GET /v5/asset/exchange/order-record?limit=10 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672990462492
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_coin_exchange_records(
limit=10,
))
Response Example
{
"retCode": 0,
"retMsg": "OK",
"result": {
"orderBody": [
{
"fromCoin": "BTC",
"fromAmount": "0.100000000000000000",
"toCoin": "ETH",
"toAmount": "1.385866230000000000",
"exchangeRate": "13.858662380000000000",
"createdTime": "1672197760",
"exchangeTxId": "145102533285208544812654440448"
}
],
"nextPageCursor": "173341:1672197760"
},
"retExtInfo": {},
"time": 1672990464021
}