fix(): add submitOrder

This commit is contained in:
JJ-Cro
2025-05-20 13:48:03 +02:00
parent 93a9165fb3
commit 9a86f3daa6

View File

@@ -8,6 +8,7 @@ import {
BatchOrderParamsV5, BatchOrderParamsV5,
BatchOrdersRetExtInfoV5, BatchOrdersRetExtInfoV5,
CancelOrderParamsV5, CancelOrderParamsV5,
OrderParamsV5,
OrderResultV5, OrderResultV5,
} from './types'; } from './types';
import { WSAPIResponse } from './types/websockets/ws-api'; import { WSAPIResponse } from './types/websockets/ws-api';
@@ -85,6 +86,22 @@ export class WebsocketAPIClient {
* https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline * https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline
*/ */
/**
* Submit a new order
*
* @param params
* @returns
*/
submitNewOrder(
params: OrderParamsV5,
): Promise<WSAPIResponse<OrderResultV5, 'order.create'>> {
return this.wsClient.sendWSAPIRequest(
WS_KEY_MAP.v5PrivateTrade,
'order.create',
params,
);
}
/** /**
* Amend an order * Amend an order
* *