Placing Your First Order
This documentation outlines the process for placing your first order using our API. To successfully execute an order, you must have an active trading account associated with your user. Follow the steps below to retrieve your account details, browse available contracts, and place your order.
Step 1
To initiate the order process, you must first retrieve a list of active accounts linked to your user. This step is essential for confirming your account status before placing an order.
API URL: POST https://gateway-api-demo.s2f.projectx.com/api/Account/search
API Reference: /api/Account/search
- Request
- Response
- cURL Request
{
"onlyActiveAccounts": true
}
{
"accounts": [
{
"id": 1,
"name": "TEST_ACCOUNT_1",
"canTrade": true,
"isVisible": true
}
],
"success": true,
"errorCode": 0,
"errorMessage": null
}
curl -X 'POST' \
'https://gateway-api-demo.s2f.projectx.com/api/Account/search' \
-H 'accept: text/plain' \
-H 'Content-Type: application/json' \
-d '{
"onlyActiveAccounts": true
}'