Connecting API to Sub Accounts

I am trying to connect to a couple different demo sub accounts but the API does not differentiate between the accounts. Is this the correct way to trade the same contract with different strategies, and if so, how do you connect to sub accounts ensuring separation between the strategies/API’s/Accounts?

1 Like

I also have this question—do we have to sign up for multiple API Keys? Or does one key work for all accounts

I have a database that stores al my acct info. when it is needed I authenticate the account that I need. I would have to see a bit more of how you are implementing it to see the problem.

Im pretty sure you get 1 api key per account right? and if you want more connections you can make new connections. that way multiple people can use the same account with different permission levels. I believe that’s how its setup, I would have to double check.

You can trade multiple accounts with the same API key, as long as you have ownership or trade permission over the accounts. The API Key is associated with your user on creation, and users may have a 1-to-many relationship with accounts. Make sure you don’t share/leak your app secret or credentials (users stashing code on github, this is for you, don’t leave your API Key info in your commits), and if you are worried create a dedicated password to protect your real credentials.