feat(): add new v2 position endpoints

This commit is contained in:
Tiago Siebler
2023-04-25 14:46:12 +01:00
parent 701f267d81
commit 3d271664fe

View File

@@ -156,6 +156,17 @@ export class FuturesClient extends BaseRestClient {
return this.get('/api/mix/v1/market/symbol-leverage', { symbol });
}
/** Get Position Tier */
getPositionTier(
symbol: string,
productType: FuturesProductType,
): Promise<APIResponse<any>> {
return this.get('/api/mix/v1/market/queryPositionLever', {
symbol,
productType,
});
}
/**
*
* Account Endpoints
@@ -272,6 +283,17 @@ export class FuturesClient extends BaseRestClient {
});
}
/** Get Symbol Position V2 */
getPositionV2(
symbol: string,
marginCoin: string,
): Promise<APIResponse<FuturesPosition[]>> {
return this.getPrivate('/api/mix/v1/position/singlePosition-v2', {
symbol,
marginCoin,
});
}
/** Get All Position */
getPositions(
productType: FuturesProductType,
@@ -283,6 +305,17 @@ export class FuturesClient extends BaseRestClient {
});
}
/** Get All Position V2 */
getPositionsV2(
productType: FuturesProductType,
marginCoin?: string,
): Promise<APIResponse<FuturesPosition[]>> {
return this.getPrivate('/api/mix/v1/position/allPosition-v2', {
productType,
marginCoin,
});
}
/** Get Account Bill */
getAccountBill(params: FuturesAccountBillRequest): Promise<APIResponse<any>> {
return this.getPrivate('/api/mix/v1/account/accountBill', params);