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.
|
* 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.
|
* 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.
|
* 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.
|
* 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');
|
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.
|
* Query transaction logs in Unified account.
|
||||||
*/
|
*/
|
||||||
@@ -1185,19 +1200,6 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
return this.getPrivate('/v5/account/mmp-state', { baseCoin });
|
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
|
****** Asset APIs
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export interface WalletBalanceV5Coin {
|
|||||||
free: string; // spot only
|
free: string; // spot only
|
||||||
locked: string; // spot only
|
locked: string; // spot only
|
||||||
borrowAmount: string;
|
borrowAmount: string;
|
||||||
availableToBorrow: string;
|
availableToBorrow: string; // deprecated field
|
||||||
availableToWithdraw: string;
|
availableToWithdraw: string;
|
||||||
accruedInterest: string;
|
accruedInterest: string;
|
||||||
totalOrderIM: string;
|
totalOrderIM: string;
|
||||||
@@ -23,6 +23,8 @@ export interface WalletBalanceV5Coin {
|
|||||||
unrealisedPnl: string;
|
unrealisedPnl: string;
|
||||||
cumRealisedPnl: string;
|
cumRealisedPnl: string;
|
||||||
bonus: string;
|
bonus: string;
|
||||||
|
marginCollateral: boolean;
|
||||||
|
collateralSwitch: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WalletBalanceV5 {
|
export interface WalletBalanceV5 {
|
||||||
@@ -54,6 +56,9 @@ export interface BorrowHistoryRecordV5 {
|
|||||||
hourlyBorrowRate: string;
|
hourlyBorrowRate: string;
|
||||||
InterestBearingBorrowSize: string;
|
InterestBearingBorrowSize: string;
|
||||||
costExemption: string;
|
costExemption: string;
|
||||||
|
borrowAmount: string;
|
||||||
|
unrealisedLoss: string;
|
||||||
|
freeBorrowedAmount: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CollateralInfoV5 {
|
export interface CollateralInfoV5 {
|
||||||
@@ -110,6 +115,7 @@ export interface TransactionLogV5 {
|
|||||||
change: string;
|
change: string;
|
||||||
cashBalance: string;
|
cashBalance: string;
|
||||||
feeRate: string;
|
feeRate: string;
|
||||||
|
bonusChange: string;
|
||||||
tradeId: string;
|
tradeId: string;
|
||||||
orderId: string;
|
orderId: string;
|
||||||
orderLinkId: string;
|
orderLinkId: string;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export interface PositionV5 {
|
|||||||
bustPrice?: string;
|
bustPrice?: string;
|
||||||
positionIM?: string;
|
positionIM?: string;
|
||||||
positionMM?: string;
|
positionMM?: string;
|
||||||
|
positionBalance?: string;
|
||||||
tpslMode?: TPSLModeV5;
|
tpslMode?: TPSLModeV5;
|
||||||
takeProfit?: string;
|
takeProfit?: string;
|
||||||
stopLoss?: string;
|
stopLoss?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user