# Properly placing orders via API

**URL:** <https://community.tradovate.com/t/properly-placing-orders-via-api/4597>\
**Category:** API Developers\
**Created:** [May 8, 2022, 12:52pm UTC](https://community.tradovate.com/t/properly-placing-orders-via-api/4597 "2022-05-08T12:52:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![beebee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/beebee/32/1776_2.png) [@beebee](https://community.tradovate.com/u/beebee)\
**Post date:** [May 8, 2022, 12:52pm UTC](https://community.tradovate.com/t/properly-placing-orders-via-api/4597/1 "2022-05-08T12:52:34Z")

</div>

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.

```json
{'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

```json
{'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](https://community.tradovate.com/t/401-error-in-live-mode/4210).

---

<div class="post-metadata">

**Author:** ![beebee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.tradovate.com/beebee/32/1776_2.png) [@beebee](https://community.tradovate.com/u/beebee)\
**Post date:** [June 9, 2022, 6:33pm UTC](https://community.tradovate.com/t/properly-placing-orders-via-api/4597/2 "2022-06-09T18:33:19Z")

</div>

Just bumping this message
