export interface Account { makerCommission ? : number ; takerCommission ? : number ; buyerCommission ? : number ; sellerCommission ? : number ; canTrade ? : boolean ; canWithdraw ? : boolean ; canDeposit ? : boolean ; updateTime ? : number ; accountType ? : string ; balances ? : { asset ? : string ; free ? : string ; locked ? : string ; } [ ] ; } export interface Order { symbol ? : string ; origClientOrderId ? : string ; orderId ? : number ; /** Unless OCO, value will be -1 */ orderListId ? : number ; clientOrderId ? : string ; price ? : number ; origQty ? : number ; executedQty ? : number ; cummulativeQuoteQty ? : number ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; } export interface OrderDetails { symbol ? : string ; origClientOrderId ? : string ; orderId ? : number ; /** Unless OCO, value will be -1 */ orderListId ? : number ; price ? : number ; origQty ? : number ; executedQty ? : number ; cummulativeQuoteQty ? : number ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; stopPrice ? : number ; icebergQty ? : number ; time ? : number ; updateTime ? : number ; isWorking ? : boolean ; origQuoteOrderQty ? : number ; } export interface MarginOrder { symbol ? : string ; orderId ? : number ; origClientOrderId ? : string ; clientOrderId ? : string ; price ? : string ; origQty ? : string ; executedQty ? : string ; cummulativeQuoteQty ? : string ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; } export interface MarginOrderDetail { symbol ? : string ; orderId ? : number ; clientOrderId ? : string ; price ? : string ; origQty ? : string ; executedQty ? : string ; cummulativeQuoteQty ? : string ; status ? : string ; stopPrice ? : string ; time ? : number ; timeInForce ? : string ; type ? : string ; side ? : string ; icebergQty ? : string ; isWorking ? : boolean ; updateTime ? : number ; } export interface MarginOrderResponseAck { symbol ? : string ; orderId ? : number ; clientOrderId ? : string ; transactTime ? : number ; } export interface MarginOrderResponseResult { symbol ? : string ; orderId ? : number ; clientOrderId ? : string ; transactTime ? : number ; price ? : number ; origQty ? : number ; executedQty ? : number ; cummulativeQuoteQty ? : number ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; } export interface MarginOrderResponseFull { symbol ? : string ; orderId ? : number ; clientOrderId ? : string ; transactTime ? : number ; price ? : number ; origQty ? : number ; executedQty ? : number ; cummulativeQuoteQty ? : number ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; marginBuyBorrowAmount ? : number ; marginBuyBorrowAsset ? : string ; fills ? : { price ? : string ; qty ? : string ; commission ? : string ; commissionAsset ? : string ; } [ ] ; } export interface MarginTrade { commission ? : string ; commissionAsset ? : string ; id ? : number ; isBestMatch ? : boolean ; isBuyer ? : boolean ; isMaker ? : boolean ; orderId ? : number ; price ? : string ; qty ? : string ; symbol ? : string ; time ? : number ; } export interface OrderResponseAck { symbol ? : string ; orderId ? : number ; /** Unless OCO, value will be -1 */ orderListId ? : number ; clientOrderId ? : string ; transactTime ? : number ; } export interface OrderResponseResult { symbol ? : string ; orderId ? : number ; /** Unless OCO, value will be -1 */ orderListId ? : number ; clientOrderId ? : string ; transactTime ? : number ; price ? : number ; origQty ? : number ; executedQty ? : number ; cummulativeQuoteQty ? : number ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; } export interface OrderResponseFull { symbol ? : string ; orderId ? : number ; /** Unless OCO, value will be -1 */ orderListId ? : number ; clientOrderId ? : string ; transactTime ? : number ; price ? : number ; origQty ? : number ; executedQty ? : number ; cummulativeQuoteQty ? : number ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; fills ? : { price ? : string ; qty ? : string ; commission ? : string ; commissionAsset ? : string ; } [ ] ; } export interface OCOOrder { orderListId ? : number ; contingencyType ? : string ; listStatusType ? : string ; listOrderStatus ? : string ; listClientOrderId ? : string ; transactionTime ? : number ; symbol ? : string ; orders ? : { symbol ? : string ; orderId ? : number ; clientOrderId ? : string ; } [ ] ; } export interface OCOOrderReport { orderListId ? : number ; contingencyType ? : string ; listStatusType ? : string ; listOrderStatus ? : string ; listClientOrderId ? : string ; transactionTime ? : number ; symbol ? : string ; orders ? : { symbol ? : string ; orderId ? : number ; clientOrderId ? : string ; } [ ] ; orderReports ? : Order [ ] ; } export type BookTickerList = BookTicker [ ] ; export interface BookTicker { symbol ? : string ; bidPrice ? : string ; bidQty ? : string ; askPrice ? : string ; askQty ? : string ; } export type PriceTickerList = PriceTicker [ ] ; export interface PriceTicker { symbol ? : string ; price ? : string ; } export type TickerList = Ticker [ ] ; export interface Ticker { symbol ? : string ; priceChange ? : string ; priceChangePercent ? : string ; prevClosePrice ? : string ; lastPrice ? : string ; bidPrice ? : string ; bidQty ? : string ; askPrice ? : string ; askQty ? : string ; openPrice ? : string ; highPrice ? : string ; lowPrice ? : string ; volume ? : string ; quoteVolume ? : string ; openTime ? : number ; closeTime ? : number ; firstId ? : number ; lastId ? : number ; count ? : number ; } export interface MyTrade { symbol ? : string ; /** trade id */ id ? : number ; orderId ? : number ; orderListId ? : number ; /** price */ price ? : string ; /** amount of base asset */ qty ? : string ; /** amount of quote asset */ quoteQty ? : string ; commission ? : string ; commissionAsset ? : string ; /** trade timestamp */ time ? : number ; isBuyer ? : boolean ; isMaker ? : boolean ; isBestMatch ? : boolean ; } export interface Transaction { /** transaction id */ tranId ? : number ; } export interface Trade { /** trade id */ id ? : number ; /** price */ price ? : string ; /** amount of base asset */ qty ? : string ; /** amount of quote asset */ quoteQty ? : string ; /** trade timestamp */ time ? : number ; isBuyerMaker ? : boolean ; isBestMatch ? : boolean ; } export interface AggTrade { /** trade id */ a ? : number ; /** price */ p ? : string ; /** amount of base asset */ q ? : string ; /** First tradeId */ f ? : number ; /** Last tradeId */ l ? : number ; /** Timestamp */ T ? : boolean ; /** Was the buyer the maker? */ m ? : boolean ; /** Was the trade the best price match? */ M ? : boolean ; } export interface Error { /** error code */ code ? : number ; /** error message */ msg ? : string ; } export type RequestParams = Omit < RequestInit , 'body' | 'method' > & { secure ? : boolean ; } ; export type RequestQueryParamsType = Record < string | number , any > ; interface ApiConfig < SecurityDataType > { baseUrl ? : string ; baseApiParams ? : RequestParams ; securityWorker ? : ( securityData : SecurityDataType ) => RequestParams ; } interface HttpResponse < D extends unknown , E extends unknown = unknown > extends Response { data : D ; error : E ; } enum BodyType { Json , FormData } export class HttpClient < SecurityDataType = unknown > { public baseUrl : string = 'https://api.binance.com' ; private securityData : SecurityDataType = null as any ; private securityWorker : null | ApiConfig < SecurityDataType > [ 'securityWorker' ] = null ; private baseApiParams : RequestParams = { credentials : 'same-origin' , headers : { 'Content-Type' : 'application/json' , } , redirect : 'follow' , referrerPolicy : 'no-referrer' , } ; constructor ( apiConfig = { } ) { Object . assign ( this , apiConfig ) ; } public setSecurityData = ( data ) => { this . securityData = data ; } ; private addQueryParam ( query , key ) { return ( encodeURIComponent ( key ) + '=' + encodeURIComponent ( Array . isArray ( query [ key ] ) ? query [ key ] . join ( ',' ) : query [ key ] ) ) ; } protected addQueryParams ( rawQuery ? ) { const query = rawQuery || { } ; const keys = Object . keys ( query ) . filter ( ( key ) => 'undefined' !== typeof query [ key ] ) ; return keys . length ? `?${ keys . map ( ( key ) => typeof query [ key ] === 'object' && ! Array . isArray ( query [ key ] ) ? this . addQueryParams ( query [ key ] as object ) . substring ( 1 ) : this . addQueryParam ( query , key ) ) . join ( '&' ) }` : '' ; } private bodyFormatters : Record < BodyType , ( input : any ) => any > = { [ BodyType . Json ] : JSON . stringify , [ BodyType . FormData ] : ( input ) => Object . keys ( input ) . reduce ( ( data , key ) => { data . append ( key , input [ key ] ) ; return data ; } , new FormData ( ) ) , } ; private mergeRequestOptions ( params , securityParams ? ) { return { ... this . baseApiParams , ... params , ... ( securityParams || { } ) , headers : { ... ( this . baseApiParams . headers || { } ) , ... ( params . headers || { } ) , ... ( ( securityParams && securityParams . headers ) || { } ) , } , } ; } private safeParseResponse = < T = any , E = any > ( response ) : Promise < HttpResponse < T , E > > => { const r = response as HttpResponse < T , E > ; r . data = null as unknown as T ; r . error = null as unknown as E ; return response . json ( ) . then ( ( data ) => { if ( r . ok ) { r . data = data ; } else { r . error = data ; } return r ; } ) . catch ( ( e ) => { r . error = e ; return r ; } ) ; } ; public request = < T = any , E = any > ( path , method , { secure , ... params } = { } , body ? , bodyType ? , secureByDefault ? ) : Promise < HttpResponse < T > > => { const requestUrl = `${ this . baseUrl }${ path }` ; const secureOptions = ( secureByDefault || secure ) && this . securityWorker ? this . securityWorker ( this . securityData ) : { } ; const requestOptions = { ... this . mergeRequestOptions ( params , secureOptions ) , method , body : body ? this . bodyFormatters [ bodyType || BodyType . Json ] ( body ) : null , } ; return fetch ( requestUrl , requestOptions ) . then ( async ( response ) => { const data = await this . safeParseResponse < T , E > ( response ) ; if ( ! response . ok ) throw data ; return data ; } ) ; } ; } title version baseUrl export class Api < SecurityDataType = any > extends HttpClient < SecurityDataType > { api = { description tags name summary request v3PingList : ( params ? ) => this . request < any , any > ( `/api/v3/ping` , 'GET' , params ) , description tags name summary request v3TimeList : ( params ? ) => this . request < { serverTime ? : number ; } , any > ( `/api/v3/time` , 'GET' , params ) , description tags name summary request v3ExchangeInfoList : ( params ? ) => this . request < { timezone ? : string ; serverTime ? : number ; rateLimits ? : { rateLimitType ? : string ; interval ? : string ; intervalNum ? : number ; limit ? : number ; } [ ] ; exchangeFilters ? : object [ ] ; symbols ? : { symbol ? : string ; status ? : string ; baseAsset ? : string ; baseAssetPrecision ? : number ; quoteAsset ? : string ; quoteAssetPrecision ? : number ; baseCommissionPrecision ? : number ; quoteCommissionPrecision ? : number ; orderTypes ? : string [ ] ; icebergAllowed ? : boolean ; ocoAllowed ? : boolean ; quoteOrderQtyMarketAllowed ? : boolean ; isSpotTradingAllowed ? : boolean ; isMarginTradingAllowed ? : boolean ; filters ? : { filterType ? : string ; minPrice ? : string ; maxPrice ? : string ; tickSize ? : string ; } [ ] ; permissions ? : string [ ] ; } [ ] ; } , any > ( `/api/v3/exchangeInfo` , 'GET' , params ) , description tags name summary request v3DepthList : ( query , params ? ) => this . request < { lastUpdateId ? : number ; bids ? : string [ ] [ ] [ ] ; asks ? : string [ ] [ ] [ ] ; } , Error > ( `/api/v3/depth${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3TradesList : ( query , params ? ) => this . request < Trade [ ] , Error > ( `/api/v3/trades${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request secure v3HistoricalTradesList : ( query , params ? ) => this . request < Trade [ ] , Error > ( `/api/v3/historicalTrades${ this . addQueryParams ( query ) }` , 'GET' , params , null , BodyType . Json , true ) , description tags name summary request v3AggTradesList : ( query , params ? ) => this . request < AggTrade [ ] , Error > ( `/api/v3/aggTrades${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3KlinesList : ( query , params ? ) => this . request < any [ ] , Error > ( `/api/v3/klines${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3AvgPriceList : ( query , params ? ) => this . request < { mins ? : number ; price ? : string ; } , Error > ( `/api/v3/avgPrice${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3Ticker24HrList : ( query ? , params ? ) => this . request < Ticker | TickerList , Error > ( `/api/v3/ticker/24hr${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3TickerPriceList : ( query ? , params ? ) => this . request < PriceTicker | PriceTickerList , Error > ( `/api/v3/ticker/price${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3TickerBookTickerList : ( query ? , params ? ) => this . request < BookTicker | BookTickerList , Error > ( `/api/v3/ticker/bookTicker${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request secure v3OrderTestCreate : ( query , params ? ) => this . request < any , Error > ( `/api/v3/order/test${ this . addQueryParams ( query ) }` , 'POST' , params , null , BodyType . Json , true ) , description tags name summary request v3OrderList : ( query , params ? ) => this . request < OrderDetails , Error > ( `/api/v3/order${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request secure v3OrderCreate : ( query , params ? ) => this . request < OrderResponseAck | OrderResponseResult | OrderResponseFull , Error > ( `/api/v3/order${ this . addQueryParams ( query ) }` , 'POST' , params , null , BodyType . Json , true ) , description tags name summary request v3OrderDelete : ( query , params ? ) => this . request < Order , Error > ( `/api/v3/order${ this . addQueryParams ( query ) }` , 'DELETE' , params ) , description tags name summary request v3OpenOrdersList : ( query , params ? ) => this . request < OrderDetails [ ] , Error > ( `/api/v3/openOrders${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3OpenOrdersDelete : ( query , params ? ) => this . request < Order [ ] , Error > ( `/api/v3/openOrders${ this . addQueryParams ( query ) }` , 'DELETE' , params ) , description tags name summary request v3AllOrdersList : ( query , params ? ) => this . request < OrderDetails [ ] , Error > ( `/api/v3/allOrders${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3OrderOcoCreate : ( query , params ? ) => this . request < { orderListId ? : number ; contingencyType ? : string ; listStatusType ? : string ; listOrderStatus ? : string ; listClientOrderId ? : string ; transactionTime ? : number ; symbol ? : string ; orders ? : { symbol ? : string ; orderId ? : number ; clientOrderId ? : string ; } [ ] ; orderReports ? : { symbol ? : string ; orderId ? : number ; orderListId ? : number ; clientOrderId ? : string ; transactTime ? : number ; price ? : string ; origQty ? : string ; executedQty ? : string ; cummulativeQuoteQty ? : string ; status ? : string ; timeInForce ? : string ; type ? : string ; side ? : string ; stopPrice ? : string ; } [ ] ; } , Error > ( `/api/v3/order/oco${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v3OrderListList : ( query , params ? ) => this . request < OCOOrder , Error > ( `/api/v3/orderList${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3OrderListDelete : ( query , params ? ) => this . request < OCOOrderReport , Error > ( `/api/v3/orderList${ this . addQueryParams ( query ) }` , 'DELETE' , params ) , description tags name summary request v3AllOrderListList : ( query , params ? ) => this . request < OCOOrder [ ] , Error > ( `/api/v3/allOrderList${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3OpenOrderListList : ( query , params ? ) => this . request < OCOOrder [ ] , Error > ( `/api/v3/openOrderList${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3AccountList : ( query , params ? ) => this . request < Account , Error > ( `/api/v3/account${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3MyTradesList : ( query , params ? ) => this . request < MyTrade , Error > ( `/api/v3/myTrades${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3UserDataStreamCreate : ( params ? ) => this . request < { listenKey ? : string ; } , Error > ( `/api/v3/userDataStream` , 'POST' , params ) , description tags name summary request v3UserDataStreamUpdate : ( query ? , params ? ) => this . request < object , Error > ( `/api/v3/userDataStream${ this . addQueryParams ( query ) }` , 'PUT' , params ) , description tags name summary request v3UserDataStreamDelete : ( query ? , params ? ) => this . request < object , Error > ( `/api/v3/userDataStream${ this . addQueryParams ( query ) }` , 'DELETE' , params ) , } ; sapi = { description tags name summary request v1MarginTransferCreate : ( query , params ? ) => this . request < Transaction , Error > ( `/sapi/v1/margin/transfer${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1MarginTransferList : ( query , params ? ) => this . request < object , Error > ( `/sapi/v1/margin/transfer${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginLoanCreate : ( query , params ? ) => this . request < Transaction , Error > ( `/sapi/v1/margin/loan${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1MarginLoanList : ( query , params ? ) => this . request < object , Error > ( `/sapi/v1/margin/loan${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginRepayCreate : ( query , params ? ) => this . request < Transaction , Error > ( `/sapi/v1/margin/repay${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1MarginRepayList : ( query , params ? ) => this . request < { rows ? : { amount ? : string ; asset ? : string ; interest ? : string ; principal ? : string ; status ? : string ; timestamp ? : number ; txId ? : number ; } [ ] ; total ? : number ; } , Error > ( `/sapi/v1/margin/repay${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request secure v1MarginAssetList : ( query , params ? ) => this . request < { assetFullName ? : string ; assetName ? : string ; isBorrowable ? : boolean ; isMortgageable ? : boolean ; userMinBorrow ? : string ; userMinRepay ? : string ; } , Error > ( `/sapi/v1/margin/asset${ this . addQueryParams ( query ) }` , 'GET' , params , null , BodyType . Json , true ) , description tags name summary request v1MarginPairList : ( query , params ? ) => this . request < { id ? : number ; symbol ? : string ; base ? : string ; quote ? : string ; isMarginTrade ? : boolean ; isBuyAllowed ? : boolean ; isSellAllowed ? : boolean ; } , Error > ( `/sapi/v1/margin/pair${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request secure v1MarginAllAssetsList : ( params ? ) => this . request < { assetFullName ? : string ; assetName ? : string ; isBorrowable ? : boolean ; isMortgageable ? : boolean ; userMinBorrow ? : string ; userMinRepay ? : string ; } [ ] , Error > ( `/sapi/v1/margin/allAssets` , 'GET' , params , null , BodyType . Json , true ) , description tags name summary request secure v1MarginAllPairsList : ( params ? ) => this . request < { base ? : string ; id ? : number ; isBuyAllowed ? : boolean ; isMarginTrade ? : boolean ; isSellAllowed ? : boolean ; quote ? : string ; symbol ? : string ; } [ ] , Error > ( `/sapi/v1/margin/allPairs` , 'GET' , params , null , BodyType . Json , true ) , description tags name summary request secure v1MarginPriceIndexList : ( query , params ? ) => this . request < { calcTime ? : number ; price ? : string ; symbol ? : string ; } , Error > ( `/sapi/v1/margin/priceIndex${ this . addQueryParams ( query ) }` , 'GET' , params , null , BodyType . Json , true ) , description tags name summary request v1MarginOrderList : ( query , params ? ) => this . request < MarginOrderDetail , Error > ( `/sapi/v1/margin/order${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginOrderCreate : ( query , params ? ) => this . request < MarginOrderResponseAck | MarginOrderResponseResult | MarginOrderResponseFull , Error > ( `/sapi/v1/margin/order${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1MarginOrderDelete : ( query , params ? ) => this . request < MarginOrder , Error > ( `/sapi/v1/margin/order${ this . addQueryParams ( query ) }` , 'DELETE' , params ) , description tags name summary request v1MarginInterestHistoryList : ( query , params ? ) => this . request < { rows ? : { asset ? : string ; interest ? : string ; interestAccuredTime ? : number ; interestRate ? : string ; principal ? : string ; type ? : string ; } [ ] ; total ? : number ; } , Error > ( `/sapi/v1/margin/interestHistory${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginForceLiquidationRecList : ( query , params ? ) => this . request < object , any > ( `/sapi/v1/margin/forceLiquidationRec${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginAccountList : ( query , params ? ) => this . request < { borrowEnabled ? : boolean ; marginLevel ? : string ; totalAssetOfBtc ? : string ; totalLiabilityOfBtc ? : string ; totalNetAssetOfBtc ? : string ; tradeEnabled ? : boolean ; transferEnabled ? : boolean ; userAssets ? : { asset ? : string ; borrowed ? : string ; free ? : string ; interest ? : string ; locked ? : string ; netAsset ? : string ; } [ ] ; } , Error > ( `/sapi/v1/margin/account${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginOpenOrdersList : ( query , params ? ) => this . request < MarginOrderDetail [ ] , Error > ( `/sapi/v1/margin/openOrders${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginAllOrdersList : ( query , params ? ) => this . request < MarginOrderDetail [ ] , Error > ( `/sapi/v1/margin/allOrders${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginMyTradesList : ( query , params ? ) => this . request < MarginTrade [ ] , Error > ( `/sapi/v1/margin/myTrades${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginMaxBorrowableList : ( query , params ? ) => this . request < object , Error > ( `/sapi/v1/margin/maxBorrowable${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1MarginMaxTransferableList : ( query , params ? ) => this . request < object , Error > ( `/sapi/v1/margin/maxTransferable${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1CapitalConfigGetallList : ( query , params ? ) => this . request < { coin ? : string ; depositAllEnable ? : boolean ; free ? : string ; freeze ? : string ; ipoable ? : string ; ipoing ? : string ; isLegalMoney ? : number ; locked ? : string ; name ? : string ; networkList ? : { addressRegex ? : string ; coin ? : string ; depositDesc ? : string ; depositEnable ? : boolean ; isDefault ? : boolean ; memoRegex ? : string ; minConfirm ? : number ; name ? : string ; resetAddressStatus ? : boolean ; specialTips ? : string ; unLockConfirm ? : number ; withdrawDesc ? : string ; withdrawEnable ? : boolean ; withdrawFee ? : string ; withdrawMin ? : string ; } [ ] ; storage ? : string ; trading ? : boolean ; withdrawAllEnable ? : boolean ; withdrawing ? : string ; } , Error > ( `/sapi/v1/capital/config/getall${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1AccountSnapshotList : ( query , params ? ) => this . request < { code ? : number ; msg ? : string ; snapshotVos ? : { data ? : { balances ? : { asset ? : string ; free ? : string ; locked ? : string ; } [ ] ; totalAssetOfBtc ? : string ; } ; type ? : string ; updateTime ? : number ; } [ ] ; } , Error > ( `/sapi/v1/accountSnapshot${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1AccountDisableFastWithdrawSwitchCreate : ( query , params ? ) => this . request < any , Error > ( `/sapi/v1/account/disableFastWithdrawSwitch${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1AccountEnableFastWithdrawSwitchCreate : ( query , params ? ) => this . request < any , Error > ( `/sapi/v1/account/enableFastWithdrawSwitch${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1CapitalWithdrawApplyCreate : ( query , params ? ) => this . request < { id ? : string ; } , Error > ( `/sapi/v1/capital/withdraw/apply${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1CapitalDepositHisrecList : ( query , params ? ) => this . request < { address ? : string ; addressTag ? : string ; amount ? : string ; coin ? : string ; insertTime ? : number ; network ? : string ; status ? : number ; txId ? : string ; } [ ] , any > ( `/sapi/v1/capital/deposit/hisrec${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1CapitalWithdrawHistoryList : ( query , params ? ) => this . request < { address ? : string ; amount ? : string ; applyTime ? : string ; coin ? : string ; id ? : string ; network ? : string ; status ? : number ; txId ? : string ; } [ ] , Error > ( `/sapi/v1/capital/withdraw/history${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1CapitalDepositAddressList : ( query , params ? ) => this . request < { address ? : string ; coin ? : string ; tag ? : string ; url ? : string ; } , Error > ( `/sapi/v1/capital/deposit/address${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1AssetDustCreate : ( query , params ? ) => this . request < { totalServiceCharge ? : string ; totalTransfered ? : string ; transferResult ? : { amount ? : string ; fromAsset ? : string ; operateTime ? : number ; serviceChargeAmount ? : string ; tranId ? : number ; transferedAmount ? : string ; } [ ] ; } , Error > ( `/sapi/v1/asset/dust${ this . addQueryParams ( query ) }` , 'POST' , params ) , description tags name summary request v1AssetAssetDividendList : ( query , params ? ) => this . request < { rows ? : { amount ? : string ; asset ? : string ; divTime ? : number ; enInfo ? : string ; tranId ? : number ; } [ ] ; total ? : number ; } , Error > ( `/sapi/v1/asset/assetDividend${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v1UserDataStreamCreate : ( params ? ) => this . request < { listenKey ? : string ; } , Error > ( `/sapi/v1/userDataStream` , 'POST' , params ) , description tags name summary request v1UserDataStreamUpdate : ( query ? , params ? ) => this . request < object , Error > ( `/sapi/v1/userDataStream${ this . addQueryParams ( query ) }` , 'PUT' , params ) , description tags name summary request v1UserDataStreamDelete : ( query ? , params ? ) => this . request < object , Error > ( `/sapi/v1/userDataStream${ this . addQueryParams ( query ) }` , 'DELETE' , params ) , } ; wapi = { description tags name summary request v3SystemStatusHtmlList : ( params ? ) => this . request < object , any > ( `/wapi/v3/systemStatus.html` , 'GET' , params ) , description tags name summary request v3AccountStatusHtmlList : ( query , params ? ) => this . request < { msg ? : string ; success ? : boolean ; } , Error > ( `/wapi/v3/accountStatus.html${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3ApiTradingStatusHtmlList : ( query , params ? ) => this . request < { success ? : boolean ; status ? : { isLocked ? : boolean ; plannedRecoverTime ? : number ; triggerCondition ? : { gcr ? : number ; ifer ? : number ; ufr ? : number ; } ; indicators ? : { BTCUSDT ? : { i ? : string ; c ? : number ; v ? : number ; t ? : number ; } [ ] ; } ; updateTime ? : number ; } ; } , Error > ( `/wapi/v3/apiTradingStatus.html${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3UserAssetDribbletLogHtmlList : ( query , params ? ) => this . request < { success ? : boolean ; results ? : { total ? : number ; rows ? : { transfered_total ? : string ; service_charge_total ? : string ; tran_id ? : number ; logs ? : { tranId ? : number ; serviceChargeAmount ? : string ; uid ? : string ; amount ? : string ; operateTime ? : string ; transferedAmount ? : string ; fromAsset ? : string ; } [ ] ; operate_item ? : string ; } [ ] ; } ; } , Error > ( `/wapi/v3/userAssetDribbletLog.html${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3AssetDetailHtmlList : ( query , params ? ) => this . request < { success ? : boolean ; assetDetail ? : { CTR ? : { minWithdrawAmount ? : string ; depositStatus ? : boolean ; withdrawFee ? : string ; withdrawStatus ? : boolean ; } ; } ; } , Error > ( `/wapi/v3/assetDetail.html${ this . addQueryParams ( query ) }` , 'GET' , params ) , description tags name summary request v3TradeFeeHtmlList : ( query , params ? ) => this . request < { success ? : boolean ; tradeFee ? : { symbol ? : string ; maker ? : number ; taker ? : number ; } [ ] ; } , Error > ( `/wapi/v3/tradeFee.html${ this . addQueryParams ( query ) }` , 'GET' , params ) , } ; }