Connection settings fields
Returned by GET Connection Settings. Every field is writable with PATCH Connection Settings except opposingPositionProtection.relatedProductsSource.
| Field | Type | Access | Constraints | Description |
|---|---|---|---|---|
autoReconnect | array of objects | W | At most 50, one per connection | Reconnect a NinjaTrader connection automatically when it drops |
autoReconnect[].connection | string | W | 1 to 128 characters, unique. A name you add must be one of your NinjaTrader connections | Connection name as shown in NinjaTrader |
autoReconnect[].enabled | boolean | W | Turn auto-reconnect on for this connection | |
autoReconnect[].timeoutSeconds | integer | W | 10 to 3600 | Seconds to wait before reconnecting |
dataWatchdog | array of objects | W | At most 50, one per connection | Reconnect when a connection stops sending market data |
dataWatchdog[].connection | string | W | 1 to 128 characters, unique. A name you add must be one of your NinjaTrader connections | Connection name as shown in NinjaTrader |
dataWatchdog[].enabled | boolean | W | Turn the data watchdog on for this connection | |
dataWatchdog[].timeoutSeconds | integer | W | 10 to 3600 | Seconds without data before it acts |
reconnectActions | object | W | What the add-on does after a reconnect | |
reconnectActions.restartStrategies | boolean | W | Restart the strategies that were running before the disconnect | |
reconnectActions.flatten | object | W | Add-on v1.13 or newer | Flatten accounts after a reconnect |
reconnectActions.flatten.scope | none, all, strategy_accounts or specific | W | none: never. all: every account. strategy_accounts: accounts that were running strategies. specific: the accounts listed below | |
reconnectActions.flatten.accounts | array of account names | W | At most 200, unique. Required when scope is specific, empty otherwise. An account you add must be one of your NinjaTrader accounts | Accounts to flatten |
opposingPositionProtection | object | W | Block an order that would open a position opposite to one you hold in a related product | |
opposingPositionProtection.enabled | boolean | W | Turn the protection on | |
opposingPositionProtection.checkAllAccounts | boolean | W | Compare positions across all your accounts, not just the order's account | |
opposingPositionProtection.relatedProducts | array of [SYMBOL, SYMBOL] pairs, or the string "default" when writing | W | At most 200 pairs. Symbols are 1 to 10 uppercase letters or digits; the two in a pair differ | Products treated as related (for example ["ES", "MES"]). Writing "default" saves the current CrossTrade default list |
opposingPositionProtection.relatedProductsSource | default or custom | R | default when the saved list is a CrossTrade default list | |
opposingPositionProtection.groups | array of objects | W | At most 50, names unique | Account groups checked together |
opposingPositionProtection.groups[].name | string | W | 1 to 64 characters | Group name |
opposingPositionProtection.groups[].accounts | array of account names | W | 1 to 200, unique. An account you add must be one of your NinjaTrader accounts | Accounts in the group |
opposingPositionProtection.groups[].relatedProducts | array of pairs or null | W | Same rules as relatedProducts, but "default" is not accepted | The group's own related products. Leave it out (or null) to use the list above |
Adding an account or connection name is checked against your NinjaTrader, so it needs the add-on connected (409 addon_disconnected otherwise; adding a connection name also needs add-on v1.12 or newer). An unknown account returns 404 account_not_found and an unknown connection returns 422 validation_failed with code unknown_connection, both with fields saying where. Names that are already saved are not re-checked, so other changes work while the add-on is offline.