From 643a31b5d5f32b81af3957e15cf6f9a7bc495a5f Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Fri, 13 Sep 2024 16:11:29 +0100 Subject: [PATCH] chore(): add order type --- src/lib/BaseRestClient.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/BaseRestClient.ts b/src/lib/BaseRestClient.ts index a4c8cb2..3777c37 100644 --- a/src/lib/BaseRestClient.ts +++ b/src/lib/BaseRestClient.ts @@ -3,7 +3,10 @@ import axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios'; import https from 'https'; import { nanoid } from 'nanoid'; -import { SubmitAdvTradeOrderRequest } from '../types/request/advanced-trade-client.js'; +import { + CloseAdvTradePositionRequest, + SubmitAdvTradeOrderRequest, +} from '../types/request/advanced-trade-client.js'; import { CustomOrderIdProperty } from '../types/shared.types.js'; import { signJWT } from './jwtNode.js'; import { neverGuard } from './misc-util.js'; @@ -268,7 +271,7 @@ export abstract class BaseRestClient { * Validate syntax meets requirements set by binance. Log warning if not. */ protected validateOrderId( - params: SubmitAdvTradeOrderRequest, + params: SubmitAdvTradeOrderRequest | CloseAdvTradePositionRequest, orderIdProperty: CustomOrderIdProperty, ): void { if (!params[orderIdProperty]) {