chore(): added v2 suffixes

This commit is contained in:
JJ-Cro
2024-12-10 14:50:27 +01:00
parent 0c8813ec32
commit d7aa53e2c1
3 changed files with 56 additions and 56 deletions

View File

@@ -22,7 +22,7 @@ import {
GetSpotHistoryPlanOrdersRequestV2,
GetSpotAccountBillsRequestV2,
SpotTransferRequestV2,
SpotAccountType,
SpotAccountTypeV2,
SpotSubAccountTransferRequestV2,
SpotWithdrawalRequestV2,
SpotMainSubTransferRecordRequestV2,
@@ -77,7 +77,7 @@ import {
GetFuturesTraderHistoryOrdersRequestV2,
ModifyFuturesTraderOrderTPSLRequestV2,
GetFuturesTraderProfitShareDetailRequestV2,
CopyTradingProductType,
CopyTradingProductTypeV2,
FuturesTraderSymbolSettingRequestV2,
GetFuturesTraderFollowersRequestV2,
GetFollowerFuturesCurrentTrackingOrdersRequestV2,
@@ -746,8 +746,8 @@ export class RestClientV2 extends BaseRestClient {
}
getSpotTransferableCoins(params: {
fromType: SpotAccountType;
toType: SpotAccountType;
fromType: SpotAccountTypeV2;
toType: SpotAccountTypeV2;
}): Promise<APIResponse<any>> {
return this.getPrivate(`/api/v2/spot/wallet/transfer-coin-info`, params);
}
@@ -1702,7 +1702,7 @@ export class RestClientV2 extends BaseRestClient {
closeFuturesTraderOrder(params: {
trackingNo: string;
symbol: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
}): Promise<APIResponse<any>> {
return this.postPrivate(
`/api/v2/copy/mix-trader/order-close-positions`,
@@ -1729,7 +1729,7 @@ export class RestClientV2 extends BaseRestClient {
}
getFuturesTraderSymbolSettings(params: {
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
}): Promise<APIResponse<any>> {
return this.getPrivate(
`/api/v2/copy/mix-trader/config-query-symbols`,
@@ -1836,7 +1836,7 @@ export class RestClientV2 extends BaseRestClient {
getFuturesFollowerFollowLimit(params: {
symbol: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
}): Promise<APIResponse<any>> {
return this.getPrivate(
`/api/v2/copy/mix-follower/query-quantity-limit`,

View File

@@ -6,14 +6,14 @@
*
*/
export type CopyTradingProductType =
export type CopyTradingProductTypeV2 =
| 'USDT-FUTURES'
| 'COIN-FUTURES'
| 'USDC-FUTURES';
export interface GetFuturesTraderCurrentOrdersRequestV2 {
symbol?: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
startTime?: string;
endTime?: string;
limit?: string;
@@ -29,12 +29,12 @@ export interface GetFuturesTraderHistoryOrdersRequestV2 {
limit?: string;
order?: 'asc' | 'desc';
symbol?: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
}
export interface ModifyFuturesTraderOrderTPSLRequestV2 {
trackingNo: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
stopSurplusPrice?: string;
stopLossPrice?: string;
}
@@ -50,7 +50,7 @@ export interface GetFuturesTraderProfitShareDetailRequestV2 {
export interface FuturesTraderSymbolSettingRequestV2 {
symbol: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
settingType: 'ADD' | 'DELETE' | 'UPDATE';
stopSurplusRatio?: string;
stopLossRatio?: string;
@@ -78,7 +78,7 @@ export interface GetFollowerFuturesCurrentTrackingOrdersRequestV2 {
endTime?: string;
limit?: string;
symbol?: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
traderId?: string;
}
@@ -89,14 +89,14 @@ export interface GetFollowerFuturesHistoryTrackingOrdersRequestV2 {
endTime?: string;
limit?: string;
symbol?: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
traderId?: string;
}
export interface UpdateFuturesFollowerTPSLRequestV2 {
trackingNo: string;
symbol?: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
stopSurplusPrice?: string;
stopLossPrice?: string;
}
@@ -108,7 +108,7 @@ export type TraceType = 'percent' | 'amount' | 'count';
export interface FollowerCopyTradeSettingRequestV2 {
symbol: string;
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
marginType: 'trader' | 'specify';
marginCoin?: string;
leverType: LeverageType;
@@ -128,7 +128,7 @@ export interface UpdateFuturesFollowerSettingsRequestV2 {
settings: FollowerCopyTradeSettingRequestV2[];
}
export interface CloseFuturesFollowerPositionsRequestV2 {
productType: CopyTradingProductType;
productType: CopyTradingProductTypeV2;
trackingNo?: string;
symbol?: string;
marginCoin?: string;

View File

@@ -47,35 +47,35 @@ export interface SpotHistoricTradesRequestV2 {
*
*/
export type SpotOrderSide = 'buy' | 'sell';
export type SpotOrderSideV2 = 'buy' | 'sell';
export type SpotOrderType = 'limit' | 'market';
export type SpotOrderTypeV2 = 'limit' | 'market';
export type SpotOrderForce = 'gtc' | 'post_only' | 'fok' | 'ioc';
export type SpotOrderForceV2 = 'gtc' | 'post_only' | 'fok' | 'ioc';
export type SpotTPSLType = 'normal' | 'tpsl';
export type SpotTPSLTypeV2 = 'normal' | 'tpsl';
export type SpotSTPMode =
export type SpotSTPModeV2 =
| 'none'
| 'cancel_taker'
| 'cancel_maker'
| 'cancel_both';
export type SpotBatchMode = 'single' | 'multiple';
export type SpotBatchModeV2 = 'single' | 'multiple';
export interface SpotOrderRequestV2 {
symbol: string;
side: SpotOrderSide;
orderType: SpotOrderType;
force: SpotOrderForce;
side: SpotOrderSideV2;
orderType: SpotOrderTypeV2;
force: SpotOrderForceV2;
price?: string;
size: string;
clientOid?: string;
triggerPrice?: string;
tpslType?: SpotTPSLType;
tpslType?: SpotTPSLTypeV2;
requestTime?: string;
receiveWindow?: string;
stpMode?: SpotSTPMode;
stpMode?: SpotSTPModeV2;
presetTakeProfitPrice?: string;
executeTakeProfitPrice?: string;
presetStopLossPrice?: string;
@@ -97,20 +97,20 @@ export interface SpotCancelandSubmitOrderRequestV2 {
export interface SpotCancelOrderRequestV2 {
symbol: string;
tpslType?: SpotTPSLType;
tpslType?: SpotTPSLTypeV2;
orderId?: string;
clientOid?: string;
}
export interface SpotBatchOrderRequestItemV2 {
symbol?: string;
side: SpotOrderSide;
orderType: SpotOrderType;
force: SpotOrderForce;
side: SpotOrderSideV2;
orderType: SpotOrderTypeV2;
force: SpotOrderForceV2;
price?: string;
size: string;
clientOid?: string;
stpMode?: SpotSTPMode;
stpMode?: SpotSTPModeV2;
presetTakeProfitPrice?: string;
executeTakeProfitPrice?: string;
presetStopLossPrice?: string;
@@ -119,13 +119,13 @@ export interface SpotBatchOrderRequestItemV2 {
export interface SpotBatchOrderRequestV2 {
symbol?: string;
batchMode?: SpotBatchMode;
batchMode?: SpotBatchModeV2;
orderList: SpotBatchOrderRequestItemV2[];
}
export interface SpotBatchCancelOrderRequestV2 {
symbol?: string;
batchMode?: SpotBatchMode;
batchMode?: SpotBatchModeV2;
orderList: {
symbol?: string;
orderId?: string;
@@ -147,7 +147,7 @@ export interface GetSpotOpenOrdersRequestV2 {
idLessThan?: string;
limit?: string;
orderId?: string;
tpslType?: SpotTPSLType;
tpslType?: SpotTPSLTypeV2;
requestTime?: string;
receiveWindow?: string;
}
@@ -159,7 +159,7 @@ export interface GetSpotHistoryOrdersRequestV2 {
idLessThan?: string;
limit?: string;
orderId?: string;
tpslType?: SpotTPSLType;
tpslType?: SpotTPSLTypeV2;
requestTime?: string;
receiveWindow?: string;
}
@@ -179,29 +179,29 @@ export interface GetSpotFillsRequestV2 {
*
*/
export type SpotPlanType = 'amount' | 'total';
export type SpotPlanTypeV2 = 'amount' | 'total';
export type SpotTriggerType = 'fill_price' | 'mark_price';
export type SpotTriggerTypeV2 = 'fill_price' | 'mark_price';
export interface SpotPlanOrderRequestV2 {
symbol: string;
side: SpotOrderSide;
side: SpotOrderSideV2;
triggerPrice: string;
orderType: SpotOrderType;
orderType: SpotOrderTypeV2;
executePrice?: string;
planType?: SpotPlanType;
planType?: SpotPlanTypeV2;
size: string;
triggerType: SpotTriggerType;
triggerType: SpotTriggerTypeV2;
clientOid?: string;
force?: SpotOrderForce;
stpMode?: SpotSTPMode;
force?: SpotOrderForceV2;
stpMode?: SpotSTPModeV2;
}
export interface SpotModifyPlanOrderRequestV2 {
orderId?: string;
clientOid?: string;
triggerPrice: string;
orderType: SpotOrderType;
orderType: SpotOrderTypeV2;
executePrice?: string;
size: string;
}
@@ -227,14 +227,14 @@ export interface GetSpotHistoryPlanOrdersRequestV2 {
*
*/
export type SpotBillGroupType =
export type SpotBillGroupTypeV2 =
| 'deposit'
| 'withdraw'
| 'transaction'
| 'transfer'
| 'other';
export type SpotBusinessType =
export type SpotBusinessTypeV2 =
| 'deposit'
| 'withdraw'
| 'buy'
@@ -249,7 +249,7 @@ export type SpotBusinessType =
| 'system lock'
| 'user lock';
export type SpotAccountType =
export type SpotAccountTypeV2 =
| 'spot'
| 'p2p'
| 'coin_futures'
@@ -260,8 +260,8 @@ export type SpotAccountType =
export interface GetSpotAccountBillsRequestV2 {
coin?: string;
groupType?: SpotBillGroupType;
businessType?: SpotBusinessType;
groupType?: SpotBillGroupTypeV2;
businessType?: SpotBusinessTypeV2;
startTime?: string;
endTime?: string;
limit?: string;
@@ -269,8 +269,8 @@ export interface GetSpotAccountBillsRequestV2 {
}
export interface SpotTransferRequestV2 {
fromType: SpotAccountType;
toType: SpotAccountType;
fromType: SpotAccountTypeV2;
toType: SpotAccountTypeV2;
amount: string;
coin: string;
symbol: string;
@@ -278,8 +278,8 @@ export interface SpotTransferRequestV2 {
}
export interface SpotSubAccountTransferRequestV2 {
fromType: SpotAccountType;
toType: SpotAccountType;
fromType: SpotAccountTypeV2;
toType: SpotAccountTypeV2;
amount: string;
coin: string;
symbol?: string;
@@ -314,7 +314,7 @@ export interface SpotMainSubTransferRecordRequestV2 {
export interface GetSpotTransferRecordRequestV2 {
coin: string;
fromType: SpotAccountType;
fromType: SpotAccountTypeV2;
startTime?: string;
endTime?: string;
clientOid?: string;