File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
examples/apidoc/MainClient Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ const { MainClient } = require ( 'binance' ) ;
2+
3+ // This example shows how to call this Binance API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "binance" for Binance exchange
4+ // This Binance API SDK is available on npm via "npm install binance"
5+ // ENDPOINT: sapi/v2/fiat/withdraw
6+ // METHOD: POST
7+ // PUBLIC: NO
8+
9+ const client = new MainClient ( {
10+ api_key : 'insert_api_key_here' ,
11+ api_secret : 'insert_api_secret_here' ,
12+ } ) ;
13+
14+ client . fiatWithdraw ( params )
15+ . then ( ( response ) => {
16+ console . log ( response ) ;
17+ } )
18+ . catch ( ( error ) => {
19+ console . error ( error ) ;
20+ } ) ;
Original file line number Diff line number Diff line change @@ -616,6 +616,7 @@ import {
616616 WalletBalance ,
617617 WithdrawAddress ,
618618 WithdrawAssetsFromManagedSubAccountParams ,
619+ WithdrawFiatParams ,
619620 WithdrawHistory ,
620621 WithdrawHistoryParams ,
621622 WithdrawParams ,
@@ -3747,6 +3748,10 @@ export class MainClient extends BaseRestClient {
37473748 return this . getPrivate ( 'sapi/v1/fiat/payments' , params ) ;
37483749 }
37493750
3751+ fiatWithdraw ( params : WithdrawFiatParams ) : Promise < { id : string } > {
3752+ return this . postPrivate ( '/sapi/v2/fiat/withdraw' , params ) ;
3753+ }
3754+
37503755 /**
37513756 *
37523757 * Rebate Endpoints
Original file line number Diff line number Diff line change @@ -4490,6 +4490,20 @@ export interface GetFiatPaymentsHistoryResponse {
44904490 success : boolean ;
44914491}
44924492
4493+ export interface WithdrawFiatAccountInfo {
4494+ accountNumber : string ;
4495+ agency : string ;
4496+ bankCodeForPix : string ;
4497+ accountType : string ;
4498+ }
4499+
4500+ export interface WithdrawFiatParams {
4501+ currency : string ;
4502+ apiPaymentMethod : string ;
4503+ amount : number ;
4504+ accountInfo ?: WithdrawFiatAccountInfo ;
4505+ }
4506+
44934507export interface GetC2CTradeHistoryParams {
44944508 tradeType : string ;
44954509 startTimestamp ?: number ;
You can’t perform that action at this time.
0 commit comments