Account client¶
- class lime_trader.clients.account_client.AccountClient(api_client: AuthenticatedApiClient, logger: Logger)[source]¶
Contains methods related to account data
- get_balances() list[AccountDetails] [source]¶
Gets balance information for all user accounts as a list
- Returns:
List of all user accounts with balance information
- get_positions(account_number: str, date: date | None = None, strategy: bool | None = None) list[AccountPosition] [source]¶
Gets account positions for specified date, or today if date is not supplied
- Parameters:
account_number – Account number
date – Date for account positions. If set, returns incoming positions for specified date. If not specified, the method returns current intraday positions
strategy – Optional. If true, returns current intraday positions grouped by multi-leg strategies. Doesn’t work together with date parameter
- Returns:
Account positions for specified date, or current intraday positions if date is not supplied
- get_routes(account_number: str) list[Route] [source]¶
Gets a list of all routes available for specified account
- Parameters:
account_number – Account number
- Returns:
List of all routes available for specified account
- get_trades(account_number: str, date: date, page: PageRequest) Page[AccountTrade] [source]¶
Gets the trades history on the specified account, ordered by descending timestamp.
- Parameters:
account_number – Account number
date – Date for which to get trades
page – Pagination parameters
- Returns:
Page of account trades for the specified date
- get_transactions_journal(account_number: str, start_date: date | None, end_date: date | None, page: PageRequest) Page[AccountTransaction] [source]¶
Gets list of transactions and a counter of total transactions in the specified time period
- Parameters:
account_number – Account number
start_date – The period start date. Optional
end_date – The period end date. Optional, current date by default
page – Pagination parameters
- Returns:
Page of account transactions for specified date period