diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index 9ffd24a..833e7cc 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -747,6 +747,7 @@ export class RestClientV5 extends BaseRestClient { } /** + * @deprecated * This endpoint sets the take profit/stop loss (TP/SL) mode to full or partial. * * Unified account covers: Linear contract; normal account covers: USDT perpetual, inverse perpetual, inverse futures. @@ -775,6 +776,7 @@ export class RestClientV5 extends BaseRestClient { } /** + * @deprecated * The risk limit will limit the maximum position value you can hold under different margin requirements. * If you want to hold a bigger position size, you need more margin. * @@ -1101,6 +1103,19 @@ export class RestClientV5 extends BaseRestClient { return this.getPrivate('/v5/account/info'); } + /** + * Query the DCP configuration of the account's contracts (USDT perpetual, USDC perpetual and USDC Futures) / spot / options. + * + * Only the configured main / sub account can query information from this API. Calling this API by an account always returns empty. + * + * INFO + * support linear contract (USDT, USDC Perp & USDC Futures) / Spot / Options only + * Unified account only + */ + getDCPInfo(): Promise> { + return this.getPrivate('/v5/account/query-dcp-info'); + } + /** * Query transaction logs in Unified account. */ @@ -1185,19 +1200,6 @@ export class RestClientV5 extends BaseRestClient { return this.getPrivate('/v5/account/mmp-state', { baseCoin }); } - /** - * Query the DCP configuration of the account's contracts (USDT perpetual, USDC perpetual and USDC Futures) / spot / options. - * - * Only the configured main / sub account can query information from this API. Calling this API by an account always returns empty. - * - * INFO - * support linear contract (USDT, USDC Perp & USDC Futures) / Spot / Options only - * Unified account only - */ - getDCPInfo(): Promise> { - return this.getPrivate('/v5/account/query-dcp-info'); - } - /** * ****** Asset APIs diff --git a/src/types/response/v5-account.ts b/src/types/response/v5-account.ts index b23884d..3bf10a3 100644 --- a/src/types/response/v5-account.ts +++ b/src/types/response/v5-account.ts @@ -14,7 +14,7 @@ export interface WalletBalanceV5Coin { free: string; // spot only locked: string; // spot only borrowAmount: string; - availableToBorrow: string; + availableToBorrow: string; // deprecated field availableToWithdraw: string; accruedInterest: string; totalOrderIM: string; @@ -23,6 +23,8 @@ export interface WalletBalanceV5Coin { unrealisedPnl: string; cumRealisedPnl: string; bonus: string; + marginCollateral: boolean; + collateralSwitch: boolean; } export interface WalletBalanceV5 { @@ -54,6 +56,9 @@ export interface BorrowHistoryRecordV5 { hourlyBorrowRate: string; InterestBearingBorrowSize: string; costExemption: string; + borrowAmount: string; + unrealisedLoss: string; + freeBorrowedAmount: string; } export interface CollateralInfoV5 { @@ -110,6 +115,7 @@ export interface TransactionLogV5 { change: string; cashBalance: string; feeRate: string; + bonusChange: string; tradeId: string; orderId: string; orderLinkId: string; diff --git a/src/types/response/v5-position.ts b/src/types/response/v5-position.ts index eb09d36..fa03842 100644 --- a/src/types/response/v5-position.ts +++ b/src/types/response/v5-position.ts @@ -29,6 +29,7 @@ export interface PositionV5 { bustPrice?: string; positionIM?: string; positionMM?: string; + positionBalance?: string; tpslMode?: TPSLModeV5; takeProfit?: string; stopLoss?: string;