Merge pull request #21 from footcoderr/master

ADD: missing API (Modify Order)
This commit is contained in:
Tiago
2023-10-02 15:24:41 +01:00
committed by GitHub
2 changed files with 17 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ import {
FuturesPlanType,
FuturesKlineInterval,
FuturesHistoricPositions,
ModifyFuturesOrder,
} from './types';
import { REST_CLIENT_TYPE_ENUM } from './util';
import BaseRestClient from './util/BaseRestClient';
@@ -388,6 +389,11 @@ export class FuturesClient extends BaseRestClient {
});
}
/** Modify Order */
modifyOrder(params: ModifyFuturesOrder): Promise<APIResponse<any>> {
return this.postPrivate('/api/mix/v1/order/modifyOrder', params);
}
/**
* Cancel all futures orders for a symbol
*/

View File

@@ -88,6 +88,17 @@ export interface NewBatchFuturesOrder {
clientOid?: string;
}
export interface ModifyFuturesOrder {
symbol: string;
orderId?: string;
clientOid?: string;
newClientOid?: string;
size?: string;
price?: string;
presetTakeProfitPrice?: string;
presetStopLossPrice?: string;
}
export interface FuturesHistoricPositions {
startTime: string;
endTime: string;