feat(v4.0.0-beta.8): add support for new Websocket API batch order commands
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "4.0.0-beta.7",
|
||||
"version": "4.0.0-beta.8",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bybit-api",
|
||||
"version": "4.0.0-beta.7",
|
||||
"version": "4.0.0-beta.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.9",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "4.0.0-beta.7",
|
||||
"version": "4.0.0-beta.8",
|
||||
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
@@ -20,9 +20,7 @@
|
||||
"betapublish": "npm publish --tag beta"
|
||||
},
|
||||
"author": "Tiago Siebler (https://github.com/tiagosiebler)",
|
||||
"contributors": [
|
||||
"Stefan Aebischer <os@pixtron.ch> (https://pixtron.ch)"
|
||||
],
|
||||
"contributors": [],
|
||||
"dependencies": {
|
||||
"axios": "^1.7.9",
|
||||
"isomorphic-ws": "^4.0.1",
|
||||
|
||||
@@ -1,13 +1,28 @@
|
||||
import { APIID, WS_KEY_MAP } from '../../util';
|
||||
import {
|
||||
AmendOrderParamsV5,
|
||||
BatchAmendOrderParamsV5,
|
||||
BatchCancelOrderParamsV5,
|
||||
BatchOrderParamsV5,
|
||||
CancelOrderParamsV5,
|
||||
OrderParamsV5,
|
||||
} from '../request';
|
||||
import { OrderResultV5 } from '../response';
|
||||
import {
|
||||
BatchAmendOrderResultV5,
|
||||
BatchCancelOrderResultV5,
|
||||
BatchCreateOrderResultV5,
|
||||
BatchOrdersResponseV5,
|
||||
OrderResultV5,
|
||||
} from '../response';
|
||||
import { WsKey } from './ws-general';
|
||||
|
||||
export type WSAPIOperation = 'order.create' | 'order.amend' | 'order.cancel';
|
||||
export type WSAPIOperation =
|
||||
| 'order.create'
|
||||
| 'order.amend'
|
||||
| 'order.cancel'
|
||||
| 'order.create-batch'
|
||||
| 'order.amend-batch'
|
||||
| 'order.cancel-batch';
|
||||
|
||||
export type WsOperation =
|
||||
| 'subscribe'
|
||||
@@ -85,6 +100,9 @@ export interface WsAPITopicRequestParamMap {
|
||||
'order.create': OrderParamsV5;
|
||||
'order.amend': AmendOrderParamsV5;
|
||||
'order.cancel': CancelOrderParamsV5;
|
||||
'order.create-batch': BatchOrderParamsV5[];
|
||||
'order.amend-batch': BatchAmendOrderParamsV5[];
|
||||
'order.cancel-batch': BatchCancelOrderParamsV5[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,6 +112,18 @@ export interface WsAPIOperationResponseMap {
|
||||
'order.create': WSAPIResponse<OrderResultV5, 'order.create'>;
|
||||
'order.amend': WSAPIResponse<OrderResultV5, 'order.amend'>;
|
||||
'order.cancel': WSAPIResponse<OrderResultV5, 'order.cancel'>;
|
||||
'order.create-batch': WSAPIResponse<
|
||||
BatchOrdersResponseV5<BatchCreateOrderResultV5[]>,
|
||||
'order.create-batch'
|
||||
>;
|
||||
'order.amend-batch': WSAPIResponse<
|
||||
BatchOrdersResponseV5<BatchAmendOrderResultV5[]>,
|
||||
'order.amend-batch'
|
||||
>;
|
||||
'order.cancel-batch': WSAPIResponse<
|
||||
BatchOrdersResponseV5<BatchCancelOrderResultV5[]>,
|
||||
'order.cancel-batch'
|
||||
>;
|
||||
ping: {
|
||||
retCode: 0 | number;
|
||||
retMsg: 'OK' | string;
|
||||
|
||||
Reference in New Issue
Block a user