Confirm a Quote
info
- The exchange is async, please check the final status by calling query result API.
- Make sure you confirm the quote before the quote is expired.
HTTP Request
POST /v5/asset/exchange/convert-execute
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
quoteTxId | true | string | The quote tx ID from Request a Quote |
Response Parameters
Parameter | Type | Comments |
---|---|---|
quoteTxId | string | Quote transaction ID |
exchangeStatus | string | Exchange status |
Request Example
- HTTP
- Python
- Node.js
POST /v5/asset/exchange/convert-execute HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1720071899789
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 52
{
"quoteTxId": "10100108106409343501030232064"
}
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.confirmConvertQuote({
quoteTxId: '10100108106409343501030232064',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "ok",
"result": {
"exchangeStatus": "processing",
"quoteTxId": "10100108106409343501030232064"
},
"retExtInfo": {},
"time": 1720071900529
}