binance-api-node
Advanced tools
Comparing version 0.11.36 to 0.11.37
@@ -661,2 +661,9 @@ "use strict"; | ||
var futuresUserTransforms = { | ||
// https://binance-docs.github.io/apidocs/futures/en/#close-user-data-stream-user_stream | ||
listenKeyExpired: function USER_DATA_STREAM_EXPIRED(m) { | ||
return { | ||
eventTime: m.E, | ||
eventType: 'USER_DATA_STREAM_EXPIRED' | ||
}; | ||
}, | ||
// https://binance-docs.github.io/apidocs/futures/en/#event-margin-call | ||
@@ -663,0 +670,0 @@ MARGIN_CALL: function MARGIN_CALL(m) { |
128
index.d.ts
@@ -628,3 +628,3 @@ // tslint:disable:interface-name | ||
useServerTime?: boolean | ||
}): Promise<QueryOrderResult[]> | ||
}): Promise<QueryFuturesOrderResult[]> | ||
futuresPositionRisk(options?: { | ||
@@ -1024,17 +1024,16 @@ symbol?: string | ||
export interface NewFuturesOrder { | ||
interface NewFuturesOrderBase { | ||
symbol: string | ||
side: OrderSide_LT | ||
// Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. | ||
positionSide?: PositionSide_LT | ||
type: OrderType_LT | ||
quantity?: string | ||
type: FuturesOrderType_LT | ||
timeInForce?: TimeInForce_LT | ||
// "true" or "false". default "false". Cannot be sent in Hedge Mode; cannot be sent with closePosition=true | ||
reduceOnly?: 'true' | 'false' | ||
price?: number | ||
timeInForce?: TimeInForce_LT | ||
// A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: ^[\.A-Z\:/a-z0-9_-]{1,36}$ | ||
newClientOrderId?: string | ||
stopPrice?: number | ||
closePosition?: 'true' | 'false' | ||
activationPrice?: number | ||
callbackRate?: number | ||
// stopPrice triggered by: "MARK_PRICE", "CONTRACT_PRICE". Default "CONTRACT_PRICE" | ||
workingType?: WorkingType_LT | ||
// "ACK", "RESULT", default "ACK" | ||
newOrderRespType?: NewOrderRespType_LT | ||
@@ -1045,2 +1044,67 @@ recvWindow?: number | ||
export interface LimitNewFuturesOrder extends NewFuturesOrderBase { | ||
type: 'LIMIT' | ||
timeInForce: TimeInForce_LT | ||
quantity: string | ||
price: string | ||
} | ||
export interface MarketNewFuturesOrder extends NewFuturesOrderBase { | ||
type: 'MARKET' | ||
quantity: string | ||
} | ||
export interface StopNewFuturesOrder extends NewFuturesOrderBase { | ||
type: 'STOP' | ||
quantity: string | ||
price: string | ||
stopPrice: string | ||
// "TRUE" or "FALSE", default "FALSE". Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders. | ||
priceProtect?: 'TRUE' | 'FALSE' | ||
} | ||
export interface TakeProfitNewFuturesOrder extends NewFuturesOrderBase { | ||
type: 'TAKE_PROFIT' | ||
quantity: string | ||
price: string | ||
stopPrice: string | ||
} | ||
export interface StopMarketNewFuturesOrder extends NewFuturesOrderBase { | ||
type: 'STOP_MARKET' | ||
stopPrice: string | ||
// true, false;Close-All,used with STOP_MARKET or TAKE_PROFIT_MARKET. | ||
closePosition?: 'true' | 'false' | ||
// "TRUE" or "FALSE", default "FALSE". Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders. | ||
priceProtect?: 'TRUE' | 'FALSE' | ||
quantity?: string | ||
} | ||
export interface TakeProfitMarketNewFuturesOrder extends NewFuturesOrderBase { | ||
type: 'TAKE_PROFIT_MARKET' | ||
stopPrice: string | ||
// true, false;Close-All,used with STOP_MARKET or TAKE_PROFIT_MARKET. | ||
closePosition?: 'true' | 'false' | ||
// "TRUE" or "FALSE", default "FALSE". Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders. | ||
priceProtect?: 'TRUE' | 'FALSE' | ||
quantity?: string | ||
} | ||
export interface TrailingStopMarketNewFuturesOrder extends NewFuturesOrderBase { | ||
type: 'TRAILING_STOP_MARKET' | ||
// default as the latest price(supporting different workingType) | ||
activationPrice?: string | ||
// min 0.1, max 5 where 1 for 1% | ||
callbackRate?: string | ||
} | ||
export type NewFuturesOrder = | ||
| LimitNewFuturesOrder | ||
| MarketNewFuturesOrder | ||
| StopNewFuturesOrder | ||
| TakeProfitNewFuturesOrder | ||
| TrailingStopMarketNewFuturesOrder | ||
| StopMarketNewFuturesOrder | ||
| TakeProfitMarketNewFuturesOrder | ||
export interface NewOcoOrder { | ||
@@ -1169,4 +1233,4 @@ symbol: string | ||
timeInForce: TimeInForce_LT | ||
type: OrderType_LT | ||
origType: OrderType_LT | ||
type: FuturesOrderType_LT | ||
origType: FuturesOrderType_LT | ||
activatePrice: string | ||
@@ -1249,2 +1313,11 @@ priceRate: string | ||
export type FuturesOrderType_LT = | ||
| 'LIMIT' | ||
| 'MARKET' | ||
| 'STOP' | ||
| 'TAKE_PROFIT' | ||
| 'STOP_MARKET' | ||
| 'TAKE_PROFIT_MARKET' | ||
| 'TRAILING_STOP_MARKET' | ||
export const enum OrderType { | ||
@@ -1500,3 +1573,3 @@ LIMIT = 'LIMIT', | ||
orderTime: number // Transaction time | ||
orderType: OrderType_LT // Order type | ||
orderType: FuturesOrderType_LT // Order type | ||
originalClientOrderId: string | null // Original client order ID; This is the ID of the order being canceled | ||
@@ -1587,3 +1660,3 @@ price: string // Order price | ||
side: OrderSide | ||
orderType: OrderType | ||
orderType: FuturesOrderType_LT | ||
timeInForce: TimeInForce | ||
@@ -1609,3 +1682,3 @@ quantity: string | ||
workingType: WorkingType | ||
originalOrderType: OrderType | ||
originalOrderType: FuturesOrderType_LT | ||
positionSide: PositionSide | ||
@@ -1682,3 +1755,3 @@ closePosition: boolean | ||
export interface QueryFuturesOrderResult { | ||
export interface QueryFuturesOrderResultBase { | ||
avgPrice: string | ||
@@ -1690,3 +1763,3 @@ clientOrderId: string | ||
origQty: string | ||
origType: OrderType_LT | ||
origType: FuturesOrderType_LT | ||
price: string | ||
@@ -1696,3 +1769,3 @@ side: OrderSide_LT | ||
status: OrderStatus_LT | ||
stopPrice: string | ||
reduceOnly: boolean | ||
closePosition: boolean | ||
@@ -1702,4 +1775,3 @@ symbol: string | ||
timeInForce: TimeInForce_LT | ||
type: OrderType_LT | ||
activatePrice: string | ||
type: FuturesOrderType_LT | ||
priceRate: string | ||
@@ -1710,2 +1782,16 @@ updateTime: number | ||
export interface QueryFuturesOrderResultOthers extends QueryFuturesOrderResultBase { | ||
stopPrice: string | ||
} | ||
export interface QueryFuturesOrderResultTrailingStop extends QueryFuturesOrderResultBase { | ||
type: 'TRAILING_STOP_MARKET' | ||
activatePrice: string | ||
priceRate: string | ||
} | ||
export type QueryFuturesOrderResult = | ||
| QueryFuturesOrderResultOthers | ||
| QueryFuturesOrderResultTrailingStop | ||
export interface QueryOrderOcoResult { | ||
@@ -2139,3 +2225,3 @@ orderListId: number | ||
origQty: string | ||
origType: OrderType_LT | ||
origType: FuturesOrderType_LT | ||
price: string | ||
@@ -2142,0 +2228,0 @@ reduceOnly: boolean |
{ | ||
"name": "binance-api-node", | ||
"version": "0.11.36", | ||
"version": "0.11.37", | ||
"description": "A node API wrapper for Binance", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
229018
3727