Trouble placing orders via API

I am trying to place an order using a python script with the help of the REST API and this is what my request body looks like

{“accountSpec”: “”, “accountId”: ID, “action”: “Buy”, “symbol”: “@NQ”, “orderQty”: 1, “orderType”: “Market”, “isAutomated”: true}

I am getting the following error

{‘failureReason’: ‘UnknownReason’, ‘failureText’: ‘This contract are not available for trading.’}

While looking into this problem, I found that somehow this contract’s (@NQ) status is “locked”. Is that the reason that my order is not getting placed? (To view the contract information, I have used ‘’)

Any suggested work around for the above issue?

The @ designation means the contract is continuous. Continuous contracts are not tradeable and amalgamate data from the monthly/quarterly contracts. To trade NQ, you’d need to choose an expiration month. The current nearest expiration is for NQU2, so you’d need to use that symbol to find the actual tradeable contract.

1 Like