feat(): add new v2 position endpoints
This commit is contained in:
@@ -156,6 +156,17 @@ export class FuturesClient extends BaseRestClient {
|
|||||||
return this.get('/api/mix/v1/market/symbol-leverage', { symbol });
|
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
|
* 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 */
|
/** Get All Position */
|
||||||
getPositions(
|
getPositions(
|
||||||
productType: FuturesProductType,
|
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 */
|
/** Get Account Bill */
|
||||||
getAccountBill(params: FuturesAccountBillRequest): Promise<APIResponse<any>> {
|
getAccountBill(params: FuturesAccountBillRequest): Promise<APIResponse<any>> {
|
||||||
return this.getPrivate('/api/mix/v1/account/accountBill', params);
|
return this.getPrivate('/api/mix/v1/account/accountBill', params);
|
||||||
|
|||||||
Reference in New Issue
Block a user