Skip to content

Commit 40614f7

Browse files
authored
Merge branch 'master' into wsapi
2 parents 7be6bf2 + e5fab12 commit 40614f7

File tree

7 files changed

+32
-7
lines changed

7 files changed

+32
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "binance",
3-
"version": "2.15.6",
3+
"version": "2.15.10",
44
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/main-client.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,13 @@ export class MainClient extends BaseRestClient {
740740
params: RollingWindowTickerParams,
741741
): Promise<TradingDayTickerFull[] | TradingDayTickerMini[]> {
742742
if (params && params['symbols'] && Array.isArray(params['symbols'])) {
743-
const symbolsQueryParam = JSON.stringify(params.symbols);
744-
return this.get('api/v3/ticker?symbols=' + symbolsQueryParam);
743+
const { symbols, ...otherParams } = params;
744+
const symbolsQueryParam = JSON.stringify(symbols);
745+
746+
return this.get(
747+
'api/v3/ticker?symbols=' + symbolsQueryParam,
748+
otherParams,
749+
);
745750
}
746751

747752
return this.get('api/v3/ticker', params);
@@ -1276,7 +1281,7 @@ export class MainClient extends BaseRestClient {
12761281
getIsolatedMarginAccountInfo(params?: {
12771282
symbols?: string;
12781283
}): Promise<IsolatedMarginAccountInfo> {
1279-
return this.getPrivate('sapi/v1/margin/isolated/account', { params });
1284+
return this.getPrivate('sapi/v1/margin/isolated/account', params);
12801285
}
12811286

12821287
getIsolatedMarginFeeData(

src/types/futures.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ export interface FundingRateHistory {
375375
symbol: string;
376376
fundingRate: numberInString;
377377
fundingTime: number;
378+
markPrice: numberInString;
378379
}
379380

380381
export interface FuturesSymbolOrderBookTicker {

src/types/shared.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ export type OrderType =
9393
export type OrderListOrderType =
9494
| 'STOP_LOSS_LIMIT'
9595
| 'STOP_LOSS'
96-
| 'LIMIT_MAKER';
96+
| 'LIMIT_MAKER'
97+
| 'TAKE_PROFIT'
98+
| 'TAKE_PROFIT_LIMIT';
9799

98100
export type SelfTradePreventionMode =
99101
| 'EXPIRE_TAKER'

src/util/beautifier-maps.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,22 @@ export const BEAUTIFIER_EVENT_MAP = {
220220
T: 'transactionTime',
221221
o: 'order',
222222
},
223+
TRADE_LITEEvent: {
224+
e: 'eventType',
225+
E: 'eventTime',
226+
T: 'transactionTime',
227+
o: 'order',
228+
s: 'symbol',
229+
q: 'originalQuantity',
230+
p: 'originalPrice',
231+
m: 'isMakerSide',
232+
c: 'clientOrderId',
233+
S: 'side',
234+
L: 'lastFilledPrice',
235+
l: 'lastFilledQuantity',
236+
t: 'tradeId',
237+
i: 'orderId',
238+
},
223239
CONDITIONAL_ORDER_TRIGGER_REJECTEvent: {
224240
e: 'eventType',
225241
E: 'eventTime',

src/websocket-client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ export class WebsocketClient extends EventEmitter {
437437
'ACCOUNT_UPDATE',
438438
'MARGIN_CALL',
439439
'ORDER_TRADE_UPDATE',
440+
'TRADE_LITE',
440441
'CONDITIONAL_ORDER_TRIGGER_REJECT',
441442
].includes(eventType)
442443
) {

0 commit comments

Comments
 (0)