binance-api-node
Advanced tools
Comparing version 0.10.14 to 0.10.15
@@ -518,2 +518,5 @@ "use strict"; | ||
}, | ||
futuresGetOrder: function futuresGetOrder(payload) { | ||
return privCall('/fapi/v1/order', payload); | ||
}, | ||
futuresCancelOrder: function futuresCancelOrder(payload) { | ||
@@ -526,3 +529,3 @@ return privCall('/fapi/v1/order', payload, 'DELETE'); | ||
futuresPositionRisk: function futuresPositionRisk(payload) { | ||
return privCall('/fapi/v1/positionRisk', payload); | ||
return privCall('/fapi/v2/positionRisk', payload); | ||
}, | ||
@@ -537,2 +540,5 @@ futuresAccountBalance: function futuresAccountBalance(payload) { | ||
return privCall('/fapi/v1/positionSide/dual', payload, 'POST'); | ||
}, | ||
futuresLeverage: function futuresLeverage(payload) { | ||
return privCall('/fapi/v1/leverage', payload, 'POST'); | ||
} | ||
@@ -539,0 +545,0 @@ }; |
@@ -53,2 +53,3 @@ // tslint:disable:interface-name | ||
export interface Account { | ||
accountType: TradingType.MARGIN | TradingType.SPOT | ||
balances: AssetBalance[] | ||
@@ -60,2 +61,3 @@ buyerCommission: number | ||
makerCommission: number | ||
permissions: TradingType[] | ||
sellerCommission: number | ||
@@ -361,2 +363,7 @@ takerCommission: number | ||
export enum TradingType { | ||
MARGIN = 'MARGIN', | ||
SPOT = 'SPOT', | ||
} | ||
export type RateLimitInterval = 'SECOND' | 'MINUTE' | 'DAY' | ||
@@ -477,2 +484,5 @@ | ||
newOrderRespType?: NewOrderRespType | ||
isIsolated?: boolean | ||
quoteOrderQty?: string | ||
sideEffectType?: SideEffectType | ||
} | ||
@@ -498,2 +508,7 @@ | ||
export type SideEffectType = | ||
| 'NO_SIDE_EFFECT' | ||
| 'MARGIN_BUY' | ||
| 'AUTO_REPAY' | ||
export interface OrderFill { | ||
@@ -500,0 +515,0 @@ price: string |
{ | ||
"name": "binance-api-node", | ||
"version": "0.10.14", | ||
"version": "0.10.15", | ||
"description": "A node API wrapper for Binance", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
@@ -93,3 +93,5 @@ # binance-api-node [![build](https://img.shields.io/travis/Ashlar/binance-api-node/master.svg?style=flat-square)](https://travis-ci.org/Ashlar/binance-api-node) [![cover](https://img.shields.io/coveralls/github/Ashlar/binance-api-node/master?style=flat-square)](https://coveralls.io/github/Ashlar/binance-api-node?branch=master) [![bnb](https://img.shields.io/badge/binance-winner-yellow.svg?style=flat-square)](https://github.com/binance-exchange/binance-api-node) | ||
- [Futures Authenticated REST Endpoints](#futures-authenticated-rest-endpoints) | ||
- [futuresGetOrder](#futuresGetOrder) | ||
- [futuresAccountBalance](#futuresAccountBalance) | ||
- [futuresLeverage](#futuresLeverage) | ||
- [Websockets](#websockets) | ||
@@ -1652,2 +1654,97 @@ - [depth](#depth) | ||
#### futuresGetOrder | ||
Check an order's status. | ||
- These orders will not be found | ||
- order status is CANCELED or EXPIRED, <b>AND</b> | ||
- order has NO filled trade, <b>AND</b> | ||
- created time + 7 days < current time | ||
| Name | Type | Mandatory | Description | | ||
| ----------------- | ------ | -------- | ---------------- | | ||
| symbol | STRING | YES | The pair name | | ||
| orderId | LONG | NO | | | ||
| origClientOrderId | STRING | NO | | | ||
| recvWindow | LONG | NO | | | ||
Either orderId or origClientOrderId must be sent. | ||
```js | ||
console.log( | ||
await client.futuresGetOrder({ | ||
symbol: 'BNBETH', | ||
orderId: 50167927, | ||
}), | ||
) | ||
``` | ||
<details> | ||
<summary>Output</summary> | ||
```js | ||
{ | ||
"avgPrice": "0.00000", | ||
"clientOrderId": "abc", | ||
"cumQuote": "0", | ||
"executedQty": "0", | ||
"orderId": 1917641, | ||
"origQty": "0.40", | ||
"origType": "TRAILING_STOP_MARKET", | ||
"price": "0", | ||
"reduceOnly": false, | ||
"side": "BUY", | ||
"positionSide": "SHORT", | ||
"status": "NEW", | ||
"stopPrice": "9300", // please ignore when order type is TRAILING_STOP_MARKET | ||
"closePosition": false, // if Close-All | ||
"symbol": "BTCUSDT", | ||
"time": 1579276756075, // order time | ||
"timeInForce": "GTC", | ||
"type": "TRAILING_STOP_MARKET", | ||
"activatePrice": "9020", // activation price, only return with TRAILING_STOP_MARKET order | ||
"priceRate": "0.3", // callback rate, only return with TRAILING_STOP_MARKET order | ||
"updateTime": 1579276756075, // update time | ||
"workingType": "CONTRACT_PRICE", | ||
"priceProtect": false // if conditional order trigger is protected | ||
} | ||
``` | ||
</details> | ||
#### futuresLeverage | ||
Change user's initial leverage of specific symbol market. | ||
| Name | Type | Mandatory | Description | | ||
| ----------------- | ------ | -------- | ------------------------------------------ | | ||
| symbol | STRING | YES | The pair name | | ||
| leverage | INT | YES | target initial leverage: int from 1 to 125 | | ||
| recvWindow | LONG | NO | | | ||
```js | ||
console.log( | ||
await client.futuresLeverage({ | ||
symbol: 'BTCUSDT', | ||
leverage: 21, | ||
}), | ||
) | ||
``` | ||
<details> | ||
<summary>Output</summary> | ||
```js | ||
{ | ||
"leverage": 21, | ||
"maxNotionalValue": "1000000", | ||
"symbol": "BTCUSDT" | ||
} | ||
``` | ||
</details> | ||
#### futuresAccountBalance | ||
@@ -1654,0 +1751,0 @@ |
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
116415
1959
2053