Type: Vaults
VaultItem
This type represents a vault. It is composed by type VaultAccount
.
type VaultItem = {
id: string;
name: string;
accounts: VaultAccount[];
image: string;
isActive?: boolean;
};
VaultAccount
This type represents a vault account. It is composed by types ApiPermissions
and
AccountSettings
.
type VaultAccount = {
status: "online" | "offline" | "notGood";
accountName: string;
exchangeId: string;
permissions: ApiPermissions[];
settings?: AccountSettings;
};
ApiPermissions
This enum represents the CEX account permissions.
enum ApiPermissions {
READ = "read", // can retrieve account data, like balances, transactions, etc.
TRADE = "trade", // can post orders
WITHDRAW = "withdraw", // can withdraw funds
}
AccountSettings
This type represents an account settings. It is composed by type PortfolioToken
.
type AccountSettings {
hiddenTokens: PortfolioToken[];
}
PortfolioToken
This type represents a portfolio token. It is composed by type PortfolioTokenByAccount
.
type PortfolioToken = {
tokenSymbol: string;
totalBalance: number;
refTotalBalance: number;
freeBalance: number;
refFreeBalance: number;
balancesByAccount: PortfolioTokenByAccount[];
};
PortfolioTokenByAccount
This type represents a portfolio token by account.
type PortfolioTokenByAccount = {
accountName: string;
totalBalance: number;
refTotalBalance: number;
freeBalance: number;
refFreeBalance: number;
exchangeId: string;
};