feat(#261): add tpsl params missing from position endpoints. add new endpoint for add/reduce margin. add doc examples

This commit is contained in:
tiagosiebler
2023-06-07 16:56:36 +01:00
parent 4f563a65a5
commit 05d63839da
15 changed files with 289 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import {
CategoryV5,
ExecTypeV5,
OrderTriggerByV5,
OrderTypeV5,
PositionIdx,
TPSLModeV5,
} from '../v5-shared';
@@ -51,16 +52,21 @@ export interface SetRiskLimitParamsV5 {
}
export interface SetTradingStopParamsV5 {
symbol: string;
category: CategoryV5;
symbol: string;
takeProfit?: string;
stopLoss?: string;
trailingStop?: string;
tpTriggerBy?: OrderTriggerByV5;
slTriggerBy?: OrderTriggerByV5;
activePrice?: string;
tpslMode?: TPSLModeV5;
tpSize?: string;
slSize?: string;
tpLimitPrice?: string;
slLimitPrice?: string;
tpOrderType?: OrderTypeV5;
slOrderType?: OrderTypeV5;
positionIdx: PositionIdx;
}
@@ -71,6 +77,13 @@ export interface SetAutoAddMarginParamsV5 {
positionIdx?: PositionIdx;
}
export interface AddOrReduceMarginParamsV5 {
category: 'linear' | 'inverse';
symbol: string;
margin: string;
positionIDex?: PositionIdx;
}
export interface GetExecutionListParamsV5 {
category: CategoryV5;
symbol?: string;