> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# REST API Reference

This is the complete reference for the Trade API — every operation you can call, with request and response schemas and a live playground. Endpoints are grouped by service:

* **Accounting** — accounts, cash balances, and trading permissions.
* **Orders** — place, modify, cancel, and query orders.
* **ContractLibrary** — contracts, products, currencies, and maturities.
* **Risks** — position limits and risk parameters.
* **Alerts** — alerts that surface in the trader application.
* **Chat** — open, query, post to, and close a chat context.

New to the API? Read [Authentication & Access](/api/authentication) and [API
Conventions](/api/conventions) first — they cover the token flow and the request
patterns every endpoint follows.

Use the environment selector in the playground to switch requests and generated code snippets between **Demo** and **Live**. Pick a service in the sidebar to see its endpoints.