The CrossTrade API, a remotely accessible REST API for NinjaTrader

CrossTrade now offers a first-of-its-kind REST API for NinjaTrader 8. Connect the CrossTrade NT8 Add-On and interact with your desktop NinjaTrader from anywhere.

Depiction of the CrossTrade to NT8 API connection path

CrossTraders, we want to share an exciting update. CrossTrade (part of the NinjaTrader ecosystem) just released the brand new CrossTrade NT8 Add-On, and with it comes a fully-functional REST API for NinjaTrader.

We're not native C#/.NET programmers and it's not our first choice of language, so coding in NinjaScript is honestly a pain.

If you're algotraders like us, you most likely have data sources you're analyzing outside of NinjaTrader as well. We wanted a way to execute through NT8 while being able to send orders from any code or 3rd-party service, anywhere in the world, directly to our NT8 desktop application. Now you can code autotrading bots in Python, Javascript, Java, Go, or even assembly!

Getting Started

Installation is as simple as installing any other NT8 Add-On. As long as the Add-On is connected, you're live.

The CrossTrade client must be connected for the API to be functional.

Interacting with the API

The REST API is the same underlying functionality CrossTrade uses to execute orders from inbound webhook requests from TradingView. It's battle-tested and used to execute hundreds of thousands of orders in NT8 every day.

Anyone with a CrossTrade account can use the API to access information about your NT8 accounts, positions, orders, strategies, executions, and even instrument quotes.

Each CrossTrade account is given a Secret Key, which can be used to both authenticate inbound alert messages from TradingView, for instance, or as a Bearer token to interact with the API.

This is how easy it is to send your first API request to quote the ES 12-24 contract in Python:

url = "https://app.crosstrade.io/v1/api/accounts/sim101/quote"
headers = {
  "Authorization": "Bearer <token>",
}
params = {
  "instrument": "ES 03-26"
}
try:
  response = requests.get(url, headers=headers, params=params)
  print(f"Response Code: {response.status_code}, Response Text: {response.text}")
except Exception as e:
  print(f"An error occurred: {e}")

Quoting ES 12-24 in Python using the CrossTrade API

The API documentation covers all available endpoints — accounts, positions, orders, strategies, executions, and instrument quotes — with authentication examples and response formats. If you're building algo trading bots, custom dashboards, or connecting external data sources to NinjaTrader, the API docs are the place to start. For webhook-based automation that doesn't require code, see the Complete Guide to NinjaTrader Commands.


Start your free trial

Try CrossTrade for 7 days.

Sign Up