AlgoTraderAlgoTrader Documentation
AlgoTrader provides Account Data Service for the following adapters:
Interactive Brokers via Native API
Binance via Binance API
Bitfinex via Bitfinex API
Bitflyer via Bitflyer API
BitMEX via BitMEX API
Bitstamp via Bitstamp API
Coinigy via Coinigy API
The AccountService
interface defines a method for retrieving
account balances for the specified account ID. A list of
NamedCurrencyAmountVO
items is returned. The
retrieveAccountBalances
method can be called from the
strategy like this:
List<NamedCurrencyAmountVO> balances = getAccountService().retrieveAccountBalances(accountId);
The AccountService
interface also defines a method for the
initiation of crypto withdrawals for crypto exchanges. The
withdraw
method can be called from the strategy like
this:
WithdrawStatusVO status = getAccountService().withdraw(accountId, currency, amount, withdrawContext);
The withdrawContext
parameter contains additional information
that might be required by certain exchanges (e.g. address
and/or
paymentId
). The method returns a
WithdrawStatusVO
which contains information like
message
and externalId
.
Depending on the Account Data Adapter in use the corresponding
account
profile has to be specified via VM
argument.
InteractiveBrokers:
-Dspring.profiles.active=iBAccount
Coinigy:
-Dspring.profiles.active=cNGAccount
Bitfinex:
-Dspring.profiles.active=bFXAccount
Bitflyer:
-Dspring.profiles.active=bFLAccount
Bitstamp:
-Dspring.profiles.active=bTSAccount
Binance:
-Dspring.profiles.active=bNCAccount
BitMEX:
-Dspring.profiles.active=bMXAccount