aluna-crypto / alunajs

Standardizing Crypto Trading APIs across multiple exchanges.
MIT License
0 stars 0 forks source link

Exchanges - Implement Missing Wallets #90

Open arboleya opened 2 years ago

arboleya commented 2 years ago

Intro

We need to consider balances from all wallets, on the balance.list method. The method should return all balances combined in a single list, as it already does — the only difference is that it must include all wallets of a given exchange.

It doesn't matter if we don't support the related account type; we still want to gather balances from all available sources.

Exchanges

Please, review and implement this for all exchanges.

Implementation order:

TODO

We also need to update all exchange's READMEs — add a new table after "Features".

If a given Wallet doesn't connect to any account, we simply use a hyphen for the account column.

See example below:

readme

arboleya commented 2 years ago

So, @Torres-ssf brought up that some exchanges have what could be considered sub-wallets, f.e. multiple wallets for [multiple] derivatives account types and sub-types.

In this case, perhaps we could start prefixing instead of sub-typing?

It requires further examination, but here's a first thought:

export enum AlunaWalletEnum {
  SPOT = 'spot',
  MARGIN = 'margin',
  DERIVATIVES = 'derivatives',
  DERIVATIVES_COIN_M = 'derivatives-coin-m'', // <———————— here
  DERIVATIVES_USD_M = 'derivatives-usd-m'', // <———————— here
  FUNDING = 'funding',
  TRADING = 'trading',
  DEFAULT = 'default',
  WEB3 = 'web3',
}