Overview

The CrossTrade API

The CrossTrade API gives you programmatic access to your NinjaTrader 8 desktop client from any language, any platform, anywhere. If you've ever wanted to run your own algo in Python, build a custom dashboard, or query account data from a server — without writing C# inside NT8's .NET 4.8 environment — this is how.

The API communicates with your running instance of NinjaTrader through the connected CrossTrade add-on. Every action you can take manually in NT8 — placing orders, querying positions, pulling quotes — is available as an API call.

What You Can Do

The API covers accounts, positions, orders, strategies, executions, and real-time market data. You can place and modify orders, flatten positions, pull historical bars, stream live quotes over WebSocket, and monitor session performance — all from external code.

There are two ways to connect: a standard REST API for request-response workflows, and a WebSocket API for persistent connections with real-time streaming. Both use the same authentication and share the same rate limit budget.

How It Works

Every API request is forwarded to the CrossTrade add-on running inside your NinjaTrader instance. This means NT8 must be open and the add-on must be connected for API calls to reach your broker. The add-on executes the request on your local machine and returns the result.

To get started:

  1. Install and connect the CrossTrade add-on inside NinjaTrader

  2. Grab your Bearer token from the My Accountarrow-up-right page

  3. Include it as an Authorization: Bearer <token> header on every request

  4. Start making calls to https://app.crosstrade.io/v1/api/

For authentication details, see Authentication. For rate limit specifics, see Rate Limiting.

If you run into issues or have questions, reach out on Discordarrow-up-right.

Last updated