Skip to main content

Connection settings fields

Returned by GET Connection Settings. Every field is writable with PATCH Connection Settings except opposingPositionProtection.relatedProductsSource.

FieldTypeAccessConstraintsDescription
autoReconnectarray of objectsWAt most 50, one per connectionReconnect a NinjaTrader connection automatically when it drops
autoReconnect[].connectionstringW1 to 128 characters, unique. A name you add must be one of your NinjaTrader connectionsConnection name as shown in NinjaTrader
autoReconnect[].enabledbooleanWTurn auto-reconnect on for this connection
autoReconnect[].timeoutSecondsintegerW10 to 3600Seconds to wait before reconnecting
dataWatchdogarray of objectsWAt most 50, one per connectionReconnect when a connection stops sending market data
dataWatchdog[].connectionstringW1 to 128 characters, unique. A name you add must be one of your NinjaTrader connectionsConnection name as shown in NinjaTrader
dataWatchdog[].enabledbooleanWTurn the data watchdog on for this connection
dataWatchdog[].timeoutSecondsintegerW10 to 3600Seconds without data before it acts
reconnectActionsobjectWWhat the add-on does after a reconnect
reconnectActions.restartStrategiesbooleanWRestart the strategies that were running before the disconnect
reconnectActions.flattenobjectWAdd-on v1.13 or newerFlatten accounts after a reconnect
reconnectActions.flatten.scopenone, all, strategy_accounts or specificWnone: never. all: every account. strategy_accounts: accounts that were running strategies. specific: the accounts listed below
reconnectActions.flatten.accountsarray of account namesWAt most 200, unique. Required when scope is specific, empty otherwise. An account you add must be one of your NinjaTrader accountsAccounts to flatten
opposingPositionProtectionobjectWBlock an order that would open a position opposite to one you hold in a related product
opposingPositionProtection.enabledbooleanWTurn the protection on
opposingPositionProtection.checkAllAccountsbooleanWCompare positions across all your accounts, not just the order's account
opposingPositionProtection.relatedProductsarray of [SYMBOL, SYMBOL] pairs, or the string "default" when writingWAt most 200 pairs. Symbols are 1 to 10 uppercase letters or digits; the two in a pair differProducts treated as related (for example ["ES", "MES"]). Writing "default" saves the current CrossTrade default list
opposingPositionProtection.relatedProductsSourcedefault or customRdefault when the saved list is a CrossTrade default list
opposingPositionProtection.groupsarray of objectsWAt most 50, names uniqueAccount groups checked together
opposingPositionProtection.groups[].namestringW1 to 64 charactersGroup name
opposingPositionProtection.groups[].accountsarray of account namesW1 to 200, unique. An account you add must be one of your NinjaTrader accountsAccounts in the group
opposingPositionProtection.groups[].relatedProductsarray of pairs or nullWSame rules as relatedProducts, but "default" is not acceptedThe 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.