Files
bybit-api/examples/apidoc/V5/Asset/request-convert-quote.js
Jerko J 06476e6dd6 feat(): Update per release notes as of 17th July, 2024
- added convert endpoints
- added examples for those endpoints
- minor param/response changes based on release notes
2024-07-17 14:16:40 +02:00

24 lines
449 B
JavaScript

const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.requestConvertQuote({
requestId: 'test-00002',
fromCoin: 'ETH',
toCoin: 'BTC',
accountType: 'eb_convert_funding',
requestCoin: 'ETH',
requestAmount: '0.1',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});