feat(): added copytrading response types
This commit is contained in:
@@ -28,6 +28,28 @@ import {
|
|||||||
CrossMaxBorrowableResponseV2,
|
CrossMaxBorrowableResponseV2,
|
||||||
CrossMaxTransferableResponseV2,
|
CrossMaxTransferableResponseV2,
|
||||||
CrossTierConfigurationResponseV2,
|
CrossTierConfigurationResponseV2,
|
||||||
|
CTFuturesFollowerCurrentOrdersV2,
|
||||||
|
CTFuturesFollowerHistoryOrdersV2,
|
||||||
|
CTFuturesFollowerMyTradersV2,
|
||||||
|
CTFuturesFollowerSettingsV2,
|
||||||
|
CTFuturesTraderCurrentOrderV2,
|
||||||
|
CTFuturesTraderHistoryOrderV2,
|
||||||
|
CTFuturesTraderHistoryProfitSummaryV2,
|
||||||
|
CTFuturesTraderMyFollowersV2,
|
||||||
|
CTFuturesTraderProfitShareHistoryV2,
|
||||||
|
CTFuturesTraderSymbolSettingsV2,
|
||||||
|
CTFuturesTraderTotalOrderSummaryV2,
|
||||||
|
CTSpotFollowerCurrentOrdersV2,
|
||||||
|
CTSpotFollowerFollowConfigurationV2,
|
||||||
|
CTSpotFollowerHistoryOrdersV2,
|
||||||
|
CTSpotFollowerMyTradersV2,
|
||||||
|
CTSpotTraderCurrentTrackingOrdersV2,
|
||||||
|
CTSpotTraderFollowerListV2,
|
||||||
|
CTSpotTraderHistoryOrdersV2,
|
||||||
|
CTSpotTraderHistoryProfitSharingV2,
|
||||||
|
CTSpotTraderProfitSummaryV2,
|
||||||
|
CTSpotTraderTotalOrderDetailV2,
|
||||||
|
CTSpotTraderUnrealizedProfitV2,
|
||||||
FundingAssetsV2,
|
FundingAssetsV2,
|
||||||
FuturesAccountBillRequestV2,
|
FuturesAccountBillRequestV2,
|
||||||
FuturesAccountBillV2,
|
FuturesAccountBillV2,
|
||||||
@@ -1993,7 +2015,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getFuturesTraderCurrentOrder(
|
getFuturesTraderCurrentOrder(
|
||||||
params: GetFuturesTraderCurrentOrdersRequestV2,
|
params: GetFuturesTraderCurrentOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTFuturesTraderCurrentOrderV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-trader/order-current-track',
|
'/api/v2/copy/mix-trader/order-current-track',
|
||||||
params,
|
params,
|
||||||
@@ -2002,7 +2024,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getFuturesTraderHistoryOrders(
|
getFuturesTraderHistoryOrders(
|
||||||
params: GetFuturesTraderHistoryOrdersRequestV2,
|
params: GetFuturesTraderHistoryOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTFuturesTraderHistoryOrderV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-trader/order-history-track',
|
'/api/v2/copy/mix-trader/order-history-track',
|
||||||
params,
|
params,
|
||||||
@@ -2011,24 +2033,28 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
modifyFuturesTraderOrderTPSL(
|
modifyFuturesTraderOrderTPSL(
|
||||||
params: ModifyFuturesTraderOrderTPSLRequestV2,
|
params: ModifyFuturesTraderOrderTPSLRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/mix-trader/order-modify-tpsl',
|
'/api/v2/copy/mix-trader/order-modify-tpsl',
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFuturesTraderOrder(): Promise<APIResponse<any>> {
|
getFuturesTraderOrder(): Promise<
|
||||||
|
APIResponse<CTFuturesTraderTotalOrderSummaryV2>
|
||||||
|
> {
|
||||||
return this.getPrivate('/api/v2/copy/mix-trader/order-total-detail');
|
return this.getPrivate('/api/v2/copy/mix-trader/order-total-detail');
|
||||||
}
|
}
|
||||||
|
|
||||||
getFuturesTraderProfitHistory(): Promise<APIResponse<any>> {
|
getFuturesTraderProfitHistory(): Promise<
|
||||||
|
APIResponse<CTFuturesTraderHistoryProfitSummaryV2>
|
||||||
|
> {
|
||||||
return this.getPrivate('/api/v2/copy/mix-trader/profit-history-summarys');
|
return this.getPrivate('/api/v2/copy/mix-trader/profit-history-summarys');
|
||||||
}
|
}
|
||||||
|
|
||||||
getFuturesTraderProfitShareHistory(
|
getFuturesTraderProfitShareHistory(
|
||||||
params: GetFuturesTraderProfitShareDetailRequestV2,
|
params: GetFuturesTraderProfitShareDetailRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTFuturesTraderProfitShareHistoryV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-trader/profit-history-details',
|
'/api/v2/copy/mix-trader/profit-history-details',
|
||||||
params,
|
params,
|
||||||
@@ -2039,7 +2065,15 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
trackingNo: string;
|
trackingNo: string;
|
||||||
symbol: string;
|
symbol: string;
|
||||||
productType: CopyTradingProductTypeV2;
|
productType: CopyTradingProductTypeV2;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<
|
||||||
|
APIResponse<
|
||||||
|
{
|
||||||
|
trackingNo: string;
|
||||||
|
symbol: string;
|
||||||
|
productType: string;
|
||||||
|
}[]
|
||||||
|
>
|
||||||
|
> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/mix-trader/order-close-positions',
|
'/api/v2/copy/mix-trader/order-close-positions',
|
||||||
params,
|
params,
|
||||||
@@ -2050,14 +2084,30 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
coin?: string;
|
coin?: string;
|
||||||
pageSize?: string;
|
pageSize?: string;
|
||||||
pageNo?: string;
|
pageNo?: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<
|
||||||
|
APIResponse<
|
||||||
|
{
|
||||||
|
coin: string;
|
||||||
|
profit: string;
|
||||||
|
nickName: string;
|
||||||
|
}[]
|
||||||
|
>
|
||||||
|
> {
|
||||||
return this.getPrivate('/api/v2/copy/mix-trader/profit-details', params);
|
return this.getPrivate('/api/v2/copy/mix-trader/profit-details', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFuturesTraderProfitShareGroup(params?: {
|
getFuturesTraderProfitShareGroup(params?: {
|
||||||
pageSize?: string;
|
pageSize?: string;
|
||||||
pageNo?: string;
|
pageNo?: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<
|
||||||
|
APIResponse<
|
||||||
|
{
|
||||||
|
coin: string;
|
||||||
|
profit: string;
|
||||||
|
profitTime: string;
|
||||||
|
}[]
|
||||||
|
>
|
||||||
|
> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-trader/profits-group-coin-date',
|
'/api/v2/copy/mix-trader/profits-group-coin-date',
|
||||||
params,
|
params,
|
||||||
@@ -2066,7 +2116,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getFuturesTraderSymbolSettings(params: {
|
getFuturesTraderSymbolSettings(params: {
|
||||||
productType: CopyTradingProductTypeV2;
|
productType: CopyTradingProductTypeV2;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<CTFuturesTraderSymbolSettingsV2[]>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-trader/config-query-symbols',
|
'/api/v2/copy/mix-trader/config-query-symbols',
|
||||||
params,
|
params,
|
||||||
@@ -2075,7 +2125,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
updateFuturesTraderSymbolSettings(params: {
|
updateFuturesTraderSymbolSettings(params: {
|
||||||
settingList: FuturesTraderSymbolSettingRequestV2[];
|
settingList: FuturesTraderSymbolSettingRequestV2[];
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/mix-trader/config-setting-symbols',
|
'/api/v2/copy/mix-trader/config-setting-symbols',
|
||||||
params,
|
params,
|
||||||
@@ -2086,7 +2136,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
enable?: 'YES' | 'NO';
|
enable?: 'YES' | 'NO';
|
||||||
showTotalEquity?: 'YES' | 'NO';
|
showTotalEquity?: 'YES' | 'NO';
|
||||||
showTpsl?: 'YES' | 'NO';
|
showTpsl?: 'YES' | 'NO';
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/mix-trader/config-settings-base',
|
'/api/v2/copy/mix-trader/config-settings-base',
|
||||||
params,
|
params,
|
||||||
@@ -2095,7 +2145,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getFuturesTraderFollowers(
|
getFuturesTraderFollowers(
|
||||||
params?: GetFuturesTraderFollowersRequestV2,
|
params?: GetFuturesTraderFollowersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTFuturesTraderMyFollowersV2[]>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-trader/config-query-followers',
|
'/api/v2/copy/mix-trader/config-query-followers',
|
||||||
params,
|
params,
|
||||||
@@ -2104,7 +2154,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
removeFuturesTraderFollower(params: {
|
removeFuturesTraderFollower(params: {
|
||||||
followerUid: string;
|
followerUid: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/mix-trader/config-remove-follower',
|
'/api/v2/copy/mix-trader/config-remove-follower',
|
||||||
params,
|
params,
|
||||||
@@ -2121,7 +2171,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getFuturesFollowerCurrentOrders(
|
getFuturesFollowerCurrentOrders(
|
||||||
params: GetFollowerFuturesCurrentTrackingOrdersRequestV2,
|
params: GetFollowerFuturesCurrentTrackingOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTFuturesFollowerCurrentOrdersV2[]>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-follower/query-current-orders',
|
'/api/v2/copy/mix-follower/query-current-orders',
|
||||||
params,
|
params,
|
||||||
@@ -2130,7 +2180,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getFuturesFollowerHistoryOrders(
|
getFuturesFollowerHistoryOrders(
|
||||||
params: GetFollowerFuturesHistoryTrackingOrdersRequestV2,
|
params: GetFollowerFuturesHistoryTrackingOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTFuturesFollowerHistoryOrdersV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-follower/query-history-orders',
|
'/api/v2/copy/mix-follower/query-history-orders',
|
||||||
params,
|
params,
|
||||||
@@ -2139,25 +2189,29 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
updateFuturesFollowerTPSL(
|
updateFuturesFollowerTPSL(
|
||||||
params: UpdateFuturesFollowerTPSLRequestV2,
|
params: UpdateFuturesFollowerTPSLRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate('/api/v2/copy/mix-follower/setting-tpsl', params);
|
return this.postPrivate('/api/v2/copy/mix-follower/setting-tpsl', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFuturesFollowerSettings(
|
updateFuturesFollowerSettings(
|
||||||
params: UpdateFuturesFollowerSettingsRequestV2,
|
params: UpdateFuturesFollowerSettingsRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate('/api/v2/copy/mix-follower/settings', params);
|
return this.postPrivate('/api/v2/copy/mix-follower/settings', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFuturesFollowerSettings(params: {
|
getFuturesFollowerSettings(params: {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<CTFuturesFollowerSettingsV2>> {
|
||||||
return this.getPrivate('/api/v2/copy/mix-follower/query-settings', params);
|
return this.getPrivate('/api/v2/copy/mix-follower/query-settings', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
closeFuturesFollowerPositions(
|
closeFuturesFollowerPositions(
|
||||||
params: CloseFuturesFollowerPositionsRequestV2,
|
params: CloseFuturesFollowerPositionsRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<
|
||||||
|
APIResponse<{
|
||||||
|
orderIdList: string[];
|
||||||
|
}>
|
||||||
|
> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/mix-follower/close-positions',
|
'/api/v2/copy/mix-follower/close-positions',
|
||||||
params,
|
params,
|
||||||
@@ -2166,14 +2220,22 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getFuturesFollowerTraders(
|
getFuturesFollowerTraders(
|
||||||
params: GetFuturesFollowerTradersRequestV2,
|
params: GetFuturesFollowerTradersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTFuturesFollowerMyTradersV2[]>> {
|
||||||
return this.getPrivate('/api/v2/copy/mix-follower/query-traders', params);
|
return this.getPrivate('/api/v2/copy/mix-follower/query-traders', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFuturesFollowerFollowLimit(params: {
|
getFuturesFollowerFollowLimit(params: {
|
||||||
symbol: string;
|
symbol: string;
|
||||||
productType: CopyTradingProductTypeV2;
|
productType: CopyTradingProductTypeV2;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<
|
||||||
|
APIResponse<
|
||||||
|
{
|
||||||
|
maxFollowSize: string;
|
||||||
|
minFollowSize: string;
|
||||||
|
symbol: string;
|
||||||
|
}[]
|
||||||
|
>
|
||||||
|
> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/mix-follower/query-quantity-limit',
|
'/api/v2/copy/mix-follower/query-quantity-limit',
|
||||||
params,
|
params,
|
||||||
@@ -2182,7 +2244,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
unfollowFuturesTrader(params: {
|
unfollowFuturesTrader(params: {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate('/api/v2/copy/mix-follower/cancel-trader', params);
|
return this.postPrivate('/api/v2/copy/mix-follower/cancel-trader', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2220,13 +2282,13 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
getSpotTraderProfit(): Promise<APIResponse<any>> {
|
getSpotTraderProfit(): Promise<APIResponse<CTSpotTraderProfitSummaryV2>> {
|
||||||
return this.getPrivate('/api/v2/copy/spot-trader/profit-summarys');
|
return this.getPrivate('/api/v2/copy/spot-trader/profit-summarys');
|
||||||
}
|
}
|
||||||
|
|
||||||
getSpotTraderHistoryProfit(
|
getSpotTraderHistoryProfit(
|
||||||
params: GetSpotTraderHistoryProfitRequestV2,
|
params: GetSpotTraderHistoryProfitRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTSpotTraderHistoryProfitSharingV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/spot-trader/profit-history-details',
|
'/api/v2/copy/spot-trader/profit-history-details',
|
||||||
params,
|
params,
|
||||||
@@ -2237,11 +2299,11 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
coin?: string;
|
coin?: string;
|
||||||
pageNo?: string;
|
pageNo?: string;
|
||||||
pageSize?: string;
|
pageSize?: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<CTSpotTraderUnrealizedProfitV2[]>> {
|
||||||
return this.getPrivate('/api/v2/copy/spot-trader/profit-details', params);
|
return this.getPrivate('/api/v2/copy/spot-trader/profit-details', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSpotTraderOrder(): Promise<APIResponse<any>> {
|
getSpotTraderOrder(): Promise<APIResponse<CTSpotTraderTotalOrderDetailV2>> {
|
||||||
return this.getPrivate('/api/v2/copy/spot-trader/order-total-detail');
|
return this.getPrivate('/api/v2/copy/spot-trader/order-total-detail');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2249,7 +2311,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
trackingNo: string;
|
trackingNo: string;
|
||||||
stopSurplusPrice?: string;
|
stopSurplusPrice?: string;
|
||||||
stopLossPrice?: string;
|
stopLossPrice?: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/spot-trader/order-modify-tpsl',
|
'/api/v2/copy/spot-trader/order-modify-tpsl',
|
||||||
params,
|
params,
|
||||||
@@ -2258,7 +2320,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getSpotTraderHistoryOrders(
|
getSpotTraderHistoryOrders(
|
||||||
params: GetSpotTraderHistoryOrdersRequestV2,
|
params: GetSpotTraderHistoryOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTSpotTraderHistoryOrdersV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/spot-trader/order-history-track',
|
'/api/v2/copy/spot-trader/order-history-track',
|
||||||
params,
|
params,
|
||||||
@@ -2267,7 +2329,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getSpotTraderCurrentOrders(
|
getSpotTraderCurrentOrders(
|
||||||
params: GetSpotTraderCurrentOrdersRequestV2,
|
params: GetSpotTraderCurrentOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTSpotTraderCurrentTrackingOrdersV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/spot-trader/order-current-track',
|
'/api/v2/copy/spot-trader/order-current-track',
|
||||||
params,
|
params,
|
||||||
@@ -2277,7 +2339,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
sellSpotTrader(params: {
|
sellSpotTrader(params: {
|
||||||
trackingNoList: string[];
|
trackingNoList: string[];
|
||||||
symbol: string;
|
symbol: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/spot-trader/order-close-tracking',
|
'/api/v2/copy/spot-trader/order-close-tracking',
|
||||||
params,
|
params,
|
||||||
@@ -2287,7 +2349,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
getSpotTraderSymbolSettings(params: {
|
getSpotTraderSymbolSettings(params: {
|
||||||
symbolList: string[];
|
symbolList: string[];
|
||||||
settingType: 'add' | 'delete';
|
settingType: 'add' | 'delete';
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/spot-trader/config-setting-symbols',
|
'/api/v2/copy/spot-trader/config-setting-symbols',
|
||||||
params,
|
params,
|
||||||
@@ -2296,7 +2358,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
removeSpotTraderFollowers(params: {
|
removeSpotTraderFollowers(params: {
|
||||||
followerUid: string;
|
followerUid: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/spot-trader/config-remove-follower',
|
'/api/v2/copy/spot-trader/config-remove-follower',
|
||||||
params,
|
params,
|
||||||
@@ -2309,7 +2371,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getSpotTraderFollowers(
|
getSpotTraderFollowers(
|
||||||
params: GetSpotTraderFollowersRequestV2,
|
params: GetSpotTraderFollowersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTSpotTraderFollowerListV2[]>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/spot-trader/config-query-followers',
|
'/api/v2/copy/spot-trader/config-query-followers',
|
||||||
params,
|
params,
|
||||||
@@ -2326,7 +2388,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
cancelSpotFollowerOrder(params: {
|
cancelSpotFollowerOrder(params: {
|
||||||
trackingNoList: string[];
|
trackingNoList: string[];
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate('/api/v2/copy/spot-follower/stop-order', params);
|
return this.postPrivate('/api/v2/copy/spot-follower/stop-order', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2335,7 +2397,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
autoCopy?: 'on' | 'off';
|
autoCopy?: 'on' | 'off';
|
||||||
mode?: 'basic' | 'advanced';
|
mode?: 'basic' | 'advanced';
|
||||||
settings: SpotFollowerCopyTradeSettingV2[];
|
settings: SpotFollowerCopyTradeSettingV2[];
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate('/api/v2/copy/spot-follower/settings', params);
|
return this.postPrivate('/api/v2/copy/spot-follower/settings', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2343,7 +2405,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
trackingNo: string;
|
trackingNo: string;
|
||||||
stopSurplusPrice?: string;
|
stopSurplusPrice?: string;
|
||||||
stopLossPrice?: string;
|
stopLossPrice?: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate('/api/v2/copy/spot-follower/setting-tpsl', params);
|
return this.postPrivate('/api/v2/copy/spot-follower/setting-tpsl', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2352,13 +2414,15 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
pageSize?: string;
|
pageSize?: string;
|
||||||
startTime?: string;
|
startTime?: string;
|
||||||
endTime?: string;
|
endTime?: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<CTSpotFollowerMyTradersV2>> {
|
||||||
return this.getPrivate('/api/v2/copy/spot-follower/query-traders', params);
|
return this.getPrivate('/api/v2/copy/spot-follower/query-traders', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSpotFollowerCurrentTraderSymbols(params: {
|
getSpotFollowerCurrentTraderSymbols(params: { traderId: string }): Promise<
|
||||||
traderId: string;
|
APIResponse<{
|
||||||
}): Promise<APIResponse<any>> {
|
currentTradingList: string[];
|
||||||
|
}>
|
||||||
|
> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/spot-follower/query-trader-symbols',
|
'/api/v2/copy/spot-follower/query-trader-symbols',
|
||||||
params,
|
params,
|
||||||
@@ -2367,13 +2431,13 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getSpotFollowerSettings(params: {
|
getSpotFollowerSettings(params: {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<CTSpotFollowerFollowConfigurationV2>> {
|
||||||
return this.getPrivate('/api/v2/copy/spot-follower/query-settings', params);
|
return this.getPrivate('/api/v2/copy/spot-follower/query-settings', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSpotFollowerHistoryOrders(
|
getSpotFollowerHistoryOrders(
|
||||||
params: GetSpotFollowerHistoryOrdersRequestV2,
|
params: GetSpotFollowerHistoryOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTSpotFollowerHistoryOrdersV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/spot-follower/query-history-orders',
|
'/api/v2/copy/spot-follower/query-history-orders',
|
||||||
params,
|
params,
|
||||||
@@ -2382,7 +2446,7 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
|
|
||||||
getSpotFollowerOpenOrders(
|
getSpotFollowerOpenOrders(
|
||||||
params: GetSpotFollowerOpenOrdersRequestV2,
|
params: GetSpotFollowerOpenOrdersRequestV2,
|
||||||
): Promise<APIResponse<any>> {
|
): Promise<APIResponse<CTSpotFollowerCurrentOrdersV2>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/api/v2/copy/spot-follower/query-current-orders',
|
'/api/v2/copy/spot-follower/query-current-orders',
|
||||||
params,
|
params,
|
||||||
@@ -2392,14 +2456,16 @@ export class RestClientV2 extends BaseRestClient {
|
|||||||
sellSpotFollower(params: {
|
sellSpotFollower(params: {
|
||||||
trackingNoList: string[];
|
trackingNoList: string[];
|
||||||
symbol: string;
|
symbol: string;
|
||||||
}): Promise<APIResponse<any>> {
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/api/v2/copy/spot-follower/order-close-tracking',
|
'/api/v2/copy/spot-follower/order-close-tracking',
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
unfollowSpotTrader(params: { traderId: string }): Promise<APIResponse<any>> {
|
unfollowSpotTrader(params: {
|
||||||
|
traderId: string;
|
||||||
|
}): Promise<APIResponse<string>> {
|
||||||
return this.postPrivate('/api/v2/copy/spot-follower/cancel-trader', params);
|
return this.postPrivate('/api/v2/copy/spot-follower/cancel-trader', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export * from './v1/shared';
|
|||||||
export * from './v1/spot';
|
export * from './v1/spot';
|
||||||
export * from './v2/broker';
|
export * from './v2/broker';
|
||||||
export * from './v2/common';
|
export * from './v2/common';
|
||||||
|
export * from './v2/copy-trading';
|
||||||
export * from './v2/futures';
|
export * from './v2/futures';
|
||||||
export * from './v2/margin';
|
export * from './v2/margin';
|
||||||
export * from './v2/spot';
|
export * from './v2/spot';
|
||||||
|
|||||||
416
src/types/response/v2/copy-trading.ts
Normal file
416
src/types/response/v2/copy-trading.ts
Normal file
@@ -0,0 +1,416 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Copy Trading | Future copy trading | Trader Api
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface CTFuturesTraderCurrentOrderV2 {
|
||||||
|
trackingList: {
|
||||||
|
trackingNo: string;
|
||||||
|
openOrderId: string;
|
||||||
|
symbol: string;
|
||||||
|
posSide: string;
|
||||||
|
openLeverage: string;
|
||||||
|
openPriceAvg: string;
|
||||||
|
openTime: string;
|
||||||
|
openSize: string;
|
||||||
|
presetStopSurplusPrice: string;
|
||||||
|
presetStopLossPrice: string;
|
||||||
|
openFee: string;
|
||||||
|
followCount: string;
|
||||||
|
}[];
|
||||||
|
endId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesTraderHistoryOrderV2 {
|
||||||
|
trackingList: {
|
||||||
|
trackingNo: string;
|
||||||
|
symbol: string;
|
||||||
|
openOrderId: string;
|
||||||
|
closeOrderId: string;
|
||||||
|
productType: string;
|
||||||
|
posSide: string;
|
||||||
|
openLeverage: string;
|
||||||
|
openPriceAvg: string;
|
||||||
|
openTime: string;
|
||||||
|
openSize: string;
|
||||||
|
closeSize: string;
|
||||||
|
closeTime: string;
|
||||||
|
closePriceAvg: string;
|
||||||
|
stopType: string;
|
||||||
|
achievedPL: string;
|
||||||
|
openFee: string;
|
||||||
|
closeFee: string;
|
||||||
|
cTime: string;
|
||||||
|
}[];
|
||||||
|
endId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesTraderTotalOrderSummaryV2 {
|
||||||
|
roi: string;
|
||||||
|
tradingOrderNum: string;
|
||||||
|
totalFollowerNum: string;
|
||||||
|
currentFollowerNum: string;
|
||||||
|
totalpl: string;
|
||||||
|
gainNum: string;
|
||||||
|
lossNum: string;
|
||||||
|
winRate: string;
|
||||||
|
tradingPairsAvailableList: string[];
|
||||||
|
lastWeekRoiList: {
|
||||||
|
rate: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
lastWeekProfitList: {
|
||||||
|
amount: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
lastMonthRoiList: {
|
||||||
|
rate: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
lastMonthProfitList: {
|
||||||
|
amount: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
totalEquity: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesTraderHistoryProfitSummaryV2 {
|
||||||
|
profitSummary: {
|
||||||
|
yesterdayProfit: string;
|
||||||
|
sumProfit: string;
|
||||||
|
waitProfit: string;
|
||||||
|
yesterdayTime: string;
|
||||||
|
};
|
||||||
|
profitHistoryList: {
|
||||||
|
coin: string;
|
||||||
|
profitCount: string;
|
||||||
|
lastProfitTime: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesTraderProfitShareHistoryV2 {
|
||||||
|
profitList: {
|
||||||
|
profitId: string;
|
||||||
|
coin: string;
|
||||||
|
profit: string;
|
||||||
|
nickName: string;
|
||||||
|
profitTime: string;
|
||||||
|
}[];
|
||||||
|
endId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesTraderSymbolSettingsV2 {
|
||||||
|
symbol: string;
|
||||||
|
openTrader: string;
|
||||||
|
minOpenCount: string;
|
||||||
|
maxLeverage: string;
|
||||||
|
stopSurplusRatio: string;
|
||||||
|
stopLossRatio: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesTraderMyFollowersV2 {
|
||||||
|
accountEquity: string;
|
||||||
|
isRemove: string;
|
||||||
|
followerHeadPic: string;
|
||||||
|
followerName: string;
|
||||||
|
followerUid: string;
|
||||||
|
followerTime: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Copy Trading | Future copy trading | Follower Api
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface CTFuturesFollowerCurrentOrdersV2 {
|
||||||
|
trackingNo: string;
|
||||||
|
traderName: string;
|
||||||
|
openOrderId: string;
|
||||||
|
closeOrderId: string;
|
||||||
|
traderId: string;
|
||||||
|
symbol: string;
|
||||||
|
posSide: string;
|
||||||
|
openLeverage: string;
|
||||||
|
openAvgPrice: string;
|
||||||
|
openTime: string;
|
||||||
|
openSize: string;
|
||||||
|
closeAvgPrice: string;
|
||||||
|
closeSize: string;
|
||||||
|
openMarginSz: string;
|
||||||
|
closeTime: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesFollowerHistoryOrdersV2 {
|
||||||
|
trackingList: {
|
||||||
|
trackingNo: string;
|
||||||
|
posSide: string;
|
||||||
|
openLeverage: string;
|
||||||
|
openSize: string;
|
||||||
|
closeSize: string;
|
||||||
|
openPriceAvg: string;
|
||||||
|
closePriceAvg: string;
|
||||||
|
achievedPL: string;
|
||||||
|
openFee: string;
|
||||||
|
closeFee: string;
|
||||||
|
symbol: string;
|
||||||
|
profitRate: string;
|
||||||
|
netProfit: string;
|
||||||
|
openOrderId: string;
|
||||||
|
closeOrderId: string;
|
||||||
|
openTime: string;
|
||||||
|
closeTime: string;
|
||||||
|
traderId: string;
|
||||||
|
productType: string;
|
||||||
|
}[];
|
||||||
|
endId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesFollowerSettingsV2 {
|
||||||
|
followerEnable: string;
|
||||||
|
detailList: {
|
||||||
|
symbol: string;
|
||||||
|
productType: string;
|
||||||
|
marginType: string;
|
||||||
|
marginCoin: string;
|
||||||
|
leverType: string;
|
||||||
|
longLeverage: string;
|
||||||
|
shortLeverage: string;
|
||||||
|
traceType: string;
|
||||||
|
traceValue: string;
|
||||||
|
maxHoldSize: string;
|
||||||
|
stopSurplusRatio: string;
|
||||||
|
stopLossRatio: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTFuturesFollowerMyTradersV2 {
|
||||||
|
certificationType: string;
|
||||||
|
traderId: string;
|
||||||
|
traderName: string;
|
||||||
|
maxFollowLimit: string;
|
||||||
|
followCount: string;
|
||||||
|
traceTotalMarginAmount: string;
|
||||||
|
traceTotalNetProfit: string;
|
||||||
|
traceTotalProfit: string;
|
||||||
|
currentTradingPairs: string[];
|
||||||
|
followerTime: string;
|
||||||
|
bgbMaxFollowLimit: string;
|
||||||
|
bgbFollowCount: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Copy Trading | Spot copy trading | Trader api
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface CTSpotTraderProfitSummaryV2 {
|
||||||
|
profitSummarys: {
|
||||||
|
yesterdayProfit: string;
|
||||||
|
yesterdayTime: string;
|
||||||
|
sumProfit: string;
|
||||||
|
waitProfit: string;
|
||||||
|
};
|
||||||
|
profitHistoryList: {
|
||||||
|
coin: string;
|
||||||
|
profitCount: string;
|
||||||
|
lastProfitTime: string;
|
||||||
|
historysByDateList: {
|
||||||
|
profit: string;
|
||||||
|
profitTime: string;
|
||||||
|
}[];
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotTraderHistoryProfitSharingV2 {
|
||||||
|
endId: string;
|
||||||
|
profitList: {
|
||||||
|
profitId: string;
|
||||||
|
coin: string;
|
||||||
|
distributeRatio: string;
|
||||||
|
profit: string;
|
||||||
|
followerName: string;
|
||||||
|
profitTime: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotTraderUnrealizedProfitV2 {
|
||||||
|
distributeRatio: string;
|
||||||
|
coin: string;
|
||||||
|
profit: string;
|
||||||
|
followerName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotTraderTotalOrderDetailV2 {
|
||||||
|
totalFollowerNum: string;
|
||||||
|
currentFollowerNum: string;
|
||||||
|
maxFollowerNum: string;
|
||||||
|
tradingOrderNum: string;
|
||||||
|
totalpl: string;
|
||||||
|
gainNum: string;
|
||||||
|
lossNum: string;
|
||||||
|
totalEquity: string;
|
||||||
|
winRate: string;
|
||||||
|
lastWeekRoiList: {
|
||||||
|
rate: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
lastMonthRoiList: {
|
||||||
|
rate: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
lastWeekProfitList: {
|
||||||
|
amount: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
lastMonthProfitList: {
|
||||||
|
amount: string;
|
||||||
|
ctime: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotTraderHistoryOrdersV2 {
|
||||||
|
endId: string;
|
||||||
|
trackingList: {
|
||||||
|
trackingNo: string;
|
||||||
|
fillSize: string;
|
||||||
|
buyPrice: string;
|
||||||
|
sellPrice: string;
|
||||||
|
achievedPL: string;
|
||||||
|
buyTime: string;
|
||||||
|
sellTime: string;
|
||||||
|
buyFee: string;
|
||||||
|
sellFee: string;
|
||||||
|
achievedPLR: string;
|
||||||
|
symbol: string;
|
||||||
|
netProfit: string;
|
||||||
|
followCount: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotTraderCurrentTrackingOrdersV2 {
|
||||||
|
endId: string;
|
||||||
|
trackingList: {
|
||||||
|
trackingNo: string;
|
||||||
|
orderId: string;
|
||||||
|
buyFillSize: string;
|
||||||
|
buyDelegateSize: string;
|
||||||
|
buyPrice: string;
|
||||||
|
unrealizedPL: string;
|
||||||
|
buyTime: string;
|
||||||
|
buyFee: string;
|
||||||
|
unrealizedPLR: string;
|
||||||
|
symbol: string;
|
||||||
|
stopLossPrice: string | null;
|
||||||
|
stopSurplusPrice: string | null;
|
||||||
|
followCount: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotTraderFollowerListV2 {
|
||||||
|
accountEquity: string;
|
||||||
|
isRemove: string;
|
||||||
|
followerHeadPic: string | null;
|
||||||
|
followerName: string;
|
||||||
|
followerUid: string;
|
||||||
|
followerTime: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Copy Trading | Spot copy trading | Follower api
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface CTSpotFollowerMyTradersV2 {
|
||||||
|
resultList: {
|
||||||
|
certificationType: string;
|
||||||
|
traceTotalAmount: string;
|
||||||
|
traceTotalNetProfit: string;
|
||||||
|
traceTotalProfit: string;
|
||||||
|
traderName: string;
|
||||||
|
traderId: string;
|
||||||
|
maxFollowLimit: string;
|
||||||
|
bgbMaxFollowLimit: string;
|
||||||
|
followCount: string;
|
||||||
|
bgbFollowCount: string;
|
||||||
|
followerTime: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotFollowerFollowConfigurationV2 {
|
||||||
|
enable: string;
|
||||||
|
profitRate: string;
|
||||||
|
settledInDays: string;
|
||||||
|
tradeSettingList: {
|
||||||
|
maxTraceAmount: string;
|
||||||
|
stopLossRation: string;
|
||||||
|
stopSurplusRation: string;
|
||||||
|
symbol: string;
|
||||||
|
traceType: string;
|
||||||
|
}[];
|
||||||
|
tradeSymbolSettingList: {
|
||||||
|
maxStopLossRation: string;
|
||||||
|
maxStopSurplusRation: string;
|
||||||
|
maxTraceAmount: string;
|
||||||
|
maxTraceAmountSystem: string;
|
||||||
|
maxTraceSize: string;
|
||||||
|
maxTraceRation: string;
|
||||||
|
minStopLossRation: string;
|
||||||
|
minStopSurplusRation: string;
|
||||||
|
minTraceAmount: string;
|
||||||
|
minTraceSize: string;
|
||||||
|
minTraceRation: string;
|
||||||
|
sliderMaxStopLossRatio: string;
|
||||||
|
sliderMaxStopSurplusRatio: string;
|
||||||
|
symbol: string;
|
||||||
|
}[];
|
||||||
|
traderHeadPic: string;
|
||||||
|
traderName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotFollowerHistoryOrdersV2 {
|
||||||
|
endId: string;
|
||||||
|
trackingList: {
|
||||||
|
trackingNo: string;
|
||||||
|
traderId: string;
|
||||||
|
fillSize: string;
|
||||||
|
buyPrice: string;
|
||||||
|
sellPrice: string;
|
||||||
|
buyFee: string;
|
||||||
|
sellFee: string;
|
||||||
|
achievedPL: string;
|
||||||
|
achievedPLR: string;
|
||||||
|
symbol: string;
|
||||||
|
buyTime: string;
|
||||||
|
sellTime: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CTSpotFollowerCurrentOrdersV2 {
|
||||||
|
endId: string;
|
||||||
|
trackingList: {
|
||||||
|
trackingNo: string;
|
||||||
|
traderId: string;
|
||||||
|
buyFillSize: string;
|
||||||
|
buyDelegateSize: string;
|
||||||
|
buyPrice: string;
|
||||||
|
unrealizedPL: string;
|
||||||
|
buyTime: string;
|
||||||
|
buyFee: string;
|
||||||
|
unrealizedPLR: string;
|
||||||
|
symbol: string;
|
||||||
|
stopSurplusPrice: string | null;
|
||||||
|
stopLossPrice: string | null;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user