binance 3.0.0-beta.1 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -454,7 +454,6 @@ export interface FuturesAccountPosition {
454
454
  maxNotional: numberInString;
455
455
  positionSide: PositionSide;
456
456
  positionAmt: numberInString;
457
- crossUnPnl: numberInString;
458
457
  notional: numberInString;
459
458
  isolatedWallet: numberInString;
460
459
  updateTime: number;
@@ -60,6 +60,7 @@ export interface WsAPIWsKeyTopicMap {
60
60
  [WS_KEY_MAP.usdmWSAPI]: WsAPIOperation;
61
61
  [WS_KEY_MAP.usdmWSAPITestnet]: WsAPIOperation;
62
62
  }
63
+ export type WsAPIFuturesWsKey = typeof WS_KEY_MAP.usdmWSAPI | typeof WS_KEY_MAP.usdmWSAPITestnet;
63
64
  /**
64
65
  * Request parameters expected per operation.
65
66
  *
@@ -68,7 +69,7 @@ export interface WsAPIWsKeyTopicMap {
68
69
  *
69
70
  * Make sure to add new topics to WS_API_Operations and the response param map too.
70
71
  */
71
- export interface WsAPITopicRequestParamMap {
72
+ export interface WsAPITopicRequestParamMap<TWSKey = WsKey> {
72
73
  SUBSCRIBE: never;
73
74
  UNSUBSCRIBE: never;
74
75
  LIST_SUBSCRIPTIONS: never;
@@ -128,7 +129,7 @@ export interface WsAPITopicRequestParamMap {
128
129
  * Trading requests & parameters:
129
130
  * https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api/trading-requests
130
131
  */
131
- 'order.place': (NewSpotOrderParams | NewFuturesOrderParams) & {
132
+ 'order.place': (TWSKey extends WsAPIFuturesWsKey ? NewFuturesOrderParams : NewSpotOrderParams) & {
132
133
  timestamp?: number;
133
134
  };
134
135
  'orderList.place': any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "binance",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",