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?

2 Likes

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.

Can I trade my demo account with my live account using the api?

Also what if I have another account with prop firm? can I trade that as well using the API?

I want to follow up more on this request. Since now TDV is partnering with APEX there is a great need for API to be eligible for use within multiple accounts. More specifically, can someone please verify that using the API that I have from my own personal account, can I associate with other demo accounts (including APEX accounts, which clearly are under my access and I have the ability to log in and trade)? Can I use that specific API that I have access to to also trigger trades on different demo accounts (including APEX accounts)? This truly will be very helpful to many. Thank you.

@kt_kt_kt did you ever figure out a way to link apex accounts with personal accounts? Doesnt seem like the Apex demo accounts can get API keys since they arent live accounts

I absolutely tried. In demo they do not activate api access and that makes it impossible, but one thing I am not aure is PA account. Once you go PA, it might be actually active, but I never got PA account, so do not know for sure. If you figure out, let me know