Profile ID's and account balances

So I’ve been experimenting with multiple profiles and I seem to be having an issue getting my account balances for the second profile. When I request the /accounts endpoint with the new profile ID it returns the default profile’s accounts. Anyone know what I’m missing here? Is this the wrong endpoint I’m querying? Or is the ?profile_id= the wrong parameter?

Hi @cleggink - Are you re-using the same API key for the second portfolio? Please see this Profiles

You know I did consider that. But when I created the new profile on the pro website there was no options to create a new api key in the dialog so I assumed that they could be reused, mainly because the rate limiting documents say that requests on private endpoints are limited by profile id and with no mention of api key. Now maybe I shouldn’t have assumed that. The issue I’m attempting to work around is the amount of currencies I can effectively watch and trade without bumping into rate limiting, currently at 12, 15 created an issue and I had to remove a few from my list. So I’m branching off a new set of threads with a new profile id, and apparently I need a new api key to go with it. Thanks for the clarity @arood.

One last thing. If I where to set this new api key attached to the default profile, in order to use the same account set, would this cause a problem with rate limiting or is it necessary to split up the funding just to avoid a rate limit error?

So I ran a test on that and it seems that yes the profile id for a new api key attached to the default profile will give the same profile uuid code and user id. Now the question remains, does this effect rate limits as the api keys are different but the profile id is not? I’m assuming that, according to the documentation at lest, that the answer is yes it will trigger a rate limit but I would appreciate someone else’s opinion on the subject @arood maybe? Since it’s really only you I talk to on a regular basis here, well that and myself apparently.

@cleggink ; See if any of your calls use public views as I assume rate limiting does not apply to public views, only private or authenticated endpoints.

It’s not the public endpoints that are the problem, thou they are rate limited by ip address. Bursts of orders, fills, and accounts endpoints when too many threads trigger too closely. I’ve noticed a lot of similar patterns in the currencies I’ve been watching so I’ll get several triggers occurring simultaneously.