Get Convert history
Those confirmed quotes no matter status are showns by this API.
info
Only display the conversion history created through open API.
HTTP Request
GET /v5/asset/exchange/query-convert-history
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
accountType | false | string | Wallet type eb_convert_funding,eb_convert_uta |
index | false | integer | Page number |
limit | false | integer | Page size |
Response Parameters
Parameter | Type | Comments |
---|---|---|
list | array<object> | Array of quotes |
> accountType | string | Wallet type |
> exchangeTxId | string | Exchange tx ID, same as quote tx ID |
> userId | string | User ID |
> fromCoin | string | From coin |
> fromCoinType | string | From coin type. crypto |
> toCoin | string | To coin |
> toCoinType | string | To coin type. crypto |
> fromAmount | string | From coin amount (amount to sell) |
> toAmount | string | To coin amount (amount to buy according to exchange rate) |
> exchangeStatus | string | Exchange status |
> extInfo | object | |
>> paramType | string | This field is published when you send it in the Request a Quote |
>> paramValue | string | This field is published when you send it in the Request a Quote |
> convertRate | string | Exchange rate |
> createdAt | string | Quote created time |
Request Example
- HTTP
- Python
- Node.js
GET /v5/asset/exchange/query-convert-history?accountType=eb_convert_uta,eb_convert_funding HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1720074159814
X-BAPI-RECV-WINDOW: 5000
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getConvertHistory()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "ok",
"result": {
"list": [
{
"accountType": "eb_convert_funding",
"exchangeTxId": "10100108106409343501030232064",
"userId": "XXXXX",
"fromCoin": "ETH",
"fromCoinType": "crypto",
"fromAmount": "0.1",
"toCoin": "BTC",
"toCoinType": "crypto",
"toAmount": "0.00534882723991",
"exchangeStatus": "success",
"extInfo": {
"paramType": "opFrom",
"paramValue": "broker-id-001"
},
"convertRate": "0.0534882723991",
"createdAt": "1720071899995"
},
{
"accountType": "eb_convert_uta",
"exchangeTxId": "23070eb_convert_uta408933875189391360",
"userId": "XXXXX",
"fromCoin": "BTC",
"fromCoinType": "crypto",
"fromAmount": "0.1",
"toCoin": "ETH",
"toCoinType": "crypto",
"toAmount": "1.773938248611074",
"exchangeStatus": "success",
"extInfo": {},
"convertRate": "17.73938248611074",
"createdAt": "1719974243256"
}
]
},
"retExtInfo": {},
"time": 1720074457715
}