From 9a86f3daa6d668ce67de3252deea9aca8088b48f Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Tue, 20 May 2025 13:48:03 +0200 Subject: [PATCH] fix(): add submitOrder --- src/websocket-api-client.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/websocket-api-client.ts b/src/websocket-api-client.ts index 4bf3eae..d08037a 100644 --- a/src/websocket-api-client.ts +++ b/src/websocket-api-client.ts @@ -8,6 +8,7 @@ import { BatchOrderParamsV5, BatchOrdersRetExtInfoV5, CancelOrderParamsV5, + OrderParamsV5, OrderResultV5, } from './types'; import { WSAPIResponse } from './types/websockets/ws-api'; @@ -85,6 +86,22 @@ export class WebsocketAPIClient { * https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline */ + /** + * Submit a new order + * + * @param params + * @returns + */ + submitNewOrder( + params: OrderParamsV5, + ): Promise> { + return this.wsClient.sendWSAPIRequest( + WS_KEY_MAP.v5PrivateTrade, + 'order.create', + params, + ); + } + /** * Amend an order *