Search for Contract by Id
API URL: POST https://gateway-api-demo.s2f.projectx.com/api/Contract/searchById
API Reference: /api/contract/searchbyid
Description
Search for contracts.
Parameters
Name | Type | Description | Required | Nullable |
---|---|---|---|---|
contractId | string | The id of the contract to search for. | Required | false |
Example Usage
Example Request
- cURL Request
curl -X 'POST' \
'https://gateway-api-demo.s2f.projectx.com/api/Contract/searchById' \
-H 'accept: text/plain' \
-H 'Content-Type: application/json' \
-d '{
"contractId": "CON.F.US.ENQ.H25"
}'
Example Response
- Success
- Error
{
"contracts": [
{
"id": "CON.F.US.ENQ.H25",
"name": "ENQH25",
"description": "E-mini NASDAQ-100: March 2025",
"tickSize": 0.25,
"tickValue": 5,
"activeContract": true
}
],
"success": true,
"errorCode": 0,
"errorMessage": null
}
Error: response status is 401