add v5 asset rest endpoints

This commit is contained in:
tiagosiebler
2023-02-16 13:46:46 +00:00
parent 60a7aa0d9e
commit e312491968
5 changed files with 613 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ export * from './spot';
export * from './usdt-perp';
export * from './unified-margin';
export * from './v5-account';
export * from './v5-asset';
export * from './v5-market';
export * from './v5-position';
export * from './v5-trade';

View File

@@ -0,0 +1,148 @@
import { AccountTypeV5, OrderSideV5 } from '../v5-shared';
export interface CoinExchangeRecordV5 {
fromCoin: string;
fromAmount: string;
toCoin: string;
toAmount: string;
exchangeRate: string;
createdTime: string;
exchangeTxId: string;
}
export interface DeliveryRecordV5 {
deliveryTime: number;
symbol: string;
side: OrderSideV5;
position: string;
deliveryPrice: string;
strike: string;
fee: string;
deliveryRpl: string;
}
export interface SettlementRecordV5 {
symbol: string;
side: string;
size: number;
sessionAvgPrice: string;
markPrice: string;
realisedPnl: string;
createdTime: string;
}
export interface AssetInfoAssetV5 {
coin: string;
frozen: string;
free: string;
withdraw: string;
}
export interface AssetInfoV5 {
status: 'ACCOUNT_STATUS_NORMAL' | 'ACCOUNT_STATUS_UNSPECIFIED';
assets: AssetInfoAssetV5[];
}
export interface CoinBalanceV5 {
coin: string;
walletBalance: string;
transferBalance: string;
bonus?: string;
}
export interface AllCoinsBalanceV5 {
accountType: AccountTypeV5;
memberId?: string;
balance: CoinBalanceV5[];
}
export interface AccountCoinBalanceV5 {
accountType: AccountTypeV5;
bizType: number;
accountId: string;
memberId: string;
balance: {
coin: string;
walletBalance: string;
transferBalance: string;
bonus: string;
};
}
export interface InternalTransferRecordV5 {
transferId: string;
coin: string;
amount: string;
fromAccountType: AccountTypeV5;
toAccountType: AccountTypeV5;
timestamp: string;
status: string;
}
export interface AllowedDepositCoinInfoV5 {
coin: string;
chain: string;
coinShowName: string;
chainType: string;
blockConfirmNumber: number;
minDepositAmount: string;
}
export interface DepositRecordV5 {
coin: string;
chain: string;
amount: string;
txID: string;
status: number;
toAddress: string;
tag: string;
depositFee: string;
successAt: string;
confirmations: string;
txIndex: string;
blockHash: string;
}
export interface DepositAddressChainV5 {
chainType: string;
addressDeposit: string;
tagDeposit: string;
chain: string;
}
export interface DepositAddressResultV5 {
coin: string;
chains: DepositAddressChainV5[];
}
export interface CoinInfoV5 {
name: number;
coin: string;
remainAmount: string;
chains: {
chain: string;
chainType: string;
confirmation: string;
withdrawFee: string;
depositMin: string;
withdrawMin: string;
minAccuracy: string;
chainDeposit: string;
chainWithdraw: string;
}[];
}
export interface WithdrawalRecordV5 {
withdrawId: string;
txID: string;
withdrawType: string;
coin: string;
chain: string;
amount: string;
withdrawFee: string;
status: string;
toAddress: string;
tag: string;
createTime: string;
updateTime: string;
}