Comparing version
import { AxiosRequestConfig } from 'axios'; | ||
import { ClassicPortfolioMarginAccount, ClassicPortfolioMarginNotionalLimit, CoinMAccountTradeParams, CoinMOpenInterest, CoinMPositionTrade, CoinMSymbolOrderBookTicker, FundingRate, FuturesTransactionHistoryDownloadLink, GetClassicPortfolioMarginNotionalLimitParams, PositionRisk, SymbolOrPair } from './types/coin'; | ||
import { ClassicPortfolioMarginAccount, ClassicPortfolioMarginNotionalLimit, CoinMAccountTradeParams, CoinMOpenInterest, CoinMPositionTrade, CoinMSymbolOrderBookTicker, FundingRate, FuturesTransactionHistoryDownloadLink, GetClassicPortfolioMarginNotionalLimitParams, PositionRisk } from './types/coin'; | ||
import { AggregateFuturesTrade, CancelAllOpenOrdersResult, CancelFuturesOrderResult, CancelMultipleOrdersParams, CancelOrdersTimeoutParams, ChangeStats24hr, ContinuousContractKlinesParams, ForceOrderResult, FundingRateHistory, FuturesCoinMAccountBalance, FuturesCoinMAccountInformation, FuturesCoinMBasisParams, FuturesCoinMTakerBuySellVolumeParams, FuturesDataPaginatedParams, FuturesExchangeInfo, FuturesOrderBook, GetForceOrdersParams, GetIncomeHistoryParams, GetPositionMarginChangeHistoryParams, IncomeHistory, IndexPriceConstituents, IndexPriceKlinesParams, MarkPrice, ModeChangeResult, ModifyFuturesOrderParams, ModifyFuturesOrderResult, NewFuturesOrderParams, NewOrderError, NewOrderResult, OrderAmendment, OrderResult, PositionModeParams, PositionModeResponse, QuarterlyContractSettlementPrice, RawFuturesTrade, RebateDataOverview, SetCancelTimeoutResult, SetIsolatedMarginParams, SetIsolatedMarginResult, SetLeverageParams, SetLeverageResult, SetMarginTypeParams, SymbolKlinePaginatedParams, SymbolLeverageBracketsResult, UserCommissionRate } from './types/futures'; | ||
import { BasicSymbolPaginatedParams, BasicSymbolParam, CancelOrderParams, GenericCodeMsgError, GetAllOrdersParams, GetOrderModifyHistoryParams, GetOrderParams, HistoricalTradesParams, Kline, KlinesParams, OrderBookParams, RecentTradesParams, SymbolFromPaginatedRequestFromId, SymbolPrice } from './types/shared'; | ||
import { BasicSymbolPaginatedParams, CancelOrderParams, GenericCodeMsgError, GetAllOrdersParams, GetOrderModifyHistoryParams, GetOrderParams, HistoricalTradesParams, Kline, KlinesParams, OrderBookParams, RecentTradesParams, SymbolFromPaginatedRequestFromId, SymbolPrice } from './types/shared'; | ||
import BaseRestClient from './util/BaseRestClient'; | ||
@@ -28,3 +28,5 @@ import { RestClientOptions } from './util/requestUtils'; | ||
*/ | ||
getMarkPrice(params?: Partial<BasicSymbolParam>): Promise<MarkPrice | MarkPrice[]>; | ||
getMarkPrice(params?: { | ||
symbol?: string; | ||
}): Promise<MarkPrice | MarkPrice[]>; | ||
getFundingRateHistory(params?: Partial<BasicSymbolPaginatedParams>): Promise<FundingRateHistory[]>; | ||
@@ -42,6 +44,17 @@ getFundingRate(params?: { | ||
*/ | ||
get24hrChangeStatististics(params?: Partial<BasicSymbolParam>): Promise<ChangeStats24hr | ChangeStats24hr[]>; | ||
get24hrChangeStatistics(params?: Partial<BasicSymbolParam>): Promise<ChangeStats24hr | ChangeStats24hr[]>; | ||
getSymbolPriceTicker(params?: Partial<BasicSymbolParam>): Promise<SymbolPrice | SymbolPrice[]>; | ||
getSymbolOrderBookTicker(params?: SymbolOrPair): Promise<CoinMSymbolOrderBookTicker[]>; | ||
get24hrChangeStatististics(params?: { | ||
symbol?: string; | ||
}): Promise<ChangeStats24hr | ChangeStats24hr[]>; | ||
get24hrChangeStatistics(params?: { | ||
symbol?: string; | ||
pair?: string; | ||
}): Promise<ChangeStats24hr | ChangeStats24hr[]>; | ||
getSymbolPriceTicker(params?: { | ||
symbol?: string; | ||
pair?: string; | ||
}): Promise<SymbolPrice | SymbolPrice[]>; | ||
getSymbolOrderBookTicker(params?: { | ||
symbol?: string; | ||
pair?: string; | ||
}): Promise<CoinMSymbolOrderBookTicker[]>; | ||
getOpenInterest(params: { | ||
@@ -52,3 +65,5 @@ symbol: string; | ||
getTopTradersLongShortAccountRatio(params: FuturesDataPaginatedParams): Promise<any>; | ||
getTopTradersLongShortPositionRatio(params: FuturesDataPaginatedParams): Promise<any>; | ||
getTopTradersLongShortPositionRatio(params: FuturesDataPaginatedParams & { | ||
pair?: string; | ||
}): Promise<any>; | ||
getGlobalLongShortAccountRatio(params: FuturesDataPaginatedParams): Promise<any>; | ||
@@ -94,7 +109,11 @@ getTakerBuySellVolume(params: FuturesCoinMTakerBuySellVolumeParams): Promise<any>; | ||
cancelMultipleOrders(params: CancelMultipleOrdersParams): Promise<(CancelFuturesOrderResult | GenericCodeMsgError)[]>; | ||
cancelAllOpenOrders(params: BasicSymbolParam): Promise<CancelAllOpenOrdersResult>; | ||
cancelAllOpenOrders(params: { | ||
symbol?: string; | ||
}): Promise<CancelAllOpenOrdersResult>; | ||
setCancelOrdersOnTimeout(params: CancelOrdersTimeoutParams): Promise<SetCancelTimeoutResult>; | ||
getOrder(params: GetOrderParams): Promise<OrderResult>; | ||
getAllOrders(params: GetAllOrdersParams): Promise<OrderResult[]>; | ||
getAllOpenOrders(params?: Partial<BasicSymbolParam>): Promise<OrderResult[]>; | ||
getAllOpenOrders(params?: { | ||
symbol?: string; | ||
}): Promise<OrderResult[]>; | ||
getCurrentOpenOrder(params: GetOrderParams): Promise<OrderResult>; | ||
@@ -105,7 +124,12 @@ getForceOrders(params?: GetForceOrdersParams): Promise<ForceOrderResult[]>; | ||
}): Promise<CoinMPositionTrade[]>; | ||
getPositions(): Promise<PositionRisk[]>; | ||
getPositions(params?: { | ||
marginAsset?: string; | ||
pair?: string; | ||
}): Promise<PositionRisk[]>; | ||
setPositionMode(params: PositionModeParams): Promise<ModeChangeResult>; | ||
setMarginType(params: SetMarginTypeParams): Promise<ModeChangeResult>; | ||
setLeverage(params: SetLeverageParams): Promise<SetLeverageResult>; | ||
getADLQuantileEstimation(params?: Partial<BasicSymbolParam>): Promise<any>; | ||
getADLQuantileEstimation(params?: { | ||
symbol?: string; | ||
}): Promise<any>; | ||
setIsolatedPositionMargin(params: SetIsolatedMarginParams): Promise<SetIsolatedMarginResult>; | ||
@@ -122,4 +146,8 @@ getPositionMarginChangeHistory(params: GetPositionMarginChangeHistoryParams): Promise<any>; | ||
*/ | ||
getAccountComissionRate(params: BasicSymbolParam): Promise<UserCommissionRate>; | ||
getAccountCommissionRate(params: BasicSymbolParam): Promise<UserCommissionRate>; | ||
getAccountComissionRate(params: { | ||
symbol?: string; | ||
}): Promise<UserCommissionRate>; | ||
getAccountCommissionRate(params: { | ||
symbol?: string; | ||
}): Promise<UserCommissionRate>; | ||
getAccountInformation(): Promise<FuturesCoinMAccountInformation>; | ||
@@ -129,3 +157,5 @@ /** | ||
*/ | ||
getNotionalAndLeverageBrackets(params?: Partial<BasicSymbolParam>): Promise<SymbolLeverageBracketsResult[] | SymbolLeverageBracketsResult>; | ||
getNotionalAndLeverageBrackets(params?: { | ||
symbol?: string; | ||
}): Promise<SymbolLeverageBracketsResult[] | SymbolLeverageBracketsResult>; | ||
getCurrentPositionMode(): Promise<PositionModeResponse>; | ||
@@ -132,0 +162,0 @@ getIncomeHistory(params?: GetIncomeHistoryParams): Promise<IncomeHistory[]>; |
@@ -218,4 +218,4 @@ "use strict"; | ||
} | ||
getPositions() { | ||
return this.getPrivate('dapi/v1/positionRisk'); | ||
getPositions(params) { | ||
return this.getPrivate('dapi/v1/positionRisk', params); | ||
} | ||
@@ -222,0 +222,0 @@ setPositionMode(params) { |
@@ -85,2 +85,3 @@ import { FuturesContractType, PositionSide } from './futures'; | ||
fundingIntervalHours: number; | ||
disclaimer: boolean; | ||
} | ||
@@ -87,0 +88,0 @@ export interface GetClassicPortfolioMarginNotionalLimitParams { |
@@ -27,2 +27,3 @@ import { BooleanString, BooleanStringCapitalised, ExchangeFilter, KlineInterval, numberInString, OrderBookRow, OrderSide, OrderStatus, OrderTimeInForce, OrderType, RateLimiter, SelfTradePreventionMode, SymbolIcebergPartsFilter, SymbolLotSizeFilter, SymbolMarketLotSizeFilter, SymbolMaxIcebergOrdersFilter, SymbolMaxPositionFilter, SymbolPriceFilter } from './shared'; | ||
symbol: string; | ||
contractType?: string; | ||
period: '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '6h' | '12h' | '1d'; | ||
@@ -92,2 +93,3 @@ limit?: number; | ||
price?: numberType; | ||
priceMatch?: PriceMatchMode; | ||
} | ||
@@ -245,3 +247,3 @@ export declare enum EnumPositionMarginChangeType { | ||
T: number; | ||
M: boolean; | ||
m: boolean; | ||
} | ||
@@ -353,2 +355,3 @@ export interface MarkPrice { | ||
priceMatch: PriceMatchMode; | ||
goodTillDate: number; | ||
} | ||
@@ -684,3 +687,3 @@ export interface ModifyFuturesOrderResult { | ||
deliveryTime: number; | ||
deliveryPrice: string; | ||
deliveryPrice: number; | ||
} | ||
@@ -732,4 +735,2 @@ export interface BasisParams { | ||
limit?: number; | ||
recvWindow?: number; | ||
timestamp: number; | ||
} | ||
@@ -736,0 +737,0 @@ export interface FuturesTradeHistoryDownloadId { |
@@ -52,2 +52,3 @@ export type numberInString = string | number; | ||
price: numberInString; | ||
time?: number; | ||
} | ||
@@ -63,3 +64,2 @@ export interface OrderBookParams { | ||
origClientOrderId?: string; | ||
isIsolated?: StringBoolean; | ||
} | ||
@@ -70,3 +70,2 @@ export interface GetOrderModifyHistoryParams { | ||
origClientOrderId?: string; | ||
isIsolated?: StringBoolean; | ||
startTime?: number; | ||
@@ -86,2 +85,3 @@ endTime?: number; | ||
endTime?: number; | ||
timeZone?: string; | ||
limit?: number; | ||
@@ -113,11 +113,5 @@ } | ||
origClientOrderId?: string; | ||
/** For isolated margin trading only */ | ||
newClientOrderId?: string; | ||
/** For isolated margin trading only */ | ||
isIsolated?: StringBoolean; | ||
} | ||
export interface CancelOCOParams { | ||
symbol: string; | ||
/** For isolated margin trading only */ | ||
isIsolated?: string; | ||
orderListId?: number; | ||
@@ -190,4 +184,2 @@ listClientOrderId?: string; | ||
limit?: number; | ||
/** For isolated margin trading only */ | ||
isIsolated?: StringBoolean; | ||
} | ||
@@ -219,5 +211,7 @@ export interface RateLimiter { | ||
export interface SymbolMinNotionalFilter { | ||
filterType: 'MIN_NOTIONAL'; | ||
filterType: 'NOTIONAL'; | ||
minNotional: numberInString; | ||
applyToMarket: boolean; | ||
applyMinToMarket: boolean; | ||
maxNotional: numberInString; | ||
applyMaxToMarket: boolean; | ||
avgPriceMins: number; | ||
@@ -224,0 +218,0 @@ } |
@@ -30,3 +30,5 @@ import { AxiosRequestConfig } from 'axios'; | ||
getPremiumIndexKlines(params: SymbolKlinePaginatedParams): Promise<Kline[]>; | ||
getMarkPrice(params: BasicSymbolParam): Promise<MarkPrice>; | ||
getMarkPrice(params: { | ||
symbol: string; | ||
}): Promise<MarkPrice>; | ||
getMarkPrice(): Promise<MarkPrice[]>; | ||
@@ -39,12 +41,24 @@ getFundingRateHistory(params?: Partial<BasicSymbolPaginatedParams>): Promise<FundingRateHistory[]>; | ||
get24hrChangeStatististics(params?: Partial<BasicSymbolParam>): Promise<ChangeStats24hr | ChangeStats24hr[]>; | ||
get24hrChangeStatistics(params: Partial<BasicSymbolParam>): Promise<ChangeStats24hr[]>; | ||
get24hrChangeStatistics(params?: Partial<BasicSymbolParam>): Promise<ChangeStats24hr | ChangeStats24hr[]>; | ||
get24hrChangeStatistics(params: Partial<BasicSymbolParam>): Promise<ChangeStats24hr>; | ||
getSymbolPriceTicker(params?: Partial<BasicSymbolParam>): Promise<SymbolPrice | SymbolPrice[]>; | ||
getSymbolPriceTickerV2(params?: Partial<BasicSymbolParam>): Promise<SymbolPrice | SymbolPrice[]>; | ||
getSymbolOrderBookTicker(params?: Partial<BasicSymbolParam>): Promise<FuturesSymbolOrderBookTicker | FuturesSymbolOrderBookTicker[]>; | ||
get24hrChangeStatistics(params: { | ||
symbol: string; | ||
}): Promise<ChangeStats24hr>; | ||
get24hrChangeStatistics(): Promise<ChangeStats24hr[]>; | ||
getSymbolPriceTicker(params: { | ||
symbol: string; | ||
}): Promise<SymbolPrice>; | ||
getSymbolPriceTicker(): Promise<SymbolPrice[]>; | ||
getSymbolPriceTickerV2(params: { | ||
symbol: string; | ||
}): Promise<SymbolPrice>; | ||
getSymbolPriceTickerV2(): Promise<SymbolPrice[]>; | ||
getSymbolOrderBookTicker(params: { | ||
symbol: string; | ||
}): Promise<FuturesSymbolOrderBookTicker>; | ||
getSymbolOrderBookTicker(): Promise<FuturesSymbolOrderBookTicker[]>; | ||
getQuarterlyContractSettlementPrices(params: { | ||
pair: string; | ||
}): Promise<QuarterlyContractSettlementPrice[]>; | ||
getOpenInterest(params: BasicSymbolParam): Promise<OpenInterest>; | ||
getOpenInterest(params: { | ||
symbol: string; | ||
}): Promise<OpenInterest>; | ||
getOpenInterestStatistics(params: FuturesDataPaginatedParams): Promise<HistoricOpenInterest[]>; | ||
@@ -56,3 +70,5 @@ getTopTradersLongShortPositionRatio(params: FuturesDataPaginatedParams): Promise<any>; | ||
getHistoricalBlvtNavKlines(params: SymbolKlinePaginatedParams): Promise<any>; | ||
getCompositeSymbolIndex(params?: Partial<BasicSymbolParam>): Promise<any>; | ||
getCompositeSymbolIndex(params?: { | ||
symbol?: string; | ||
}): Promise<any>; | ||
getMultiAssetsModeAssetIndex(params?: { | ||
@@ -65,5 +81,2 @@ symbol?: string; | ||
getBasis(params: BasisParams): Promise<Basis[]>; | ||
/** | ||
* Possibly @deprecated, found only in old docs | ||
**/ | ||
getIndexPriceConstituents(params: { | ||
@@ -100,3 +113,5 @@ symbol: string; | ||
getAllOrders(params: GetAllOrdersParams): Promise<OrderResult[]>; | ||
getAllOpenOrders(params?: Partial<BasicSymbolParam>): Promise<OrderResult[]>; | ||
getAllOpenOrders(params?: { | ||
symbol?: string; | ||
}): Promise<OrderResult[]>; | ||
getCurrentOpenOrder(params: GetOrderParams): Promise<OrderResult>; | ||
@@ -122,3 +137,5 @@ getForceOrders(params?: GetForceOrdersParams): Promise<ForceOrderResult[]>; | ||
}): Promise<FuturesPositionV3[]>; | ||
getADLQuantileEstimation(params?: Partial<BasicSymbolParam>): Promise<any>; | ||
getADLQuantileEstimation(params?: { | ||
symbol?: string; | ||
}): Promise<any>; | ||
getPositionMarginChangeHistory(params: GetPositionMarginChangeHistoryParams): Promise<any>; | ||
@@ -146,3 +163,5 @@ /** | ||
getAccountComissionRate(params: BasicSymbolParam): Promise<UserCommissionRate>; | ||
getAccountCommissionRate(params: BasicSymbolParam): Promise<UserCommissionRate>; | ||
getAccountCommissionRate(params: { | ||
symbol: string; | ||
}): Promise<UserCommissionRate>; | ||
getFuturesAccountConfig(): Promise<FuturesAccountConfig>; | ||
@@ -156,7 +175,11 @@ getFuturesSymbolConfig(params: { | ||
*/ | ||
getNotionalAndLeverageBrackets(params?: Partial<BasicSymbolParam>): Promise<SymbolLeverageBracketsResult[]>; | ||
getNotionalAndLeverageBrackets(params?: { | ||
symbol?: string; | ||
}): Promise<SymbolLeverageBracketsResult[]>; | ||
getMultiAssetsMode(): Promise<MultiAssetModeResponse>; | ||
getCurrentPositionMode(): Promise<PositionModeResponse>; | ||
getIncomeHistory(params?: GetIncomeHistoryParams): Promise<IncomeHistory[]>; | ||
getApiQuantitativeRulesIndicators(params?: Partial<BasicSymbolParam>): Promise<any>; | ||
getApiQuantitativeRulesIndicators(params?: { | ||
symbol?: string; | ||
}): Promise<any>; | ||
getFuturesTransactionHistoryDownloadId(params: { | ||
@@ -163,0 +186,0 @@ startTime: number; |
@@ -84,3 +84,3 @@ "use strict"; | ||
get24hrChangeStatististics(params) { | ||
return this.get24hrChangeStatistics(params); | ||
return this.get('fapi/v1/ticker/24hr', params); | ||
} | ||
@@ -135,5 +135,2 @@ get24hrChangeStatistics(params) { | ||
} | ||
/** | ||
* Possibly @deprecated, found only in old docs | ||
**/ | ||
getIndexPriceConstituents(params) { | ||
@@ -140,0 +137,0 @@ return this.get('fapi/v1/constituents', params); |
{ | ||
"name": "binance", | ||
"version": "2.15.14", | ||
"version": "2.15.15", | ||
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end 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 too big to display
Sorry, the diff of this file is too big to display
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
807332
0.67%18327
0.99%