Skip to main content

Connect NT8 Connection

Ask NinjaTrader to connect to an existing broker or data-provider connection. Use its name from List NT8 Connections.

Elite

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​

NameRequiredValue
AuthorizationYesBearer <your API token>
Content-TypeYesapplication/json

This live command has no saved resource version. Omit If-Match; sending it returns 400 unsupported_precondition.

Body parameters​

NameTypeRequiredDescription
namestringYesConfigured 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​

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())

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​

StatuserrorWhen
400invalid_json, unknown_parameter, unsupported_preconditionInvalid JSON, query parameters, or an If-Match header
401unauthorizedMissing or invalid API token
403elite_required, not_availableSee Authentication
404connection_not_foundThe name does not resolve to one configured connection
409addon_disconnected, concurrent_modificationThe add-on is offline, or another connection command is in progress
415unsupported_content_typeThe body is not UTF-8 JSON
422validation_failedMissing, invalid, or unknown body fields
429rate_limited, too_many_concurrent_requestsSee Rate limits
503addon_unavailableInventory could not be read; no connect command was issued
503outcome_unknownThe command was attempted without a successful acknowledgement. Read live status before retrying
503management_unavailable, management_read_only, family_unavailable, management_busySee 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.