chore(): updated type suffixes, added V2
This commit is contained in:
@@ -6,30 +6,30 @@ import {
|
||||
SpotCandlesRequestV2,
|
||||
SpotAccountBill,
|
||||
SpotHistoricCandlesRequestV2,
|
||||
SpotHistoricTradesRequest,
|
||||
SpotOrderRequest,
|
||||
SpotCancelandSubmitOrderRequest,
|
||||
SpotCancelOrderRequest,
|
||||
SpotBatchOrderRequest,
|
||||
SpotBatchCancelOrderRequest,
|
||||
GetSpotOrderInfoRequest,
|
||||
GetSpotOpenOrdersRequest,
|
||||
GetSpotHistoryOrdersRequest,
|
||||
GetSpotFillsRequest,
|
||||
SpotPlanOrderRequest,
|
||||
SpotModifyPlanOrderRequest,
|
||||
GetSpotCurrentPlanOrdersRequest,
|
||||
GetSpotHistoryPlanOrdersRequest,
|
||||
GetSpotAccountBillsRequest,
|
||||
SpotTransferRequest,
|
||||
SpotHistoricTradesRequestV2,
|
||||
SpotOrderRequestV2,
|
||||
SpotCancelandSubmitOrderRequestV2,
|
||||
SpotCancelOrderRequestV2,
|
||||
SpotBatchOrderRequestV2,
|
||||
SpotBatchCancelOrderRequestV2,
|
||||
GetSpotOrderInfoRequestV2,
|
||||
GetSpotOpenOrdersRequestV2,
|
||||
GetSpotHistoryOrdersRequestV2,
|
||||
GetSpotFillsRequestV2,
|
||||
SpotPlanOrderRequestV2,
|
||||
SpotModifyPlanOrderRequestV2,
|
||||
GetSpotCurrentPlanOrdersRequestV2,
|
||||
GetSpotHistoryPlanOrdersRequestV2,
|
||||
GetSpotAccountBillsRequestV2,
|
||||
SpotTransferRequestV2,
|
||||
SpotAccountType,
|
||||
SpotSubAccountTransferRequest,
|
||||
SpotWithdrawalRequest,
|
||||
SpotMainSubTransferRecordRequest,
|
||||
GetSpotTransferRecordRequest,
|
||||
GetSpotSubAccountDepositRecordRequest,
|
||||
GetSpotWithdrawalRecordRequest,
|
||||
GetSpotDepositRecordRequest,
|
||||
SpotSubAccountTransferRequestV2,
|
||||
SpotWithdrawalRequestV2,
|
||||
SpotMainSubTransferRecordRequestV2,
|
||||
GetSpotTransferRecordRequestV2,
|
||||
GetSpotSubAccountDepositRecordRequestV2,
|
||||
GetSpotWithdrawalRecordRequestV2,
|
||||
GetSpotDepositRecordRequestV2,
|
||||
FuturesMergeDepthRequestV2,
|
||||
FuturesProductTypeV2,
|
||||
FuturesRecentTradesRequestV2,
|
||||
@@ -62,78 +62,78 @@ import {
|
||||
FuturesGetPlanOrdersRequestV2,
|
||||
FuturesCancelPlanOrderRequestV2,
|
||||
FuturesGetHistoryPlanOrdersRequestV2,
|
||||
GetBorrowHistoryRequest,
|
||||
GetRepayHistoryRequest,
|
||||
GetInterestHistoryRequest,
|
||||
GetLiquidationHistoryRequest,
|
||||
GetFinancialHistoryRequest,
|
||||
MarginPlaceOrderRequest,
|
||||
MarginBatchOrdersRequest,
|
||||
GetMarginCurrentOrdersRequest,
|
||||
GetHistoryOrdersRequest,
|
||||
GetMarginOrderFillsRequest,
|
||||
GetMarginLiquidationOrdersRequest,
|
||||
GetFuturesTraderCurrentOrdersRequest,
|
||||
GetFuturesTraderHistoryOrdersRequest,
|
||||
ModifyFuturesTraderOrderTPSLRequest,
|
||||
GetFuturesTraderProfitShareDetailRequest,
|
||||
GetBorrowHistoryRequestV2,
|
||||
GetRepayHistoryRequestV2,
|
||||
GetInterestHistoryRequestV2,
|
||||
GetLiquidationHistoryRequestV2,
|
||||
GetFinancialHistoryRequestV2,
|
||||
MarginPlaceOrderRequestV2,
|
||||
MarginBatchOrdersRequestV2,
|
||||
GetMarginCurrentOrdersRequestV2,
|
||||
GetHistoryOrdersRequestV2,
|
||||
GetMarginOrderFillsRequestV2,
|
||||
GetMarginLiquidationOrdersRequestV2,
|
||||
GetFuturesTraderCurrentOrdersRequestV2,
|
||||
GetFuturesTraderHistoryOrdersRequestV2,
|
||||
ModifyFuturesTraderOrderTPSLRequestV2,
|
||||
GetFuturesTraderProfitShareDetailRequestV2,
|
||||
CopyTradingProductType,
|
||||
FuturesTraderSymbolSettingReq,
|
||||
GetFuturesTraderFollowers,
|
||||
GetFollowerFuturesCurrentTrackingOrdersRequest,
|
||||
GetFollowerFuturesHistoryTrackingOrdersRequest,
|
||||
UpdateFuturesFollowerTPSLRequest,
|
||||
UpdateFuturesFollowerSettingsRequest,
|
||||
GetFuturesFollowerTradersRequest,
|
||||
CloseFuturesFollowerPositionsRequest,
|
||||
getSpotTraderHistoryProfitReq,
|
||||
GetSpotTraderHistoryOrdersReq,
|
||||
GetSpotTraderCurrentOrdersReq,
|
||||
GetSpotTraderFollowersRequest,
|
||||
SpotFollowerCopyTradeSetting,
|
||||
GetSpotFollowerHistoryOrdersRequest,
|
||||
GetSpotFollowerOpenOrdersRequest,
|
||||
GetEarnSavingsAssetsRequest,
|
||||
GetEarnSavingsRecordsRequest,
|
||||
RedeemSavingsRequest,
|
||||
GetSharkfinAssetsRequest,
|
||||
GetSharkfinRecordsRequest,
|
||||
GetLoanEstInterestAndBorrowableRequest,
|
||||
BorrowLoanRequest,
|
||||
RepayLoanRequest,
|
||||
GetLoanRepayHistoryRequest,
|
||||
ModifyLoanPledgeRateRequest,
|
||||
GetLoanPledgeRateHistoryRequest,
|
||||
GetLoanHistoryRequest,
|
||||
GetLiquidationRecordsRequest,
|
||||
FuturesTraderSymbolSettingRequestV2,
|
||||
GetFuturesTraderFollowersRequestV2,
|
||||
GetFollowerFuturesCurrentTrackingOrdersRequestV2,
|
||||
GetFollowerFuturesHistoryTrackingOrdersRequestV2,
|
||||
UpdateFuturesFollowerTPSLRequestV2,
|
||||
UpdateFuturesFollowerSettingsRequestV2,
|
||||
GetFuturesFollowerTradersRequestV2,
|
||||
CloseFuturesFollowerPositionsRequestV2,
|
||||
GetSpotTraderHistoryProfitRequestV2,
|
||||
GetSpotTraderHistoryOrdersRequestV2,
|
||||
GetSpotTraderCurrentOrdersRequestV2,
|
||||
GetSpotTraderFollowersRequestV2,
|
||||
SpotFollowerCopyTradeSettingV2,
|
||||
GetSpotFollowerHistoryOrdersRequestV2,
|
||||
GetSpotFollowerOpenOrdersRequestV2,
|
||||
GetEarnSavingsAssetsRequestV2,
|
||||
GetEarnSavingsRecordsRequestV2,
|
||||
RedeemSavingsRequestV2,
|
||||
GetSharkfinAssetsRequestV2,
|
||||
GetSharkfinRecordsRequestV2,
|
||||
GetLoanEstInterestAndBorrowableRequestV2,
|
||||
BorrowLoanRequestV2,
|
||||
RepayLoanRequestV2,
|
||||
GetLoanRepayHistoryRequestV2,
|
||||
ModifyLoanPledgeRateRequestV2,
|
||||
GetLoanPledgeRateHistoryRequestV2,
|
||||
GetLoanHistoryRequestV2,
|
||||
GetLiquidationRecordsRequestV2,
|
||||
} from './types';
|
||||
import {
|
||||
CreateSubaccountApiKeyRequest,
|
||||
GetSubaccountsRequest,
|
||||
ModifySubaccountApiKeyRequest,
|
||||
ModifySubRequest,
|
||||
SubDepositRecordsRequest,
|
||||
SubWithdrawalRecordsRequest,
|
||||
SubWithdrawalRequest,
|
||||
CreateSubAccountApiKeyRequestV2,
|
||||
GetSubAccountsRequestV2,
|
||||
ModifySubAccountApiKeyRequestV2,
|
||||
ModifySubRequestV2,
|
||||
SubDepositRecordsRequestV2,
|
||||
SubWithdrawalRecordsRequestV2,
|
||||
SubWithdrawalRequestV2,
|
||||
} from './types/request/v2/broker';
|
||||
import {
|
||||
ConvertQuoteRequest,
|
||||
ConvertRequest,
|
||||
CreateVirtualSubApiKeyRequest,
|
||||
CreateVirtualSubRequest,
|
||||
GetAnnouncementsRequest,
|
||||
GetConvertHistoryRequest,
|
||||
GetFuturesTransactionsRequest,
|
||||
GetMarginTransactionsRequest,
|
||||
GetMerchantAdvertisementsRequest,
|
||||
GetMerchantP2POrdersRequest,
|
||||
GetP2PMerchantsRequest,
|
||||
GetP2PTransactionsRequest,
|
||||
GetSpotTransactionsRequest,
|
||||
GetTradeRateRequest,
|
||||
ModifyVirtualSubRequest,
|
||||
ModifyVirtualSubApiKeyRequest,
|
||||
GetConvertBGBHistoryRequest,
|
||||
ConvertQuoteRequestV2,
|
||||
ConvertRequestV2,
|
||||
CreateVirtualSubApiKeyRequestV2,
|
||||
CreateVirtualSubRequestV2,
|
||||
GetAnnouncementsRequestV2,
|
||||
GetConvertHistoryRequestV2,
|
||||
GetFuturesTransactionsRequestV2,
|
||||
GetMarginTransactionsRequestV2,
|
||||
GetMerchantAdvertisementsRequestV2,
|
||||
GetMerchantP2POrdersRequestV2,
|
||||
GetP2PMerchantsRequestV2,
|
||||
GetP2PTransactionsRequestV2,
|
||||
GetSpotTransactionsRequestV2,
|
||||
GetTradeRateRequestV2,
|
||||
ModifyVirtualSubRequestV2,
|
||||
ModifyVirtualSubApiKeyRequestV2,
|
||||
GetConvertBGBHistoryRequestV2,
|
||||
} from './types/request/v2/common';
|
||||
import { REST_CLIENT_TYPE_ENUM, assertMarginType } from './util';
|
||||
import BaseRestClient from './util/BaseRestClient';
|
||||
@@ -235,7 +235,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*/
|
||||
|
||||
getAnnouncements(
|
||||
params?: GetAnnouncementsRequest,
|
||||
params?: GetAnnouncementsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.get(`/api/v2/public/annoucements`, params);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
return this.get(`/api/v2/public/time`);
|
||||
}
|
||||
|
||||
getTradeRate(params: GetTradeRateRequest): Promise<APIResponse<any>> {
|
||||
getTradeRate(params: GetTradeRateRequestV2): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/common/trade-rate`, params);
|
||||
}
|
||||
|
||||
@@ -261,25 +261,25 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*/
|
||||
|
||||
getSpotTransactionRecords(
|
||||
params: GetSpotTransactionsRequest,
|
||||
params: GetSpotTransactionsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/tax/spot-record`, params);
|
||||
}
|
||||
|
||||
getFuturesTransactionRecords(
|
||||
params: GetFuturesTransactionsRequest,
|
||||
params: GetFuturesTransactionsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/tax/future-record`, params);
|
||||
}
|
||||
|
||||
getMarginTransactionRecords(
|
||||
params: GetMarginTransactionsRequest,
|
||||
params: GetMarginTransactionsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/tax/margin-record`, params);
|
||||
}
|
||||
|
||||
getP2PTransactionRecords(
|
||||
params: GetP2PTransactionsRequest,
|
||||
params: GetP2PTransactionsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/tax/p2p-record`, params);
|
||||
}
|
||||
@@ -291,7 +291,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*/
|
||||
|
||||
getP2PMerchantList(
|
||||
params?: GetP2PMerchantsRequest,
|
||||
params?: GetP2PMerchantsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/p2p/merchantList`, params);
|
||||
}
|
||||
@@ -301,13 +301,13 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getP2PMerchantOrders(
|
||||
params: GetMerchantP2POrdersRequest,
|
||||
params: GetMerchantP2POrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/p2p/orderList`, params);
|
||||
}
|
||||
|
||||
getP2PMerchantAdvertisementList(
|
||||
params: GetMerchantAdvertisementsRequest,
|
||||
params: GetMerchantAdvertisementsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/p2p/advList`, params);
|
||||
}
|
||||
@@ -405,13 +405,13 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
modifyVirtualSubaccount(
|
||||
params: ModifyVirtualSubRequest,
|
||||
params: ModifyVirtualSubRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/user/modify-virtual-subaccount`, params);
|
||||
}
|
||||
|
||||
batchCreateVirtualSubaccountAndAPIKey(
|
||||
params: CreateVirtualSubRequest,
|
||||
params: CreateVirtualSubRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
'/api/v2/user/batch-create-subaccount-and-apikey',
|
||||
@@ -428,7 +428,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
createVirtualSubaccountAPIKey(
|
||||
params: CreateVirtualSubApiKeyRequest,
|
||||
params: CreateVirtualSubApiKeyRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
'/api/v2/user/create-virtual-subaccount-apikey',
|
||||
@@ -437,7 +437,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
modifyVirtualSubaccountAPIKey(
|
||||
params: ModifyVirtualSubApiKeyRequest,
|
||||
params: ModifyVirtualSubApiKeyRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
'/api/v2/user/modify-virtual-subaccount-apikey',
|
||||
@@ -483,17 +483,17 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getConvertQuotedPrice(
|
||||
params: ConvertQuoteRequest,
|
||||
params: ConvertQuoteRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/convert/quoted-price`, params);
|
||||
}
|
||||
|
||||
convert(params: ConvertRequest): Promise<APIResponse<any>> {
|
||||
convert(params: ConvertRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/convert/trade`, params);
|
||||
}
|
||||
|
||||
getConvertHistory(
|
||||
params: GetConvertHistoryRequest,
|
||||
params: GetConvertHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/convert/convert-record`, params);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getConvertBGBHistory(
|
||||
params: GetConvertBGBHistoryRequest,
|
||||
params: GetConvertBGBHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/convert/bgb-convert-records`, params);
|
||||
}
|
||||
@@ -582,7 +582,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotHistoricTrades(
|
||||
params: SpotHistoricTradesRequest,
|
||||
params: SpotHistoricTradesRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/market/fills-history`, params);
|
||||
}
|
||||
@@ -593,18 +593,18 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*
|
||||
*/
|
||||
|
||||
spotSubmitOrder(params: SpotOrderRequest): Promise<APIResponse<any>> {
|
||||
spotSubmitOrder(params: SpotOrderRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/trade/place-order`, params);
|
||||
}
|
||||
|
||||
spotCancelandSubmitOrder(
|
||||
params: SpotCancelandSubmitOrderRequest,
|
||||
params: SpotCancelandSubmitOrderRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/trade/cancel-replace-order`, params);
|
||||
}
|
||||
|
||||
spotBatchCancelandSubmitOrder(params: {
|
||||
orderList: SpotCancelandSubmitOrderRequest[];
|
||||
orderList: SpotCancelandSubmitOrderRequestV2[];
|
||||
}): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
`/api/v2/spot/trade/batch-cancel-replace-order`,
|
||||
@@ -612,18 +612,18 @@ export class RestClientV2 extends BaseRestClient {
|
||||
);
|
||||
}
|
||||
|
||||
spotCancelOrder(params: SpotCancelOrderRequest): Promise<APIResponse<any>> {
|
||||
spotCancelOrder(params: SpotCancelOrderRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/trade/cancel-order`, params);
|
||||
}
|
||||
|
||||
spotBatchSubmitOrders(
|
||||
params: SpotBatchOrderRequest,
|
||||
params: SpotBatchOrderRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/trade/batch-orders`, params);
|
||||
}
|
||||
|
||||
spotBatchCancelOrders(
|
||||
params: SpotBatchCancelOrderRequest,
|
||||
params: SpotBatchCancelOrderRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/trade/batch-cancel-order`, params);
|
||||
}
|
||||
@@ -632,23 +632,23 @@ export class RestClientV2 extends BaseRestClient {
|
||||
return this.postPrivate(`/api/v2/spot/trade/cancel-symbol-order`, params);
|
||||
}
|
||||
|
||||
getSpotOrder(params?: GetSpotOrderInfoRequest): Promise<APIResponse<any>> {
|
||||
getSpotOrder(params?: GetSpotOrderInfoRequestV2): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/trade/orderInfo`, params);
|
||||
}
|
||||
|
||||
getSpotOpenOrders(
|
||||
params?: GetSpotOpenOrdersRequest,
|
||||
params?: GetSpotOpenOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/trade/unfilled-orders`, params);
|
||||
}
|
||||
|
||||
getSpotHistoricOrders(
|
||||
params?: GetSpotHistoryOrdersRequest,
|
||||
params?: GetSpotHistoryOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/trade/history-orders`, params);
|
||||
}
|
||||
|
||||
getSpotFills(params: GetSpotFillsRequest): Promise<APIResponse<any>> {
|
||||
getSpotFills(params: GetSpotFillsRequestV2): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/trade/fills`, params);
|
||||
}
|
||||
|
||||
@@ -658,12 +658,14 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*
|
||||
*/
|
||||
|
||||
spotSubmitPlanOrder(params: SpotPlanOrderRequest): Promise<APIResponse<any>> {
|
||||
spotSubmitPlanOrder(
|
||||
params: SpotPlanOrderRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/trade/place-plan-order`, params);
|
||||
}
|
||||
|
||||
spotModifyPlanOrder(
|
||||
params: SpotModifyPlanOrderRequest,
|
||||
params: SpotModifyPlanOrderRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/trade/modify-plan-order`, params);
|
||||
}
|
||||
@@ -676,7 +678,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotCurrentPlanOrders(
|
||||
params: GetSpotCurrentPlanOrdersRequest,
|
||||
params: GetSpotCurrentPlanOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/trade/current-plan-order`, params);
|
||||
}
|
||||
@@ -688,7 +690,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotHistoricPlanOrders(
|
||||
params: GetSpotHistoryPlanOrdersRequest,
|
||||
params: GetSpotHistoryPlanOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/trade/history-plan-order`, params);
|
||||
}
|
||||
@@ -734,12 +736,12 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotAccountBills(
|
||||
params?: GetSpotAccountBillsRequest,
|
||||
params?: GetSpotAccountBillsRequestV2,
|
||||
): Promise<APIResponse<SpotAccountBill[]>> {
|
||||
return this.getPrivate(`/api/v2/spot/account/bills`, params);
|
||||
}
|
||||
|
||||
spotTransfer(params: SpotTransferRequest): Promise<APIResponse<any>> {
|
||||
spotTransfer(params: SpotTransferRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/wallet/transfer`, params);
|
||||
}
|
||||
|
||||
@@ -751,17 +753,17 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
spotSubTransfer(
|
||||
params: SpotSubAccountTransferRequest,
|
||||
params: SpotSubAccountTransferRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/wallet/subaccount-transfer`, params);
|
||||
}
|
||||
|
||||
spotWithdraw(params: SpotWithdrawalRequest): Promise<APIResponse<any>> {
|
||||
spotWithdraw(params: SpotWithdrawalRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/spot/wallet/withdrawal`, params);
|
||||
}
|
||||
|
||||
getSpotMainSubTransferRecord(
|
||||
params: SpotMainSubTransferRecordRequest,
|
||||
params: SpotMainSubTransferRecordRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/spot/account/sub-main-trans-record`,
|
||||
@@ -770,7 +772,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotTransferHistory(
|
||||
params: GetSpotTransferRecordRequest,
|
||||
params: GetSpotTransferRecordRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/account/transferRecords`, params);
|
||||
}
|
||||
@@ -807,7 +809,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSubAccountDepositRecords(
|
||||
params: GetSpotSubAccountDepositRecordRequest,
|
||||
params: GetSpotSubAccountDepositRecordRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/spot/wallet/subaccount-deposit-records`,
|
||||
@@ -816,13 +818,13 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotDepositHistory(
|
||||
params: GetSpotDepositRecordRequest,
|
||||
params: GetSpotDepositRecordRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/wallet/deposit-records`, params);
|
||||
}
|
||||
|
||||
getSpotWithdrawalHistory(
|
||||
params: GetSpotWithdrawalRecordRequest,
|
||||
params: GetSpotWithdrawalRecordRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/spot/wallet/withdrawal-records`, params);
|
||||
}
|
||||
@@ -1245,11 +1247,11 @@ export class RestClientV2 extends BaseRestClient {
|
||||
return this.postPrivate(`/api/v2/broker/account/create-subaccount`, params);
|
||||
}
|
||||
|
||||
getSubaccounts(params?: GetSubaccountsRequest): Promise<APIResponse<any>> {
|
||||
getSubaccounts(params?: GetSubAccountsRequestV2): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/broker/account/subaccount-list`, params);
|
||||
}
|
||||
|
||||
modifySubaccount(params: ModifySubRequest): Promise<APIResponse<any>> {
|
||||
modifySubaccount(params: ModifySubRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/broker/account/modify-subaccount`, params);
|
||||
}
|
||||
|
||||
@@ -1290,7 +1292,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
subaccountWithdrawal(
|
||||
params: SubWithdrawalRequest,
|
||||
params: SubWithdrawalRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
`/api/v2/broker/account/subaccount-withdrawal`,
|
||||
@@ -1310,13 +1312,13 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
subaccountDepositRecords(
|
||||
params: SubDepositRecordsRequest,
|
||||
params: SubDepositRecordsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/broker/subaccount-deposit`, params);
|
||||
}
|
||||
|
||||
subaccountWithdrawalRecords(
|
||||
params: SubWithdrawalRecordsRequest,
|
||||
params: SubWithdrawalRecordsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/broker/subaccount-withdrawal`, params);
|
||||
}
|
||||
@@ -1328,7 +1330,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*/
|
||||
|
||||
createSubaccountApiKey(
|
||||
params: CreateSubaccountApiKeyRequest,
|
||||
params: CreateSubAccountApiKeyRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
`/api/v2/broker/manage/create-subaccount-apikey`,
|
||||
@@ -1344,7 +1346,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
modifySubaccountApiKey(
|
||||
params: ModifySubaccountApiKeyRequest,
|
||||
params: ModifySubAccountApiKeyRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
`/api/v2/broker/manage/modify-subaccount-apikey`,
|
||||
@@ -1378,7 +1380,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginBorrowHistory(
|
||||
marginType: MarginType,
|
||||
params: GetBorrowHistoryRequest,
|
||||
params: GetBorrowHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(
|
||||
@@ -1389,7 +1391,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginRepayHistory(
|
||||
marginType: MarginType,
|
||||
params: GetRepayHistoryRequest,
|
||||
params: GetRepayHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(
|
||||
@@ -1400,7 +1402,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginInterestHistory(
|
||||
marginType: MarginType,
|
||||
params: GetInterestHistoryRequest,
|
||||
params: GetInterestHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(
|
||||
@@ -1411,7 +1413,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginLiquidationHistory(
|
||||
marginType: MarginType,
|
||||
params: GetLiquidationHistoryRequest,
|
||||
params: GetLiquidationHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(
|
||||
@@ -1422,7 +1424,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginFinancialHistory(
|
||||
marginType: MarginType,
|
||||
params: GetFinancialHistoryRequest,
|
||||
params: GetFinancialHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(
|
||||
@@ -1553,7 +1555,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
marginSubmitOrder(
|
||||
marginType: MarginType,
|
||||
params: MarginPlaceOrderRequest,
|
||||
params: MarginPlaceOrderRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.postPrivate(`/api/v2/margin/${marginType}/place-order`, params);
|
||||
@@ -1561,7 +1563,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
marginBatchSubmitOrders(
|
||||
marginType: MarginType,
|
||||
params: MarginBatchOrdersRequest,
|
||||
params: MarginBatchOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.postPrivate(
|
||||
@@ -1601,7 +1603,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginOpenOrders(
|
||||
marginType: MarginType,
|
||||
params: GetMarginCurrentOrdersRequest,
|
||||
params: GetMarginCurrentOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(`/api/v2/margin/${marginType}/open-orders`, params);
|
||||
@@ -1609,7 +1611,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginHistoricOrders(
|
||||
marginType: MarginType,
|
||||
params: GetHistoryOrdersRequest,
|
||||
params: GetHistoryOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(
|
||||
@@ -1620,7 +1622,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginHistoricOrderFills(
|
||||
marginType: MarginType,
|
||||
params: GetMarginOrderFillsRequest,
|
||||
params: GetMarginOrderFillsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(`/api/v2/margin/${marginType}/fills`, params);
|
||||
@@ -1628,7 +1630,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
|
||||
getMarginLiquidationOrders(
|
||||
marginType: MarginType,
|
||||
params: GetMarginLiquidationOrdersRequest,
|
||||
params: GetMarginLiquidationOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
assertMarginType(marginType);
|
||||
return this.getPrivate(
|
||||
@@ -1654,7 +1656,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*/
|
||||
|
||||
getFuturesTraderCurrentOrder(
|
||||
params: GetFuturesTraderCurrentOrdersRequest,
|
||||
params: GetFuturesTraderCurrentOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/mix-trader/order-current-track`,
|
||||
@@ -1663,7 +1665,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getFuturesTraderHistoryOrders(
|
||||
params: GetFuturesTraderHistoryOrdersRequest,
|
||||
params: GetFuturesTraderHistoryOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/mix-trader/order-history-track`,
|
||||
@@ -1672,7 +1674,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
modifyFuturesTraderOrderTPSL(
|
||||
params: ModifyFuturesTraderOrderTPSLRequest,
|
||||
params: ModifyFuturesTraderOrderTPSLRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
`/api/v2/copy/mix-trader/order-modify-tpsl`,
|
||||
@@ -1689,7 +1691,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getFuturesTraderProfitShareHistory(
|
||||
params: GetFuturesTraderProfitShareDetailRequest,
|
||||
params: GetFuturesTraderProfitShareDetailRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/mix-trader/profit-history-details`,
|
||||
@@ -1736,7 +1738,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
updateFuturesTraderSymbolSettings(params: {
|
||||
settingList: FuturesTraderSymbolSettingReq[];
|
||||
settingList: FuturesTraderSymbolSettingRequestV2[];
|
||||
}): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
`/api/v2/copy/mix-trader/config-setting-symbols`,
|
||||
@@ -1756,7 +1758,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getFuturesTraderFollowers(
|
||||
params?: GetFuturesTraderFollowers,
|
||||
params?: GetFuturesTraderFollowersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/mix-trader/config-query-followers`,
|
||||
@@ -1782,7 +1784,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
*/
|
||||
|
||||
getFuturesFollowerCurrentOrders(
|
||||
params: GetFollowerFuturesCurrentTrackingOrdersRequest,
|
||||
params: GetFollowerFuturesCurrentTrackingOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/mix-follower/query-current-orders`,
|
||||
@@ -1791,7 +1793,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getFuturesFollowerHistoryOrders(
|
||||
params: GetFollowerFuturesHistoryTrackingOrdersRequest,
|
||||
params: GetFollowerFuturesHistoryTrackingOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/mix-follower/query-history-orders`,
|
||||
@@ -1800,13 +1802,13 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
updateFuturesFollowerTPSL(
|
||||
params: UpdateFuturesFollowerTPSLRequest,
|
||||
params: UpdateFuturesFollowerTPSLRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/copy/mix-follower/setting-tpsl`, params);
|
||||
}
|
||||
|
||||
updateFuturesFollowerSettings(
|
||||
params: UpdateFuturesFollowerSettingsRequest,
|
||||
params: UpdateFuturesFollowerSettingsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/copy/mix-follower/settings`, params);
|
||||
}
|
||||
@@ -1818,7 +1820,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
closeFuturesFollowerPositions(
|
||||
params: CloseFuturesFollowerPositionsRequest,
|
||||
params: CloseFuturesFollowerPositionsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(
|
||||
`/api/v2/copy/mix-follower/close-positions`,
|
||||
@@ -1827,7 +1829,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getFuturesFollowerTraders(
|
||||
params: GetFuturesFollowerTradersRequest,
|
||||
params: GetFuturesFollowerTradersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/copy/mix-follower/query-traders`, params);
|
||||
}
|
||||
@@ -1887,7 +1889,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotTraderHistoryProfit(
|
||||
params: getSpotTraderHistoryProfitReq,
|
||||
params: GetSpotTraderHistoryProfitRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/spot-trader/profit-history-details`,
|
||||
@@ -1919,7 +1921,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotTraderHistoryOrders(
|
||||
params: GetSpotTraderHistoryOrdersReq,
|
||||
params: GetSpotTraderHistoryOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/spot-trader/order-history-track`,
|
||||
@@ -1928,7 +1930,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotTraderCurrentOrders(
|
||||
params: GetSpotTraderCurrentOrdersReq,
|
||||
params: GetSpotTraderCurrentOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/spot-trader/order-current-track`,
|
||||
@@ -1970,7 +1972,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotTraderFollowers(
|
||||
params: GetSpotTraderFollowersRequest,
|
||||
params: GetSpotTraderFollowersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/spot-trader/config-query-followers`,
|
||||
@@ -1996,7 +1998,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
traderId: string;
|
||||
autoCopy?: 'on' | 'off';
|
||||
mode?: 'basic' | 'advanced';
|
||||
settings: SpotFollowerCopyTradeSetting[];
|
||||
settings: SpotFollowerCopyTradeSettingV2[];
|
||||
}): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/copy/spot-follower/settings`, params);
|
||||
}
|
||||
@@ -2034,7 +2036,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotFollowerHistoryOrders(
|
||||
params: GetSpotFollowerHistoryOrdersRequest,
|
||||
params: GetSpotFollowerHistoryOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/spot-follower/query-history-orders`,
|
||||
@@ -2043,7 +2045,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSpotFollowerOpenOrders(
|
||||
params: GetSpotFollowerOpenOrdersRequest,
|
||||
params: GetSpotFollowerOpenOrdersRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(
|
||||
`/api/v2/copy/spot-follower/query-current-orders`,
|
||||
@@ -2085,13 +2087,13 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getEarnSavingsAssets(
|
||||
params: GetEarnSavingsAssetsRequest,
|
||||
params: GetEarnSavingsAssetsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/savings/assets`, params);
|
||||
}
|
||||
|
||||
getEarnSavingsRecords(
|
||||
params: GetEarnSavingsRecordsRequest,
|
||||
params: GetEarnSavingsRecordsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/savings/records`, params);
|
||||
}
|
||||
@@ -2118,7 +2120,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
return this.getPrivate(`/api/v2/earn/savings/subscribe-result`, params);
|
||||
}
|
||||
|
||||
earnRedeemSavings(params: RedeemSavingsRequest): Promise<APIResponse<any>> {
|
||||
earnRedeemSavings(params: RedeemSavingsRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/earn/savings/redeem`, params);
|
||||
}
|
||||
|
||||
@@ -2162,13 +2164,13 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getSharkfinAssets(
|
||||
params: GetSharkfinAssetsRequest,
|
||||
params: GetSharkfinAssetsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/sharkfin/assets`, params);
|
||||
}
|
||||
|
||||
getSharkfinRecords(
|
||||
params: GetSharkfinRecordsRequest,
|
||||
params: GetSharkfinRecordsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/sharkfin/records`, params);
|
||||
}
|
||||
@@ -2205,12 +2207,12 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getLoanEstInterestAndBorrowable(
|
||||
params: GetLoanEstInterestAndBorrowableRequest,
|
||||
params: GetLoanEstInterestAndBorrowableRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.get(`/api/v2/earn/loan/public/hour-interest`, params);
|
||||
}
|
||||
|
||||
borrowLoan(params: BorrowLoanRequest): Promise<APIResponse<any>> {
|
||||
borrowLoan(params: BorrowLoanRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/earn/loan/borrow`, params);
|
||||
}
|
||||
|
||||
@@ -2222,29 +2224,29 @@ export class RestClientV2 extends BaseRestClient {
|
||||
return this.getPrivate(`/api/v2/earn/loan/ongoing-orders`, params);
|
||||
}
|
||||
|
||||
repayLoan(params: RepayLoanRequest): Promise<APIResponse<any>> {
|
||||
repayLoan(params: RepayLoanRequestV2): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/earn/loan/repay`, params);
|
||||
}
|
||||
|
||||
getRepayHistory(
|
||||
params: GetLoanRepayHistoryRequest,
|
||||
params: GetLoanRepayHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/loan/repay-history`, params);
|
||||
}
|
||||
|
||||
updateLoanPledgeRate(
|
||||
params: ModifyLoanPledgeRateRequest,
|
||||
params: ModifyLoanPledgeRateRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.postPrivate(`/api/v2/earn/loan/revise-pledge`, params);
|
||||
}
|
||||
|
||||
getLoanPledgeRateHistory(
|
||||
params: GetLoanPledgeRateHistoryRequest,
|
||||
params: GetLoanPledgeRateHistoryRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/loan/revise-history`, params);
|
||||
}
|
||||
|
||||
getLoanHistory(params: GetLoanHistoryRequest): Promise<APIResponse<any>> {
|
||||
getLoanHistory(params: GetLoanHistoryRequestV2): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/loan/borrow-history`, params);
|
||||
}
|
||||
|
||||
@@ -2253,7 +2255,7 @@ export class RestClientV2 extends BaseRestClient {
|
||||
}
|
||||
|
||||
getLoanLiquidationRecords(
|
||||
params: GetLiquidationRecordsRequest,
|
||||
params: GetLiquidationRecordsRequestV2,
|
||||
): Promise<APIResponse<any>> {
|
||||
return this.getPrivate(`/api/v2/earn/loan/reduces`, params);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetSubaccountsRequest {
|
||||
export interface GetSubAccountsRequestV2 {
|
||||
limit?: string;
|
||||
idLessThan?: string;
|
||||
status?: 'normal' | 'freeze' | 'del';
|
||||
@@ -12,7 +12,7 @@ export interface GetSubaccountsRequest {
|
||||
endTime?: string;
|
||||
}
|
||||
|
||||
export type SubaccountPermission =
|
||||
export type SubAccountPermission =
|
||||
| 'withdraw'
|
||||
| 'transfer'
|
||||
| 'spot_trade'
|
||||
@@ -21,7 +21,7 @@ export type SubaccountPermission =
|
||||
| 'deposit'
|
||||
| 'margin_trade';
|
||||
|
||||
export type SubaccountLanguage =
|
||||
export type SubAccountLanguage =
|
||||
| 'en_US'
|
||||
| 'zh_CN'
|
||||
| 'ja_JP'
|
||||
@@ -35,16 +35,16 @@ export type SubaccountLanguage =
|
||||
| 'pt_PT'
|
||||
| 'th_TH';
|
||||
|
||||
export type SubaccountStatus = 'normal' | 'freeze';
|
||||
export type SubAccountStatus = 'normal' | 'freeze';
|
||||
|
||||
export interface ModifySubRequest {
|
||||
export interface ModifySubRequestV2 {
|
||||
subUid: string;
|
||||
permList: SubaccountPermission[];
|
||||
status: SubaccountStatus;
|
||||
language?: SubaccountLanguage;
|
||||
permList: SubAccountPermission[];
|
||||
status: SubAccountStatus;
|
||||
language?: SubAccountLanguage;
|
||||
}
|
||||
|
||||
export interface SubWithdrawalRequest {
|
||||
export interface SubWithdrawalRequestV2 {
|
||||
subUid: string;
|
||||
coin: string;
|
||||
dest: 'on_chain' | 'internal_transfer';
|
||||
@@ -55,7 +55,7 @@ export interface SubWithdrawalRequest {
|
||||
clientOid?: string;
|
||||
}
|
||||
|
||||
export interface SubDepositRecordsRequest {
|
||||
export interface SubDepositRecordsRequestV2 {
|
||||
orderId?: string;
|
||||
userId?: string;
|
||||
startTime?: string;
|
||||
@@ -64,7 +64,7 @@ export interface SubDepositRecordsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface SubWithdrawalRecordsRequest {
|
||||
export interface SubWithdrawalRecordsRequestV2 {
|
||||
orderId?: string;
|
||||
userId?: string;
|
||||
startTime?: string;
|
||||
@@ -79,7 +79,7 @@ export interface SubWithdrawalRecordsRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface CreateSubaccountApiKeyRequest {
|
||||
export interface CreateSubAccountApiKeyRequestV2 {
|
||||
subUid: string;
|
||||
passphrase: string;
|
||||
label?: string;
|
||||
@@ -88,7 +88,7 @@ export interface CreateSubaccountApiKeyRequest {
|
||||
permList: string[];
|
||||
}
|
||||
|
||||
export interface ModifySubaccountApiKeyRequest {
|
||||
export interface ModifySubAccountApiKeyRequestV2 {
|
||||
subUid: string;
|
||||
apiKey: string;
|
||||
label?: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { FuturesProductTypeV2, MarginType } from '../shared';
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetAnnouncementsRequest {
|
||||
export interface GetAnnouncementsRequestV2 {
|
||||
annType?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
@@ -19,7 +19,7 @@ export interface GetAnnouncementsRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetTradeRateRequest {
|
||||
export interface GetTradeRateRequestV2 {
|
||||
symbol: string;
|
||||
businessType: string;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ export interface GetTradeRateRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetSpotTransactionsRequest {
|
||||
export interface GetSpotTransactionsRequestV2 {
|
||||
coin?: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
@@ -38,7 +38,7 @@ export interface GetSpotTransactionsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetFuturesTransactionsRequest {
|
||||
export interface GetFuturesTransactionsRequestV2 {
|
||||
productType?: FuturesProductTypeV2;
|
||||
marginCoin?: string;
|
||||
startTime: string;
|
||||
@@ -47,7 +47,7 @@ export interface GetFuturesTransactionsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetMarginTransactionsRequest {
|
||||
export interface GetMarginTransactionsRequestV2 {
|
||||
marginType?: MarginType;
|
||||
coin?: string;
|
||||
startTime: string;
|
||||
@@ -56,7 +56,7 @@ export interface GetMarginTransactionsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetP2PTransactionsRequest {
|
||||
export interface GetP2PTransactionsRequestV2 {
|
||||
coin?: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
@@ -70,13 +70,13 @@ export interface GetP2PTransactionsRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetP2PMerchantsRequest {
|
||||
export interface GetP2PMerchantsRequestV2 {
|
||||
online?: 'yes' | 'no';
|
||||
idLessThan?: string;
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface GetMerchantP2POrdersRequest {
|
||||
export interface GetMerchantP2POrdersRequestV2 {
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
idLessThan?: string;
|
||||
@@ -90,7 +90,7 @@ export interface GetMerchantP2POrdersRequest {
|
||||
orderNo?: string;
|
||||
}
|
||||
|
||||
export interface GetMerchantAdvertisementsRequest {
|
||||
export interface GetMerchantAdvertisementsRequestV2 {
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
idLessThan?: string;
|
||||
@@ -112,13 +112,13 @@ export interface GetMerchantAdvertisementsRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface ModifyVirtualSubRequest {
|
||||
export interface ModifyVirtualSubRequestV2 {
|
||||
subAccountUid: string;
|
||||
permList: string[];
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface CreateVirtualSubRequest {
|
||||
export interface CreateVirtualSubRequestV2 {
|
||||
subAccountName: string;
|
||||
passphrase: string;
|
||||
label: string;
|
||||
@@ -126,7 +126,7 @@ export interface CreateVirtualSubRequest {
|
||||
permList?: string[];
|
||||
}
|
||||
|
||||
export interface CreateVirtualSubApiKeyRequest {
|
||||
export interface CreateVirtualSubApiKeyRequestV2 {
|
||||
subAccountUid: string;
|
||||
passphrase: string;
|
||||
label: string;
|
||||
@@ -134,7 +134,7 @@ export interface CreateVirtualSubApiKeyRequest {
|
||||
permList?: string[];
|
||||
}
|
||||
|
||||
export interface ModifyVirtualSubApiKeyRequest {
|
||||
export interface ModifyVirtualSubApiKeyRequestV2 {
|
||||
subAccountUid: string;
|
||||
subAccountApiKey: string;
|
||||
passphrase: string;
|
||||
@@ -149,14 +149,14 @@ export interface ModifyVirtualSubApiKeyRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface ConvertQuoteRequest {
|
||||
export interface ConvertQuoteRequestV2 {
|
||||
fromCoin: string;
|
||||
fromCoinSize?: string;
|
||||
toCoin: string;
|
||||
toCoinSize?: string;
|
||||
}
|
||||
|
||||
export interface ConvertRequest {
|
||||
export interface ConvertRequestV2 {
|
||||
fromCoin: string;
|
||||
fromCoinSize: string;
|
||||
cnvtPrice: string;
|
||||
@@ -165,7 +165,7 @@ export interface ConvertRequest {
|
||||
traceId: string;
|
||||
}
|
||||
|
||||
export interface GetConvertHistoryRequest {
|
||||
export interface GetConvertHistoryRequestV2 {
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
limit?: string;
|
||||
@@ -178,10 +178,10 @@ export interface GetConvertHistoryRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetConvertBGBHistoryRequest {
|
||||
orderId?: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
limit?: string;
|
||||
idLessThan?: string;
|
||||
}
|
||||
export interface GetConvertBGBHistoryRequestV2 {
|
||||
orderId?: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
limit?: string;
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export type CopyTradingProductType =
|
||||
| 'COIN-FUTURES'
|
||||
| 'USDC-FUTURES';
|
||||
|
||||
export interface GetFuturesTraderCurrentOrdersRequest {
|
||||
export interface GetFuturesTraderCurrentOrdersRequestV2 {
|
||||
symbol?: string;
|
||||
productType: CopyTradingProductType;
|
||||
startTime?: string;
|
||||
@@ -21,7 +21,7 @@ export interface GetFuturesTraderCurrentOrdersRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetFuturesTraderHistoryOrdersRequest {
|
||||
export interface GetFuturesTraderHistoryOrdersRequestV2 {
|
||||
idLessThan?: string;
|
||||
idGreaterThan?: string;
|
||||
startTime?: string;
|
||||
@@ -32,14 +32,14 @@ export interface GetFuturesTraderHistoryOrdersRequest {
|
||||
productType: CopyTradingProductType;
|
||||
}
|
||||
|
||||
export interface ModifyFuturesTraderOrderTPSLRequest {
|
||||
export interface ModifyFuturesTraderOrderTPSLRequestV2 {
|
||||
trackingNo: string;
|
||||
productType: CopyTradingProductType;
|
||||
stopSurplusPrice?: string;
|
||||
stopLossPrice?: string;
|
||||
}
|
||||
|
||||
export interface GetFuturesTraderProfitShareDetailRequest {
|
||||
export interface GetFuturesTraderProfitShareDetailRequestV2 {
|
||||
coin?: string;
|
||||
idLessThan?: string;
|
||||
idGreaterThan?: string;
|
||||
@@ -48,7 +48,7 @@ export interface GetFuturesTraderProfitShareDetailRequest {
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface FuturesTraderSymbolSettingReq {
|
||||
export interface FuturesTraderSymbolSettingRequestV2 {
|
||||
symbol: string;
|
||||
productType: CopyTradingProductType;
|
||||
settingType: 'ADD' | 'DELETE' | 'UPDATE';
|
||||
@@ -56,7 +56,7 @@ export interface FuturesTraderSymbolSettingReq {
|
||||
stopLossRatio?: string;
|
||||
}
|
||||
|
||||
export interface GetFuturesTraderFollowers {
|
||||
export interface GetFuturesTraderFollowersRequestV2 {
|
||||
pageNo?: string;
|
||||
pageSize?: string;
|
||||
startTime?: string;
|
||||
@@ -71,7 +71,7 @@ export interface GetFuturesTraderFollowers {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetFollowerFuturesCurrentTrackingOrdersRequest {
|
||||
export interface GetFollowerFuturesCurrentTrackingOrdersRequestV2 {
|
||||
idLessThan?: string;
|
||||
idGreaterThan?: string;
|
||||
startTime?: string;
|
||||
@@ -82,7 +82,7 @@ export interface GetFollowerFuturesCurrentTrackingOrdersRequest {
|
||||
traderId?: string;
|
||||
}
|
||||
|
||||
export interface GetFollowerFuturesHistoryTrackingOrdersRequest {
|
||||
export interface GetFollowerFuturesHistoryTrackingOrdersRequestV2 {
|
||||
idLessThan?: string;
|
||||
idGreaterThan?: string;
|
||||
startTime?: string;
|
||||
@@ -93,7 +93,7 @@ export interface GetFollowerFuturesHistoryTrackingOrdersRequest {
|
||||
traderId?: string;
|
||||
}
|
||||
|
||||
export interface UpdateFuturesFollowerTPSLRequest {
|
||||
export interface UpdateFuturesFollowerTPSLRequestV2 {
|
||||
trackingNo: string;
|
||||
symbol?: string;
|
||||
productType: CopyTradingProductType;
|
||||
@@ -106,7 +106,7 @@ export type FollowMode = 'basic' | 'advanced';
|
||||
export type LeverageType = 'position' | 'specify' | 'trader';
|
||||
export type TraceType = 'percent' | 'amount' | 'count';
|
||||
|
||||
export interface FollowerCopyTradeSetting {
|
||||
export interface FollowerCopyTradeSettingRequestV2 {
|
||||
symbol: string;
|
||||
productType: CopyTradingProductType;
|
||||
marginType: 'trader' | 'specify';
|
||||
@@ -121,13 +121,13 @@ export interface FollowerCopyTradeSetting {
|
||||
stopLossRatio?: string;
|
||||
}
|
||||
|
||||
export interface UpdateFuturesFollowerSettingsRequest {
|
||||
export interface UpdateFuturesFollowerSettingsRequestV2 {
|
||||
traderId: string;
|
||||
autoCopy?: AutoCopyOption;
|
||||
mode?: FollowMode;
|
||||
settings: FollowerCopyTradeSetting[];
|
||||
settings: FollowerCopyTradeSettingRequestV2[];
|
||||
}
|
||||
export interface CloseFuturesFollowerPositionsRequest {
|
||||
export interface CloseFuturesFollowerPositionsRequestV2 {
|
||||
productType: CopyTradingProductType;
|
||||
trackingNo?: string;
|
||||
symbol?: string;
|
||||
@@ -136,7 +136,7 @@ export interface CloseFuturesFollowerPositionsRequest {
|
||||
holdSide?: 'long' | 'short';
|
||||
}
|
||||
|
||||
export interface GetFuturesFollowerTradersRequest {
|
||||
export interface GetFuturesFollowerTradersRequestV2 {
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
pageNo?: string;
|
||||
@@ -151,7 +151,7 @@ export interface GetFuturesFollowerTradersRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface getSpotTraderHistoryProfitReq {
|
||||
export interface GetSpotTraderHistoryProfitRequestV2 {
|
||||
idLessThan?: string;
|
||||
idGreaterThan?: string;
|
||||
startTime?: string;
|
||||
@@ -160,7 +160,7 @@ export interface getSpotTraderHistoryProfitReq {
|
||||
coin?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotTraderHistoryOrdersReq {
|
||||
export interface GetSpotTraderHistoryOrdersRequestV2 {
|
||||
idLessThan?: string;
|
||||
idGreaterThan?: string;
|
||||
startTime?: string;
|
||||
@@ -169,7 +169,7 @@ export interface GetSpotTraderHistoryOrdersReq {
|
||||
symbol?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotTraderCurrentOrdersReq {
|
||||
export interface GetSpotTraderCurrentOrdersRequestV2 {
|
||||
symbol?: string;
|
||||
idLessThan?: string;
|
||||
idGreaterThan?: string;
|
||||
@@ -178,7 +178,7 @@ export interface GetSpotTraderCurrentOrdersReq {
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotTraderFollowersRequest {
|
||||
export interface GetSpotTraderFollowersRequestV2 {
|
||||
pageNo?: string;
|
||||
pageSize?: string;
|
||||
startTime?: string;
|
||||
@@ -193,7 +193,7 @@ export interface GetSpotTraderFollowersRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface SpotFollowerCopyTradeSetting {
|
||||
export interface SpotFollowerCopyTradeSettingV2 {
|
||||
symbol: string;
|
||||
traceType: 'percent' | 'amount' | 'count';
|
||||
maxHoldSize: string;
|
||||
@@ -202,7 +202,7 @@ export interface SpotFollowerCopyTradeSetting {
|
||||
stopSurplusRatio?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotFollowerHistoryOrdersRequest {
|
||||
export interface GetSpotFollowerHistoryOrdersRequestV2 {
|
||||
symbol?: string;
|
||||
traderId?: string;
|
||||
idLessThan?: string;
|
||||
@@ -212,7 +212,7 @@ export interface GetSpotFollowerHistoryOrdersRequest {
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotFollowerOpenOrdersRequest {
|
||||
export interface GetSpotFollowerOpenOrdersRequestV2 {
|
||||
symbol?: string;
|
||||
traderId?: string;
|
||||
idLessThan?: string;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetEarnSavingsAssetsRequest {
|
||||
export interface GetEarnSavingsAssetsRequestV2 {
|
||||
periodType: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
@@ -14,7 +14,7 @@ export interface GetEarnSavingsAssetsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetEarnSavingsRecordsRequest {
|
||||
export interface GetEarnSavingsRecordsRequestV2 {
|
||||
coin?: string;
|
||||
periodType: string;
|
||||
orderType?: string;
|
||||
@@ -24,7 +24,7 @@ export interface GetEarnSavingsRecordsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface RedeemSavingsRequest {
|
||||
export interface RedeemSavingsRequestV2 {
|
||||
productId: string;
|
||||
orderId?: string;
|
||||
periodType: string;
|
||||
@@ -39,7 +39,7 @@ export interface RedeemSavingsRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetSharkfinAssetsRequest {
|
||||
export interface GetSharkfinAssetsRequestV2 {
|
||||
status: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
@@ -47,7 +47,7 @@ export interface GetSharkfinAssetsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetSharkfinRecordsRequest {
|
||||
export interface GetSharkfinRecordsRequestV2 {
|
||||
coin?: string;
|
||||
type: string;
|
||||
startTime?: string;
|
||||
@@ -64,14 +64,14 @@ export interface GetSharkfinRecordsRequest {
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetLoanEstInterestAndBorrowableRequest {
|
||||
export interface GetLoanEstInterestAndBorrowableRequestV2 {
|
||||
loanCoin: string;
|
||||
pledgeCoin: string;
|
||||
daily: 'SEVEN' | 'THIRTY';
|
||||
pledgeAmount?: string;
|
||||
}
|
||||
|
||||
export interface BorrowLoanRequest {
|
||||
export interface BorrowLoanRequestV2 {
|
||||
loanCoin: string;
|
||||
pledgeCoin: string;
|
||||
daily: 'SEVEN' | 'THIRTY';
|
||||
@@ -79,14 +79,14 @@ export interface BorrowLoanRequest {
|
||||
loanAmount?: string;
|
||||
}
|
||||
|
||||
export interface RepayLoanRequest {
|
||||
export interface RepayLoanRequestV2 {
|
||||
orderId: string;
|
||||
amount?: string;
|
||||
repayUnlock?: string;
|
||||
repayAll: string;
|
||||
}
|
||||
|
||||
export interface GetLoanRepayHistoryRequest {
|
||||
export interface GetLoanRepayHistoryRequestV2 {
|
||||
orderId?: string;
|
||||
loanCoin?: string;
|
||||
pledgeCoin?: string;
|
||||
@@ -96,14 +96,14 @@ export interface GetLoanRepayHistoryRequest {
|
||||
pageSize?: string;
|
||||
}
|
||||
|
||||
export interface ModifyLoanPledgeRateRequest {
|
||||
export interface ModifyLoanPledgeRateRequestV2 {
|
||||
orderId: string;
|
||||
amount: string;
|
||||
pledgeCoin: string;
|
||||
reviseType: string;
|
||||
}
|
||||
|
||||
export interface GetLoanPledgeRateHistoryRequest {
|
||||
export interface GetLoanPledgeRateHistoryRequestV2 {
|
||||
orderId?: string;
|
||||
reviseSide?: string;
|
||||
pledgeCoin?: string;
|
||||
@@ -113,7 +113,7 @@ export interface GetLoanPledgeRateHistoryRequest {
|
||||
pageSize?: string;
|
||||
}
|
||||
|
||||
export interface GetLoanHistoryRequest {
|
||||
export interface GetLoanHistoryRequestV2 {
|
||||
orderId?: string;
|
||||
loanCoin?: string;
|
||||
pledgeCoin?: string;
|
||||
@@ -124,7 +124,7 @@ export interface GetLoanHistoryRequest {
|
||||
pageSize?: string;
|
||||
}
|
||||
|
||||
export interface GetLiquidationRecordsRequest {
|
||||
export interface GetLiquidationRecordsRequestV2 {
|
||||
orderId?: string;
|
||||
loanCoin?: string;
|
||||
pledgeCoin?: string;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
export interface GetBorrowHistoryRequest {
|
||||
export interface GetBorrowHistoryRequestV2 {
|
||||
loanId?: string;
|
||||
coin?: string;
|
||||
startTime: string;
|
||||
@@ -13,7 +13,7 @@ export interface GetBorrowHistoryRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetRepayHistoryRequest {
|
||||
export interface GetRepayHistoryRequestV2 {
|
||||
repayId?: string;
|
||||
coin?: string;
|
||||
startTime: string;
|
||||
@@ -22,7 +22,7 @@ export interface GetRepayHistoryRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetInterestHistoryRequest {
|
||||
export interface GetInterestHistoryRequestV2 {
|
||||
coin?: string;
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
@@ -30,14 +30,14 @@ export interface GetInterestHistoryRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetLiquidationHistoryRequest {
|
||||
export interface GetLiquidationHistoryRequestV2 {
|
||||
startTime: string;
|
||||
endTime?: string;
|
||||
limit?: string;
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetFinancialHistoryRequest {
|
||||
export interface GetFinancialHistoryRequestV2 {
|
||||
marginType?: string;
|
||||
coin?: string;
|
||||
startTime: string;
|
||||
@@ -76,7 +76,7 @@ export type MarginSTPMode =
|
||||
| 'cancel_maker'
|
||||
| 'cancel_both';
|
||||
|
||||
export interface MarginPlaceOrderRequest {
|
||||
export interface MarginPlaceOrderRequestV2 {
|
||||
symbol: string;
|
||||
orderType: MarginOrderType;
|
||||
price?: string;
|
||||
@@ -101,12 +101,12 @@ export interface MarginBatchOrderEntry {
|
||||
stpMode?: MarginSTPMode;
|
||||
}
|
||||
|
||||
export interface MarginBatchOrdersRequest {
|
||||
export interface MarginBatchOrdersRequestV2 {
|
||||
symbol: string;
|
||||
orderList: MarginBatchOrderEntry[];
|
||||
}
|
||||
|
||||
export interface GetMarginCurrentOrdersRequest {
|
||||
export interface GetMarginCurrentOrdersRequestV2 {
|
||||
symbol: string;
|
||||
orderId?: string;
|
||||
clientOid?: string;
|
||||
@@ -116,7 +116,7 @@ export interface GetMarginCurrentOrdersRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetHistoryOrdersRequest {
|
||||
export interface GetHistoryOrdersRequestV2 {
|
||||
symbol: string;
|
||||
orderId?: string;
|
||||
enterPointSource?: string;
|
||||
@@ -127,7 +127,7 @@ export interface GetHistoryOrdersRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetMarginOrderFillsRequest {
|
||||
export interface GetMarginOrderFillsRequestV2 {
|
||||
symbol: string;
|
||||
orderId?: string;
|
||||
idLessThan?: string;
|
||||
@@ -136,7 +136,7 @@ export interface GetMarginOrderFillsRequest {
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface GetMarginLiquidationOrdersRequest {
|
||||
export interface GetMarginLiquidationOrdersRequestV2 {
|
||||
type?: 'swap' | 'place_order';
|
||||
symbol?: string;
|
||||
fromCoin?: string;
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface SpotHistoricCandlesRequestV2 {
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface SpotHistoricTradesRequest {
|
||||
export interface SpotHistoricTradesRequestV2 {
|
||||
symbol: string;
|
||||
limit?: string;
|
||||
idLessThan?: string;
|
||||
@@ -63,7 +63,7 @@ export type SpotSTPMode =
|
||||
|
||||
export type SpotBatchMode = 'single' | 'multiple';
|
||||
|
||||
export interface SpotOrderRequest {
|
||||
export interface SpotOrderRequestV2 {
|
||||
symbol: string;
|
||||
side: SpotOrderSide;
|
||||
orderType: SpotOrderType;
|
||||
@@ -82,7 +82,7 @@ export interface SpotOrderRequest {
|
||||
executeStopLossPrice?: string;
|
||||
}
|
||||
|
||||
export interface SpotCancelandSubmitOrderRequest {
|
||||
export interface SpotCancelandSubmitOrderRequestV2 {
|
||||
symbol: string;
|
||||
price: string;
|
||||
size: string;
|
||||
@@ -95,14 +95,14 @@ export interface SpotCancelandSubmitOrderRequest {
|
||||
executeStopLossPrice?: string;
|
||||
}
|
||||
|
||||
export interface SpotCancelOrderRequest {
|
||||
export interface SpotCancelOrderRequestV2 {
|
||||
symbol: string;
|
||||
tpslType?: SpotTPSLType;
|
||||
orderId?: string;
|
||||
clientOid?: string;
|
||||
}
|
||||
|
||||
export interface SpotBatchOrderRequestItem {
|
||||
export interface SpotBatchOrderRequestItemV2 {
|
||||
symbol?: string;
|
||||
side: SpotOrderSide;
|
||||
orderType: SpotOrderType;
|
||||
@@ -117,13 +117,13 @@ export interface SpotBatchOrderRequestItem {
|
||||
executeStopLossPrice?: string;
|
||||
}
|
||||
|
||||
export interface SpotBatchOrderRequest {
|
||||
export interface SpotBatchOrderRequestV2 {
|
||||
symbol?: string;
|
||||
batchMode?: SpotBatchMode;
|
||||
orderList: SpotBatchOrderRequestItem[];
|
||||
orderList: SpotBatchOrderRequestItemV2[];
|
||||
}
|
||||
|
||||
export interface SpotBatchCancelOrderRequest {
|
||||
export interface SpotBatchCancelOrderRequestV2 {
|
||||
symbol?: string;
|
||||
batchMode?: SpotBatchMode;
|
||||
orderList: {
|
||||
@@ -133,14 +133,14 @@ export interface SpotBatchCancelOrderRequest {
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface GetSpotOrderInfoRequest {
|
||||
export interface GetSpotOrderInfoRequestV2 {
|
||||
orderId?: string;
|
||||
clientOid?: string;
|
||||
requestTime?: string;
|
||||
receiveWindow?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotOpenOrdersRequest {
|
||||
export interface GetSpotOpenOrdersRequestV2 {
|
||||
symbol?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
@@ -152,7 +152,7 @@ export interface GetSpotOpenOrdersRequest {
|
||||
receiveWindow?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotHistoryOrdersRequest {
|
||||
export interface GetSpotHistoryOrdersRequestV2 {
|
||||
symbol?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
@@ -164,7 +164,7 @@ export interface GetSpotHistoryOrdersRequest {
|
||||
receiveWindow?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotFillsRequest {
|
||||
export interface GetSpotFillsRequestV2 {
|
||||
symbol: string;
|
||||
orderId?: string;
|
||||
startTime?: string;
|
||||
@@ -183,7 +183,7 @@ export type SpotPlanType = 'amount' | 'total';
|
||||
|
||||
export type SpotTriggerType = 'fill_price' | 'mark_price';
|
||||
|
||||
export interface SpotPlanOrderRequest {
|
||||
export interface SpotPlanOrderRequestV2 {
|
||||
symbol: string;
|
||||
side: SpotOrderSide;
|
||||
triggerPrice: string;
|
||||
@@ -197,7 +197,7 @@ export interface SpotPlanOrderRequest {
|
||||
stpMode?: SpotSTPMode;
|
||||
}
|
||||
|
||||
export interface SpotModifyPlanOrderRequest {
|
||||
export interface SpotModifyPlanOrderRequestV2 {
|
||||
orderId?: string;
|
||||
clientOid?: string;
|
||||
triggerPrice: string;
|
||||
@@ -206,7 +206,7 @@ export interface SpotModifyPlanOrderRequest {
|
||||
size: string;
|
||||
}
|
||||
|
||||
export interface GetSpotCurrentPlanOrdersRequest {
|
||||
export interface GetSpotCurrentPlanOrdersRequestV2 {
|
||||
symbol: string;
|
||||
limit?: string;
|
||||
idLessThan?: string;
|
||||
@@ -214,7 +214,7 @@ export interface GetSpotCurrentPlanOrdersRequest {
|
||||
endTime?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotHistoryPlanOrdersRequest {
|
||||
export interface GetSpotHistoryPlanOrdersRequestV2 {
|
||||
symbol: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
@@ -258,7 +258,7 @@ export type SpotAccountType =
|
||||
| 'crossed_margin'
|
||||
| 'isolated_margin';
|
||||
|
||||
export interface GetSpotAccountBillsRequest {
|
||||
export interface GetSpotAccountBillsRequestV2 {
|
||||
coin?: string;
|
||||
groupType?: SpotBillGroupType;
|
||||
businessType?: SpotBusinessType;
|
||||
@@ -268,7 +268,7 @@ export interface GetSpotAccountBillsRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface SpotTransferRequest {
|
||||
export interface SpotTransferRequestV2 {
|
||||
fromType: SpotAccountType;
|
||||
toType: SpotAccountType;
|
||||
amount: string;
|
||||
@@ -277,7 +277,7 @@ export interface SpotTransferRequest {
|
||||
clientOid?: string;
|
||||
}
|
||||
|
||||
export interface SpotSubAccountTransferRequest {
|
||||
export interface SpotSubAccountTransferRequestV2 {
|
||||
fromType: SpotAccountType;
|
||||
toType: SpotAccountType;
|
||||
amount: string;
|
||||
@@ -288,7 +288,7 @@ export interface SpotSubAccountTransferRequest {
|
||||
toUserId: string;
|
||||
}
|
||||
|
||||
export interface SpotWithdrawalRequest {
|
||||
export interface SpotWithdrawalRequestV2 {
|
||||
coin: string;
|
||||
transferType: 'on_chain' | 'internal_transfer';
|
||||
address: string;
|
||||
@@ -301,7 +301,7 @@ export interface SpotWithdrawalRequest {
|
||||
clientOid?: string;
|
||||
}
|
||||
|
||||
export interface SpotMainSubTransferRecordRequest {
|
||||
export interface SpotMainSubTransferRecordRequestV2 {
|
||||
coin?: string;
|
||||
role?: 'initiator' | 'receiver';
|
||||
subUid?: string;
|
||||
@@ -312,7 +312,7 @@ export interface SpotMainSubTransferRecordRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotTransferRecordRequest {
|
||||
export interface GetSpotTransferRecordRequestV2 {
|
||||
coin: string;
|
||||
fromType: SpotAccountType;
|
||||
startTime?: string;
|
||||
@@ -322,7 +322,7 @@ export interface GetSpotTransferRecordRequest {
|
||||
idLessThan?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotSubAccountDepositRecordRequest {
|
||||
export interface GetSpotSubAccountDepositRecordRequestV2 {
|
||||
subUid: string;
|
||||
coin?: string;
|
||||
startTime?: string;
|
||||
@@ -331,7 +331,7 @@ export interface GetSpotSubAccountDepositRecordRequest {
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotWithdrawalRecordRequest {
|
||||
export interface GetSpotWithdrawalRecordRequestV2 {
|
||||
coin?: string;
|
||||
clientOid?: string;
|
||||
startTime: string;
|
||||
@@ -341,11 +341,11 @@ export interface GetSpotWithdrawalRecordRequest {
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface GetSpotDepositRecordRequest {
|
||||
export interface GetSpotDepositRecordRequestV2 {
|
||||
coin?: string;
|
||||
orderId?: string;
|
||||
startTime: string;
|
||||
endTime: string;
|
||||
idLessThan?: string;
|
||||
limit?: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user