feat(): pushed all account types
This commit is contained in:
@@ -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<APIResponseV3WithTime<{ dcpInfos: DCPInfoV5[] }>> {
|
||||
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<APIResponseV3WithTime<{ dcpInfos: DCPInfoV5[] }>> {
|
||||
return this.getPrivate('/v5/account/query-dcp-info');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
****** Asset APIs
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface PositionV5 {
|
||||
bustPrice?: string;
|
||||
positionIM?: string;
|
||||
positionMM?: string;
|
||||
positionBalance?: string;
|
||||
tpslMode?: TPSLModeV5;
|
||||
takeProfit?: string;
|
||||
stopLoss?: string;
|
||||
|
||||
Reference in New Issue
Block a user