Trying to replicate IB's multiple accounts in quantrocket.moonshot.allocations.yml
but with multiple Alpaca accounts.
Assumed I could simply add another key using:
from quantrocket.license import set_alpaca_key
set_alpaca_key(api_key='NEW_API_KEY', trading_mode='paper')
But expected the below to return a dictionary will all API paper/live keys, not just the newest one:
from quantrocket.license import get_alpaca_key
get_alpaca_key()
# Actual
>{'paper': {'api_key': 'NEW_API_KEY'},
'live': {'api_key': 'XXX'}}
# Expected
>{'paper1': {'api_key': 'OLD_API_KEY'},
'paper2': {'api_key': 'NEW_API_KEY'},
'live': {'api_key': 'XXX'}}
I saw some talk on this topic on Alpaca's forums for multiple paper/sub-accounts as well as a Github feature request, but didn't know how to best achieve it in QR.
Thank you!