rest v1 spot & futures update
- add plan order symbol canceling - fix candles data params (spot & futures) - fix futures filter data (data in api-doc dither from real request!
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
FuturesKlineInterval,
|
||||
FuturesHistoricPositions,
|
||||
ModifyFuturesOrder,
|
||||
FuturesCandleData,
|
||||
} from './types';
|
||||
import { REST_CLIENT_TYPE_ENUM } from './util';
|
||||
import BaseRestClient from './util/BaseRestClient';
|
||||
@@ -104,14 +105,16 @@ export class FuturesClient extends BaseRestClient {
|
||||
symbol: string,
|
||||
granularity: FuturesKlineInterval,
|
||||
startTime: string,
|
||||
endTime: string,
|
||||
endTime: string,
|
||||
limit?: string,
|
||||
): Promise<any> {
|
||||
kLineType?: 'market' | 'mark' | 'index'
|
||||
): Promise<FuturesCandleData[]> {
|
||||
return this.get('/api/mix/v1/market/candles', {
|
||||
symbol,
|
||||
granularity,
|
||||
startTime,
|
||||
endTime,
|
||||
kLineType,
|
||||
limit,
|
||||
});
|
||||
}
|
||||
@@ -559,13 +562,24 @@ export class FuturesClient extends BaseRestClient {
|
||||
return this.postPrivate('/api/mix/v1/plan/modifyTPSLPlan', params);
|
||||
}
|
||||
|
||||
/** Cancel Plan Order TPSL */
|
||||
/** Cancel Plan Order (TPSL) */
|
||||
cancelPlanOrderTPSL(
|
||||
params: CancelFuturesPlanTPSL,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate('/api/mix/v1/plan/cancelPlan', params);
|
||||
}
|
||||
|
||||
/** Cancel Symbol Plan Order (TPSL) */
|
||||
cancelSymbolPlanOrders(
|
||||
symbol: string,
|
||||
planType: FuturesPlanType,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate('/api/mix/v1/plan/cancelSymbolPlan', {
|
||||
symbol,
|
||||
planType,
|
||||
});
|
||||
}
|
||||
|
||||
/** Cancel All Trigger Order (TPSL) */
|
||||
cancelAllPlanOrders(
|
||||
productType: FuturesProductType,
|
||||
|
||||
Reference in New Issue
Block a user