Merge pull request #419 from JJ-Cro/wsapi
feat(): added/updated types with latest documentation changes
This commit is contained in:
@@ -170,7 +170,6 @@ import {
|
||||
SpotBorrowCheckResultV5,
|
||||
SpotLeveragedTokenOrderHistoryV5,
|
||||
SpotMarginStateV5,
|
||||
SubAccountAllApiKeysResultV5,
|
||||
SubMemberV5,
|
||||
SwitchIsolatedMarginParamsV5,
|
||||
SwitchPositionModeParamsV5,
|
||||
@@ -191,6 +190,7 @@ import {
|
||||
VipCollateralCoinsV5,
|
||||
WalletBalanceV5,
|
||||
WithdrawParamsV5,
|
||||
WithdrawableAmountV5,
|
||||
WithdrawalRecordV5,
|
||||
} from './types';
|
||||
|
||||
@@ -551,7 +551,9 @@ export class RestClientV5 extends BaseRestClient {
|
||||
|
||||
cancelAllOrders(
|
||||
params: CancelAllOrdersParamsV5,
|
||||
): Promise<APIResponseV3WithTime<{ list: OrderResultV5[] }>> {
|
||||
): Promise<
|
||||
APIResponseV3WithTime<{ list: OrderResultV5[]; success: string }>
|
||||
> {
|
||||
return this.postPrivate('/v5/order/cancel-all', params);
|
||||
}
|
||||
|
||||
@@ -566,6 +568,18 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.getPrivate('/v5/order/history', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query users' execution records, sorted by execTime in descending order
|
||||
*
|
||||
* Unified account covers: Spot / Linear contract / Options
|
||||
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
|
||||
*/
|
||||
getExecutionList(
|
||||
params: GetExecutionListParamsV5,
|
||||
): Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[]>>> {
|
||||
return this.getPrivate('/v5/execution/list', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint allows you to place more than one order in a single request.
|
||||
* Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)
|
||||
@@ -675,7 +689,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
* Only for institutional clients!
|
||||
*/
|
||||
setDisconnectCancelAllWindowV2(params: {
|
||||
product: 'OPTION' | 'SPOT' | 'DERIVATIVES';
|
||||
product?: 'OPTION' | 'SPOT' | 'DERIVATIVES';
|
||||
timeWindow: number;
|
||||
}): Promise<APIResponseV3<undefined>> {
|
||||
return this.postPrivate('/v5/order/disconnected-cancel-all', params);
|
||||
@@ -733,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.
|
||||
@@ -761,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.
|
||||
*
|
||||
@@ -811,18 +827,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.postPrivate('/v5/position/add-margin', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query users' execution records, sorted by execTime in descending order
|
||||
*
|
||||
* Unified account covers: Spot / Linear contract / Options
|
||||
* Normal account covers: USDT perpetual / Inverse perpetual / Inverse futures
|
||||
*/
|
||||
getExecutionList(
|
||||
params: GetExecutionListParamsV5,
|
||||
): Promise<APIResponseV3WithTime<CategoryCursorListV5<ExecutionV5[]>>> {
|
||||
return this.getPrivate('/v5/execution/list', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query user's closed profit and loss records. The results are sorted by createdTime in descending order.
|
||||
*
|
||||
@@ -1099,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.
|
||||
*/
|
||||
@@ -1183,39 +1200,12 @@ 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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Query the coin exchange records.
|
||||
*
|
||||
* CAUTION: You may experience long delays with this endpoint.
|
||||
*/
|
||||
getCoinExchangeRecords(params?: GetCoinExchangeRecordParamsV5): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
orderBody: CoinExchangeRecordV5[];
|
||||
nextPageCursor?: string;
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/asset/exchange/order-record', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query option delivery records, sorted by deliveryTime in descending order.
|
||||
*
|
||||
@@ -1240,6 +1230,46 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.getPrivate('/v5/asset/settlement-record', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the coin exchange records.
|
||||
*
|
||||
* CAUTION: You may experience long delays with this endpoint.
|
||||
*/
|
||||
getCoinExchangeRecords(params?: GetCoinExchangeRecordParamsV5): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
orderBody: CoinExchangeRecordV5[];
|
||||
nextPageCursor?: string;
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/asset/exchange/order-record', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query coin information, including chain information, withdraw and deposit status.
|
||||
*/
|
||||
getCoinInfo(
|
||||
coin?: string,
|
||||
): Promise<APIResponseV3WithTime<{ rows: CoinInfoV5[] }>> {
|
||||
return this.getPrivate(
|
||||
'/v5/asset/coin/query-info',
|
||||
coin ? { coin } : undefined,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the sub UIDs under a main UID
|
||||
*
|
||||
* CAUTION: Can query by the master UID's api key only
|
||||
*/
|
||||
getSubUID(): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
subMemberIds: string[];
|
||||
transferableSubMemberIds: string[];
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/asset/transfer/query-sub-member-list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Query asset information.
|
||||
*
|
||||
@@ -1280,6 +1310,15 @@ export class RestClientV5 extends BaseRestClient {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query withdrawable amount.
|
||||
*/
|
||||
getWithdrawableAmount(params: {
|
||||
coin: string;
|
||||
}): Promise<APIResponseV3<{ rows: WithdrawableAmountV5[] }>> {
|
||||
return this.getPrivate('/v5/asset/withdraw/withdrawable-amount', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the transferable coin list between each account type.
|
||||
*/
|
||||
@@ -1327,20 +1366,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the sub UIDs under a main UID
|
||||
*
|
||||
* CAUTION: Can query by the master UID's api key only
|
||||
*/
|
||||
getSubUID(): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
subMemberIds: string[];
|
||||
transferableSubMemberIds: string[];
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/asset/transfer/query-sub-member-list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable Universal Transfer for Sub UID
|
||||
*
|
||||
@@ -1396,7 +1421,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
nextPageCursor: string;
|
||||
}>
|
||||
> {
|
||||
return this.get('/v5/asset/deposit/query-allowed-list', params);
|
||||
return this.getPrivate('/v5/asset/deposit/query-allowed-list', params);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1497,6 +1522,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - duplicate function, use getSubDepositAddress() instead
|
||||
* Query the deposit address information of SUB account.
|
||||
* @deprecated Duplicate endpoint - Use getSubDepositAddress() instead
|
||||
*
|
||||
@@ -1520,18 +1546,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Query coin information, including chain information, withdraw and deposit status.
|
||||
*/
|
||||
getCoinInfo(
|
||||
coin?: string,
|
||||
): Promise<APIResponseV3WithTime<{ rows: CoinInfoV5[] }>> {
|
||||
return this.getPrivate(
|
||||
'/v5/asset/coin/query-info',
|
||||
coin ? { coin } : undefined,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query withdrawal records.
|
||||
*/
|
||||
@@ -1541,15 +1555,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.getPrivate('/v5/asset/withdraw/query-record', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query withdrawable amount.
|
||||
*/
|
||||
getWithdrawableAmount(params: {
|
||||
coin: string;
|
||||
}): Promise<APIResponseV3<{ rows: WithdrawalRecordV5[] }>> {
|
||||
return this.getPrivate('/v5/asset/withdraw/withdrawable-amount', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Exchange Entity List.
|
||||
*
|
||||
@@ -1621,7 +1626,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
* Query the exchange result by sending quoteTxId.
|
||||
*/
|
||||
getConvertStatus(params: {
|
||||
quoteTxId?: string;
|
||||
quoteTxId: string;
|
||||
accountType:
|
||||
| 'eb_convert_funding'
|
||||
| 'eb_convert_uta'
|
||||
@@ -1701,15 +1706,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.getPrivate('/v5/user/submembers', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query all api keys information of a sub UID.
|
||||
*/
|
||||
getSubAccountAllApiKeys(
|
||||
params: GetSubAccountAllApiKeysParamsV5,
|
||||
): Promise<APIResponseV3WithTime<SubAccountAllApiKeysResultV5>> {
|
||||
return this.getPrivate('/v5/user/sub-apikeys', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Froze sub uid. Use master user's api key only.
|
||||
*
|
||||
@@ -1733,6 +1729,18 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.getPrivate('/v5/user/query-api');
|
||||
}
|
||||
|
||||
/**
|
||||
* Query all api keys information of a sub UID.
|
||||
*/
|
||||
getSubAccountAllApiKeys(params: GetSubAccountAllApiKeysParamsV5): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
result: ApiKeyInfoV5[];
|
||||
nextPageCursor: string;
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/user/sub-apikeys', params);
|
||||
}
|
||||
|
||||
getUIDWalletType(params: { memberIds: string }): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
accounts: {
|
||||
@@ -1741,7 +1749,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
}[];
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/user/query-api', params);
|
||||
return this.getPrivate('/v5/user/get-member-type', params);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1770,6 +1778,19 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.postPrivate('/v5/user/update-sub-api', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a sub UID. Before deleting the UID, please make sure there are no assets.
|
||||
*
|
||||
* TIP:
|
||||
* The API key must have one of the permissions to be allowed to call the following API endpoint.
|
||||
* - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
||||
*/
|
||||
deleteSubMember(
|
||||
params: DeleteSubMemberParamsV5,
|
||||
): Promise<APIResponseV3WithTime<{}>> {
|
||||
return this.postPrivate('/v5/user/del-submember', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the api key of master account. Use the api key pending to be delete to call the endpoint. Use master user's api key only.
|
||||
*
|
||||
@@ -1799,19 +1820,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.postPrivate('/v5/user/delete-sub-api', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a sub UID. Before deleting the UID, please make sure there are no assets.
|
||||
*
|
||||
* TIP:
|
||||
* The API key must have one of the permissions to be allowed to call the following API endpoint.
|
||||
* - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
||||
*/
|
||||
deleteSubMember(
|
||||
params: DeleteSubMemberParamsV5,
|
||||
): Promise<APIResponseV3WithTime<{}>> {
|
||||
return this.postPrivate('/v5/user/del-submember', params);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
****** Affiliate APIs
|
||||
|
||||
@@ -20,6 +20,8 @@ export interface GetDeliveryRecordParamsV5 {
|
||||
export interface GetSettlementRecordParamsV5 {
|
||||
category: CategoryV5;
|
||||
symbol?: string;
|
||||
startTime?: number;
|
||||
endTime?: number;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
@@ -102,6 +104,7 @@ export interface GetSubAccountDepositRecordParamsV5 {
|
||||
}
|
||||
|
||||
export interface GetInternalDepositRecordParamsV5 {
|
||||
txID?: string;
|
||||
startTime?: number;
|
||||
endTime?: number;
|
||||
coin?: string;
|
||||
@@ -111,6 +114,7 @@ export interface GetInternalDepositRecordParamsV5 {
|
||||
|
||||
export interface GetWithdrawalRecordsParamsV5 {
|
||||
withdrawID?: string;
|
||||
txID?: string;
|
||||
coin?: string;
|
||||
withdrawType?: number;
|
||||
startTime?: number;
|
||||
@@ -131,7 +135,7 @@ export interface WithdrawParamsV5 {
|
||||
feeType?: 0 | 1;
|
||||
requestId?: string;
|
||||
beneficiary?: {
|
||||
vaspEntityId: string;
|
||||
vaspEntityId?: string;
|
||||
beneficiaryName?: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ export interface GetInsuranceParamsV5 {
|
||||
export interface GetRiskLimitParamsV5 {
|
||||
category?: 'linear' | 'inverse';
|
||||
symbol?: string;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface GetOptionDeliveryPriceParamsV5 {
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
OrderTriggerByV5,
|
||||
OrderTypeV5,
|
||||
PositionIdx,
|
||||
StopOrderTypeV5,
|
||||
} from '../shared-v5';
|
||||
|
||||
export interface OrderParamsV5 {
|
||||
@@ -51,6 +52,7 @@ export interface AmendOrderParamsV5 {
|
||||
triggerPrice?: string;
|
||||
qty?: string;
|
||||
price?: string;
|
||||
tpslMode?: 'Full' | 'Partial';
|
||||
takeProfit?: string;
|
||||
stopLoss?: string;
|
||||
tpTriggerBy?: OrderTriggerByV5;
|
||||
@@ -86,6 +88,7 @@ export interface GetAccountHistoricOrdersParamsV5 {
|
||||
category: CategoryV5;
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
settleCoin?: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
orderFilter?: OrderFilterV5;
|
||||
@@ -102,11 +105,13 @@ export interface CancelAllOrdersParamsV5 {
|
||||
baseCoin?: string;
|
||||
settleCoin?: string;
|
||||
orderFilter?: OrderFilterV5;
|
||||
stopOrderType?: StopOrderTypeV5;
|
||||
}
|
||||
|
||||
export interface BatchOrderParamsV5 {
|
||||
symbol: string;
|
||||
side: OrderSideV5;
|
||||
isLeverage?: 0 | 1;
|
||||
orderType: OrderTypeV5;
|
||||
qty: string;
|
||||
price?: string;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -66,6 +66,8 @@ export interface AccountCoinBalanceV5 {
|
||||
walletBalance: string;
|
||||
transferBalance: string;
|
||||
bonus: string;
|
||||
transferSafeAmount: string;
|
||||
ltvTransferSafeAmount: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -113,6 +115,9 @@ export interface DepositRecordV5 {
|
||||
confirmations: string;
|
||||
txIndex: string;
|
||||
blockHash: string;
|
||||
batchReleaseLimit: string;
|
||||
depositType: string;
|
||||
fromAddress: string;
|
||||
}
|
||||
|
||||
export interface InternalDepositRecordV5 {
|
||||
@@ -123,6 +128,7 @@ export interface InternalDepositRecordV5 {
|
||||
status: 1 | 2 | 3;
|
||||
address: string;
|
||||
createdTime: string;
|
||||
txID: string;
|
||||
}
|
||||
|
||||
export interface DepositAddressChainV5 {
|
||||
@@ -130,6 +136,8 @@ export interface DepositAddressChainV5 {
|
||||
addressDeposit: string;
|
||||
tagDeposit: string;
|
||||
chain: string;
|
||||
batchReleaseLimit: string;
|
||||
contractAddress: string;
|
||||
}
|
||||
|
||||
export interface DepositAddressResultV5 {
|
||||
@@ -151,6 +159,8 @@ export interface CoinInfoV5 {
|
||||
minAccuracy: string;
|
||||
chainDeposit: string;
|
||||
chainWithdraw: string;
|
||||
withdrawPercentageFee: string;
|
||||
contractAddress: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
@@ -169,6 +179,22 @@ export interface WithdrawalRecordV5 {
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
export interface WithdrawableAmountV5 {
|
||||
limitAmountUsd: string;
|
||||
withdrawableAmount: {
|
||||
SPOT: {
|
||||
coin: string;
|
||||
withdrawableAmount: string;
|
||||
availableBalance: string;
|
||||
};
|
||||
FUND: {
|
||||
coin: string;
|
||||
withdrawableAmount: string;
|
||||
availableBalance: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface VaspEntityV5 {
|
||||
vaspEntityId: string;
|
||||
vaspName: string;
|
||||
@@ -220,7 +246,7 @@ export interface ConvertStatusV5 {
|
||||
fromAmount: string;
|
||||
toAmount: string;
|
||||
exchangeStatus: 'init' | 'processing' | 'success' | 'failure';
|
||||
extInfo: object;
|
||||
extInfo: { paramType: string; paramValue: string };
|
||||
convertRate: string;
|
||||
createdAt: string;
|
||||
}
|
||||
@@ -236,7 +262,7 @@ export interface ConvertHistoryRecordV5 {
|
||||
fromAmount: string;
|
||||
toAmount: string;
|
||||
exchangeStatus: 'init' | 'processing' | 'success' | 'failure';
|
||||
extInfo: object;
|
||||
extInfo: { paramType: string; paramValue: string };
|
||||
convertRate: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export interface CollateralCoinV5 {
|
||||
collateralAccuracy: number;
|
||||
currency: string;
|
||||
initialLTV: string;
|
||||
liquidationLTV: string;
|
||||
marginCallLTV: string;
|
||||
|
||||
@@ -163,6 +163,8 @@ export interface OrderbookResponseV5 {
|
||||
a: OrderbookLevelV5[];
|
||||
ts: number;
|
||||
u: number;
|
||||
seq: number;
|
||||
cts: number;
|
||||
}
|
||||
|
||||
export interface TickerLinearInverseV5 {
|
||||
@@ -192,6 +194,7 @@ export interface TickerLinearInverseV5 {
|
||||
preOpenPrice: string;
|
||||
preQty: string;
|
||||
curPreListingPhase: string;
|
||||
basis: string;
|
||||
}
|
||||
|
||||
export interface TickerOptionV5 {
|
||||
@@ -252,6 +255,10 @@ export interface PublicTradeV5 {
|
||||
side: OrderSideV5;
|
||||
time: string;
|
||||
isBlockTrade: boolean;
|
||||
mP?: string;
|
||||
iP?: string;
|
||||
mIv?: string;
|
||||
iv?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,6 +286,7 @@ export interface HistoricalVolatilityV5 {
|
||||
|
||||
export interface InsuranceDataV5 {
|
||||
coin: string;
|
||||
symbols: string;
|
||||
balance: string;
|
||||
value: string;
|
||||
}
|
||||
@@ -299,6 +307,7 @@ export interface RiskLimitV5 {
|
||||
isLowestRisk: 0 | 1;
|
||||
maxLeverage: string;
|
||||
mmDeduction: string;
|
||||
nextPageCursor?: string;
|
||||
}
|
||||
|
||||
/** @deprecated use DeliveryPriceV5 instead */
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface PositionV5 {
|
||||
bustPrice?: string;
|
||||
positionIM?: string;
|
||||
positionMM?: string;
|
||||
positionBalance?: string;
|
||||
tpslMode?: TPSLModeV5;
|
||||
takeProfit?: string;
|
||||
stopLoss?: string;
|
||||
@@ -108,6 +109,7 @@ export interface ExecutionV5 {
|
||||
underlyingPrice?: string;
|
||||
blockTradeId?: string;
|
||||
closedSize?: string;
|
||||
seq: number;
|
||||
}
|
||||
|
||||
export interface ClosedPnLV5 {
|
||||
|
||||
@@ -107,5 +107,7 @@ export interface SpotBorrowCheckResultV5 {
|
||||
side: OrderSideV5;
|
||||
maxTradeQty: string;
|
||||
maxTradeAmount: string;
|
||||
spotMaxTradeQty: string;
|
||||
spotMaxTradeAmount: string;
|
||||
borrowCoin: string;
|
||||
}
|
||||
|
||||
@@ -27,26 +27,44 @@ export interface SubMemberV5 {
|
||||
}
|
||||
export type ApiKeyType = 1 | 2;
|
||||
|
||||
export interface ApiKeyPermissionsV5 {
|
||||
ContractTrade: string[];
|
||||
Spot: string[];
|
||||
Wallet: string[];
|
||||
Options: string[];
|
||||
Derivatives: string[];
|
||||
CopyTrading: string[];
|
||||
BlockTrade: string[];
|
||||
Exchange: string[];
|
||||
NFT: string[];
|
||||
Affiliate: string[];
|
||||
}
|
||||
|
||||
export interface ApiKeyInfoV5 {
|
||||
id: string;
|
||||
note: string;
|
||||
apiKey: string;
|
||||
readOnly: 0 | 1;
|
||||
secret: string;
|
||||
permissions: PermissionsV5;
|
||||
ips?: string[];
|
||||
type: ApiKeyType;
|
||||
deadlineDay?: number;
|
||||
expiredAt?: string;
|
||||
permissions: ApiKeyPermissionsV5;
|
||||
ips: string[];
|
||||
type: 1 | 2; // 1: personal, 2: connected to third-party app
|
||||
deadlineDay: number;
|
||||
expiredAt: string;
|
||||
createdAt: string;
|
||||
unified: 0 | 1;
|
||||
uta: 0 | 1;
|
||||
/** @deprecated */
|
||||
unified: number;
|
||||
uta: 0 | 1; // 0: regular account, 1: unified trade account
|
||||
userID: number;
|
||||
inviterID: number;
|
||||
vipLevel?: string;
|
||||
mktMakerLevel?: string;
|
||||
affiliateID?: number;
|
||||
vipLevel: string;
|
||||
mktMakerLevel: string;
|
||||
affiliateID: number;
|
||||
rsaPublicKey: string;
|
||||
isMaster: boolean;
|
||||
parentUid: string;
|
||||
kycLevel: 'LEVEL_DEFAULT' | 'LEVEL_1' | 'LEVEL_2';
|
||||
kycRegion: string;
|
||||
}
|
||||
|
||||
export interface UpdateApiKeyResultV5 {
|
||||
|
||||
@@ -142,7 +142,10 @@ export type StopOrderTypeV5 =
|
||||
| 'Stop'
|
||||
| 'PartialTakeProfit'
|
||||
| 'PartialStopLoss'
|
||||
| 'tpslOrder';
|
||||
| 'tpslOrder'
|
||||
| 'OcoOrder'
|
||||
| 'MmRateClose'
|
||||
| 'BidirectionalTpslOrder';
|
||||
|
||||
/**
|
||||
* Position index. Used to identify positions in different position modes.
|
||||
|
||||
Reference in New Issue
Block a user