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:
- Install and connect the CrossTrade add-on inside NinjaTrader
- Grab your Bearer token from the My Account page
- Include it as an
Authorization: Bearer <token>header on every request - Start making calls to
https://app.crosstrade.io/v1/api/
For authentication details, see Authentication. For rate limit specifics, see Rate Limiting.
Instrument Name Formats
Wherever an instrument field is accepted — as a path parameter, query parameter, or body field — the API accepts multiple formats:
- Full dated form:
"ES 09-26"(always works) - Root symbol:
"ES"(resolves to the current front month) - TradingView continuous format:
"ES1!" - CME code format:
"ESU25","ESZ25" - Space-normalized form:
"ES SEP25","ES DEC25"
The add-on runs a three-step resolution: direct NT8 lookup, then a space-normalized fuzzy match against all loaded instruments, then a root-symbol front-month fallback. The examples throughout these docs use the full dated form for clarity, but any of the above will work anywhere an instrument is accepted.
The warning Field in Responses
Some endpoints return a warning field alongside success: true. This indicates the request was processed, but an edge case was encountered — for example, a position that went flat during a cancel window, or a flatten call with no open positions to close. Always check for warning in addition to success if your integration needs to detect these cases.
Specs and Tooling for Developers
Machine-readable specs and AI-friendly resources, all served live from the API:
| Resource | URL | Format |
|---|---|---|
| OpenAPI 3.1 spec | /v1/api/openapi.json | JSON |
| OpenAPI 3.1 spec | /v1/api/openapi.yaml / download | YAML |
| Endpoint catalog | /v1/api/_endpoints | JSON |
| LLM index | /v1/api/llms.txt | Markdown |
| Full LLM reference | /v1/api/llms-full.txt | Markdown |
Drop the OpenAPI spec into Postman, Insomnia, or any OpenAPI-aware tool to get a typed client and a request explorer for free. If you're using AI coding assistants (Claude, Cursor, Continue, …), the AI-Assisted Development guide walks through the MCP server, SDKs, and drop-in rules templates.
If you run into issues or have questions, reach out on Discord.