5. Settings & Configuration

Configure security, Telegram alerts, and connection monitoring.

The NinjaSync Settings page at http://localhost:4003/settings gives you control over security, webhook authentication, and connection monitoring. This page is accessible any time NinjaTrader is running.

API Key Security

The bridge auto-generates a unique API key on first run. By default, authentication is disabled and all webhook requests are accepted. You can enable it for production use.

  • Check Require API key for all webhooks to enable authentication
  • When enabled, every webhook must include "auth_token": "YOUR_KEY"
  • Use the Copy button to copy your key into TradingView alert payloads
  • Requests without a valid key are rejected with a 403 error

Webhook Authentication

When authentication is enabled, add the auth_token field to every alert payload:

JSON
{
  "alert": "OCO Market Long",
  "account": "Sim101",
  "ticker": "NQ MAR26",
  "qty": "1",
  "take_profit_price": "21500",
  "stop_loss_price": "21400",
  "auth_token": "YOUR_API_KEY_HERE"
}
SettingRequestResult
API key off (default)Any requestAccepted
API key onMissing auth_tokenRejected (403)
API key onWrong auth_tokenRejected (403)
API key onValid auth_tokenAccepted

Connection Monitor

The Connection Monitor watches your broker connection and alerts you via Telegram when issues occur.

  • Check Enable disconnect detection + alerts in settings
  • The bridge checks your broker connection every 10 seconds
  • On disconnect: sends a Telegram alert immediately
  • On reconnect: sends another alert with the downtime duration

Note

The Payload Tester automatically includes your API key when you check "Include Auth Token".