Connect NT8 Connection
Ask NinjaTrader to connect to an existing broker or data-provider connection. Use its name from List NT8 Connections.
Requires an Elite subscription and a connected CrossTrade add-on. NinjaTrader must already be running. See Authentication.
Endpoint
POST https://app.crosstrade.io/v1/api/manage/nt8/connections/connect
Headers
| Name | Required | Value |
|---|---|---|
| Authorization | Yes | Bearer <your API token> |
| Content-Type | Yes | application/json |
This live command has no saved resource version. Omit If-Match; sending it returns 400 unsupported_precondition.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Configured NT8 connection name, matched without regard to case. 1 to 128 characters, without leading/trailing whitespace, control characters, ; or = |
Unknown fields and query parameters are rejected. The connection must appear in your add-on's inventory. The command uses credentials already configured in NinjaTrader.
Code examples
- Python
- cURL
import requests
resp = requests.post(
"https://app.crosstrade.io/v1/api/manage/nt8/connections/connect",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={"name": "Rithmic"},
)
print(resp.status_code, resp.json())
curl -X POST https://app.crosstrade.io/v1/api/manage/nt8/connections/connect \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Rithmic"}'
Response
{
"success": true,
"changed": true,
"data": { "name": "Rithmic", "action": "connect", "requestStatus": "acknowledged" },
"changedFields": [],
"delivery": { "status": "requested", "target": "nt8_addon" },
"warnings": [],
"meta": { "requestId": "req_9f2c1a0b7d3e4f51" }
}
200 means the add-on acknowledged the command. It does not confirm that broker login or market-data connection has finished. Poll List NT8 Connections and inspect status and priceStatus for confirmation.
Here, changed: true means acknowledgement. No saved settings changed, so changedFields is empty and the response has no ETag. The command is not queued for delivery after an add-on reconnect.
Errors
| Status | error | When |
|---|---|---|
| 400 | invalid_json, unknown_parameter, unsupported_precondition | Invalid JSON, query parameters, or an If-Match header |
| 401 | unauthorized | Missing or invalid API token |
| 403 | elite_required, not_available | See Authentication |
| 404 | connection_not_found | The name does not resolve to one configured connection |
| 409 | addon_disconnected, concurrent_modification | The add-on is offline, or another connection command is in progress |
| 415 | unsupported_content_type | The body is not UTF-8 JSON |
| 422 | validation_failed | Missing, invalid, or unknown body fields |
| 429 | rate_limited, too_many_concurrent_requests | See Rate limits |
| 503 | addon_unavailable | Inventory could not be read; no connect command was issued |
| 503 | outcome_unknown | The command was attempted without a successful acknowledgement. Read live status before retrying |
| 503 | management_unavailable, management_read_only, family_unavailable, management_busy | See Errors |
Reconnecting
Call Disconnect, poll until disconnected, then call this endpoint and poll until connected. There is no combined reconnect endpoint. Existing reconnect-action settings still apply.
Each connect request costs 2 change-budget units. Acknowledged and uncertain command attempts appear in GET Audit under family=nt8_connections.