Make config acounts loading more explicit.

fsp_feeds
Tyler Goodlet 2021-09-05 15:13:35 -04:00
parent c86c4218ce
commit c26161ed7e
1 changed files with 4 additions and 1 deletions

View File

@ -511,11 +511,14 @@ async def open_order_mode(
lines = LineEditor(chart=chart) lines = LineEditor(chart=chart)
arrows = ArrowEditor(chart, {}) arrows = ArrowEditor(chart, {})
# load account names from ``brokers.toml``
accounts = bidict(brokers.config.load_accounts())
# allocator # allocator
alloc = Allocator( alloc = Allocator(
symbol=symbol, symbol=symbol,
account=None, # select paper by default account=None, # select paper by default
_accounts=bidict(brokers.config.load_accounts()), _accounts=accounts,
size_unit=_size_units['currency'], size_unit=_size_units['currency'],
units_limit=400, units_limit=400,
currency_limit=5e3, currency_limit=5e3,