Skip to content

Commit 7aedcdf

Browse files
authored
Merge pull request #960 from 0xcmhy/master
fix(client): withdraw bug
2 parents 2fa6377 + 490a2e4 commit 7aedcdf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/node-binance-api.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3601,22 +3601,22 @@ export default class Binance {
36013601
/**
36023602
* Withdraws asset to given wallet id
36033603
* @see https://developers.binance.com/docs/wallet/capital/withdraw
3604-
* @param {string} asset - the asset symbol
3604+
* @param {string} coin - the coin symbol
36053605
* @param {string} address - the wallet to transfer it to
36063606
* @param {number} amount - the amount to transfer
36073607
* @param {string} addressTag - and addtional address tag
36083608
* @param {string} name - the name to save the address as. Set falsy to prevent Binance saving to address book
36093609
* @return {promise or undefined} - omitting the callback returns a promise
36103610
*/
3611-
async withdraw(asset: string, address: string, amount: number, addressTag?: string, name?: string, params: Dict = {}): Promise<WithdrawResponse> {
3611+
async withdraw(coin: string, address: string, amount: number, addressTag?: string, name?: string, params: Dict = {}): Promise<WithdrawResponse> {
36123612
// const params = { asset, address, amount };
3613-
params.asset = asset;
3613+
params.coin = coin;
36143614
params.address = address;
36153615
params.amount = amount;
36163616
if (name) params.name = name;
36173617
if (addressTag) params.addressTag = addressTag;
36183618

3619-
return await this.privateSpotRequest('v1/capital/withdraw/apply', params, 'POST');
3619+
return await this.privateSapiRequest('v1/capital/withdraw/apply', params, 'POST');
36203620
}
36213621

36223622
/**

0 commit comments

Comments
 (0)