I’m trying to withdraw funds from my wallet via the BYBIT API, but it ends with an error:
{
rateLimitApi: undefined,
retCode: 131002,
retMsg: 'Withdraw address chain or destination tag are not equal',
result: {},
retExtInfo: {},
time: 1730925459032
}
Mine code:
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: false,
key: 'api_key', // stub, for example
secret: 'secret_key', // stub, for example
});
client
.submitWithdrawal({
coin: 'USDT',
chain: 'ETH',
address: '0xfa3c24a644b03d20833866f59c539ec4794891ab',
amount: '10',
timestamp: Date.now(),
forceChain: 0,
accountType: 'FUND', // FUND, UNIFIED
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Here is an example from the documentation:
Documentation: https://bybit-exchange.github.io/docs/v5/asset/withdraw
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.submitWithdrawal({
coin: 'USDT',
chain: 'ETH',
address: '0x99ced129603abc771c0dabe935c326ff6c86645d',
amount: '24',
timestamp: 1672196561407,
forceChain: 0,
accountType: 'FUND',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response example (from docs):
{
"retCode": 0,
"retMsg": "success",
"result": {
"id": "10195"
},
"retExtInfo": {},
"time": 1672196571239
}
How can this problem be solved? Thanks in advance for your advice, ladies and gentlemen!
I tried changing networks: TON, TRX, but still the same error…