Properly placing orders via API

I setup my API and was having trouble placing orders.

After a lot of work trying to figure out what was wrong, it seems like the issue is this.

to properly place orders you will need userSpec and id.

The proper ID field is returned from the account/list command.

{'s': 200, 'i': 3.0, 'd': [{'id': __THIS_ID__, 'name': '__ACCOUNT_NAME_', 'userId': 335770, 'accountType': 'Customer', 'active': True, 'clearingHouseId': 2, 'riskCategoryId': 2, 'autoLiqProfileId': 1, 'marginAccountType': 'Speculator', 'legalStatus': 'Individual', 'archived': False, 'timestamp': '2022-02-11T16:14:14Z', 'nickname': 'XXXX'}]}

if you use the user/list endpoint you will also get back an id field

{'s': 200, 'i': 4.0, 'd': [{'id': __NOT_THIS_ID__, 'name': '__LOGIN_USERNAME__', 'timestamp': '2022-02-10T21:19:30.772Z', 'userType': 'Trader', 'email': 'email_address', 'status': 'Active', 'creationTimestamp': '2022-02-10T21:18:25.053Z', 'professional': False, 'twoFactorAuth': True}]}

It seems as though the userSpec field is totally irrelevant. Anyways I just wanted to post this since I have been having this issue for quite some time.

1 Like

Just bumping this message