Comparing version 2.0.28 to 2.0.29
@@ -16,3 +16,3 @@ import { AxiosRequestConfig } from 'axios'; | ||
* | ||
**/ | ||
**/ | ||
getSystemStatus(): Promise<SystemStatusResponse>; | ||
@@ -47,3 +47,3 @@ getBalances(): Promise<AllCoinsInformationResponse[]>; | ||
* | ||
**/ | ||
**/ | ||
createVirtualSubAccount(params: CreateSubAccountParams): Promise<VirtualSubAccount>; | ||
@@ -99,3 +99,3 @@ getSubAccountList(params?: SubAccountListParams): Promise<SubAccountListResponse>; | ||
* | ||
**/ | ||
**/ | ||
testConnectivity(): Promise<{}>; | ||
@@ -116,3 +116,3 @@ getExchangeInfo(params?: ExchangeInfoParams): Promise<ExchangeInfo>; | ||
* | ||
**/ | ||
**/ | ||
testNewOrder(params: NewSpotOrderParams): Promise<{}>; | ||
@@ -136,3 +136,3 @@ submitNewOrder(params: NewSpotOrderParams): Promise<OrderResponseACK | OrderResponseResult | OrderResponseFull>; | ||
* | ||
**/ | ||
**/ | ||
crossMarginAccountTransfer(params: CrossMarginAccountTransferParams): Promise<MarginTransactionResponse>; | ||
@@ -165,3 +165,3 @@ marginAccountBorrow(params: MarginAccountLoanParams): Promise<MarginTransactionResponse>; | ||
* | ||
**/ | ||
**/ | ||
getSpotUserDataListenKey(): Promise<{ | ||
@@ -194,3 +194,3 @@ listenKey: string; | ||
* | ||
**/ | ||
**/ | ||
/** | ||
@@ -200,3 +200,3 @@ * | ||
* | ||
**/ | ||
**/ | ||
/** | ||
@@ -207,3 +207,3 @@ * | ||
* | ||
**/ | ||
**/ | ||
/** | ||
@@ -213,3 +213,3 @@ * | ||
* | ||
**/ | ||
**/ | ||
/** | ||
@@ -219,3 +219,3 @@ * | ||
* | ||
**/ | ||
**/ | ||
/** | ||
@@ -222,0 +222,0 @@ * Validate syntax meets requirements set by binance. Log warning if not. |
@@ -38,3 +38,3 @@ "use strict"; | ||
* | ||
**/ | ||
**/ | ||
getSystemStatus() { | ||
@@ -101,3 +101,3 @@ return this.get('sapi/v1/system/status'); | ||
* | ||
**/ | ||
**/ | ||
createVirtualSubAccount(params) { | ||
@@ -152,3 +152,5 @@ return this.postPrivate('sapi/v1/sub-account/virtualSubAccount', params); | ||
getSubAccountFuturesPositionRisk(email) { | ||
return this.getPrivate('sapi/v1/sub-account/futures/positionRisk', { email }); | ||
return this.getPrivate('sapi/v1/sub-account/futures/positionRisk', { | ||
email, | ||
}); | ||
} | ||
@@ -222,6 +224,10 @@ subAccountFuturesTransfer(params) { | ||
if (days === 7) { | ||
return this.getPrivate('sapi/v1/apiReferral/rebate/recentRecord', { customerId }); | ||
return this.getPrivate('sapi/v1/apiReferral/rebate/recentRecord', { | ||
customerId, | ||
}); | ||
} | ||
if (days === 30) { | ||
return this.getPrivate('sapi/v1/apiReferral/rebate/historicalRecord', { customerId }); | ||
return this.getPrivate('sapi/v1/apiReferral/rebate/historicalRecord', { | ||
customerId, | ||
}); | ||
} | ||
@@ -233,3 +239,3 @@ } | ||
* | ||
**/ | ||
**/ | ||
testConnectivity() { | ||
@@ -242,5 +248,8 @@ return this.get('api/v3/ping'); | ||
let urlSuffix = ''; | ||
if (symbols || symbol) { | ||
urlSuffix += '?' + (symbols || symbol); | ||
if (symbol) { | ||
urlSuffix += '?symbol=' + symbol; | ||
} | ||
else if (symbols) { | ||
urlSuffix += '?' + symbols; | ||
} | ||
return this.get('api/v3/exchangeInfo' + urlSuffix); | ||
@@ -282,3 +291,3 @@ } | ||
* | ||
**/ | ||
**/ | ||
testNewOrder(params) { | ||
@@ -336,3 +345,3 @@ this.validateOrderId(params, 'newClientOrderId'); | ||
* | ||
**/ | ||
**/ | ||
crossMarginAccountTransfer(params) { | ||
@@ -435,3 +444,3 @@ return this.postPrivate('sapi/v1/margin/transfer', params); | ||
* | ||
**/ | ||
**/ | ||
// spot | ||
@@ -471,3 +480,3 @@ getSpotUserDataListenKey() { | ||
* | ||
**/ | ||
**/ | ||
//TODO: https://binance-docs.github.io/apidocs/spot/en/#savings-endpoints | ||
@@ -478,3 +487,3 @@ /** | ||
* | ||
**/ | ||
**/ | ||
//TODO: https://binance-docs.github.io/apidocs/spot/en/#mining-endpoints | ||
@@ -486,3 +495,3 @@ /** | ||
* | ||
**/ | ||
**/ | ||
//TODO: https://binance-docs.github.io/apidocs/spot/en/#futures | ||
@@ -493,3 +502,3 @@ /** | ||
* | ||
**/ | ||
**/ | ||
//TODO: https://binance-docs.github.io/apidocs/spot/en/#blvt-endpoints | ||
@@ -500,3 +509,3 @@ /** | ||
* | ||
**/ | ||
**/ | ||
//TODO: https://binance-docs.github.io/apidocs/spot/en/#bswap-endpoints | ||
@@ -519,3 +528,2 @@ /** | ||
exports.MainClient = MainClient; | ||
; | ||
/** | ||
@@ -522,0 +530,0 @@ * @deprecated use MainClient instead of SpotClient (it is the same) |
@@ -1,2 +0,2 @@ | ||
import { BooleanString, BooleanStringCapitalised, ExchangeFilter, KlineInterval, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SymbolFilter } from "./shared"; | ||
import { BooleanString, BooleanStringCapitalised, ExchangeFilter, KlineInterval, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SymbolFilter } from './shared'; | ||
export declare type FuturesContractType = 'PERPETUAL' | 'CURRENT_MONTH' | 'NEXT_MONTH' | 'CURRENT_QUARTER' | 'NEXT_QUARTER'; | ||
@@ -50,3 +50,3 @@ export interface ContinuousContractKlinesParams { | ||
positionSide?: PositionSide; | ||
type: OrderType; | ||
type: FuturesOrderType; | ||
timeInForce?: OrderTimeInForce; | ||
@@ -53,0 +53,0 @@ quantity?: number; |
@@ -19,3 +19,2 @@ "use strict"; | ||
})(EnumPositionMarginChangeType = exports.EnumPositionMarginChangeType || (exports.EnumPositionMarginChangeType = {})); | ||
; | ||
//# sourceMappingURL=futures.js.map |
@@ -72,3 +72,5 @@ export declare type numberInString = string | number; | ||
origClientOrderId?: string; | ||
/** For isolated margin trading only */ | ||
newClientOrderId?: string; | ||
/** For isolated margin trading only */ | ||
isIsolated?: StringBoolean; | ||
@@ -78,2 +80,3 @@ } | ||
symbol: string; | ||
/** For isolated margin trading only */ | ||
isIsolated?: string; | ||
@@ -98,3 +101,5 @@ orderListId?: number; | ||
newOrderRespType: OrderResponseType; | ||
/** For isolated margin trading only */ | ||
isIsolated?: StringBoolean; | ||
/** Define a side effect, only for margin trading */ | ||
sideEffectType?: SideEffects; | ||
@@ -115,2 +120,3 @@ } | ||
limit?: number; | ||
/** For isolated margin trading only */ | ||
isIsolated?: StringBoolean; | ||
@@ -189,3 +195,6 @@ } | ||
export declare type OrderBookAmountFormatted = number; | ||
export declare type OrderBookRowFormatted = [OrderBookPriceFormatted, OrderBookAmountFormatted]; | ||
export declare type OrderBookRowFormatted = [ | ||
OrderBookPriceFormatted, | ||
OrderBookAmountFormatted | ||
]; | ||
export interface GenericCodeMsgError { | ||
@@ -192,0 +201,0 @@ code: number; |
@@ -1,2 +0,2 @@ | ||
import { ExchangeFilter, ExchangeSymbol, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SymbolFilter, StringBoolean, SideEffects } from "./shared"; | ||
import { ExchangeFilter, ExchangeSymbol, numberInString, OrderBookRow, OrderResponseType, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SymbolFilter, StringBoolean, SideEffects } from './shared'; | ||
export interface BasicTimeRangeParam { | ||
@@ -3,0 +3,0 @@ startTime?: number; |
@@ -17,3 +17,3 @@ import { AxiosRequestConfig } from 'axios'; | ||
* | ||
**/ | ||
**/ | ||
testConnectivity(): Promise<{}>; | ||
@@ -46,3 +46,3 @@ getExchangeInfo(): Promise<FuturesExchangeInfo>; | ||
* | ||
**/ | ||
**/ | ||
setPositionMode(params: PositionModeParams): Promise<ModeChangeResult>; | ||
@@ -85,3 +85,3 @@ getCurrentPositionMode(): Promise<PositionModeResponse>; | ||
* | ||
**/ | ||
**/ | ||
getBrokerIfNewFuturesUser(brokerId: string, type?: 1 | 2): Promise<{ | ||
@@ -106,3 +106,3 @@ brokerId: string; | ||
* | ||
**/ | ||
**/ | ||
getFuturesUserDataListenKey(): Promise<{ | ||
@@ -109,0 +109,0 @@ listenKey: string; |
@@ -30,4 +30,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.get(requestUtils_1.getServerTimeEndpoint(this.clientId)) | ||
.then(response => response.serverTime); | ||
return this.get(requestUtils_1.getServerTimeEndpoint(this.clientId)).then((response) => response.serverTime); | ||
}); | ||
@@ -39,3 +38,3 @@ } | ||
* | ||
**/ | ||
**/ | ||
testConnectivity() { | ||
@@ -114,3 +113,3 @@ return this.get('fapi/v1/ping'); | ||
* | ||
**/ | ||
**/ | ||
setPositionMode(params) { | ||
@@ -136,3 +135,3 @@ return this.postPrivate('fapi/v1/positionSide/dual', params); | ||
submitMultipleOrders(batchOrders) { | ||
batchOrders.forEach(order => this.validateOrderId(order, 'newClientOrderId')); | ||
batchOrders.forEach((order) => this.validateOrderId(order, 'newClientOrderId')); | ||
return this.postPrivate('fapi/v1/batchOrders', { batchOrders }); | ||
@@ -211,3 +210,3 @@ } | ||
* | ||
**/ | ||
**/ | ||
// 1 == USDT-Margined, 2 == Coin-margined | ||
@@ -272,3 +271,3 @@ getBrokerIfNewFuturesUser(brokerId, type = 1) { | ||
* | ||
**/ | ||
**/ | ||
// USD-M Futures | ||
@@ -300,3 +299,2 @@ getFuturesUserDataListenKey() { | ||
exports.USDMClient = USDMClient; | ||
; | ||
//# sourceMappingURL=usdm-client.js.map |
{ | ||
"name": "binance", | ||
"version": "2.0.28", | ||
"version": "2.0.29", | ||
"description": "Node.js connector for Binance's REST APIs and WebSockets, with TypeScript & integration tests.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
346368
6295