API (Application Programming Interface)

One broker independent trading API for placing, modifying, cancelling and reading orders across many Indian broker accounts.

API referenceAll client languagesBroker independentMulti-account
In short

Our trading API lets you place, modify, cancel and read orders across many Indian stock brokers using the same code. Each function takes an account number, so one set of code and one login can trade across multiple accounts. Standard symbols and broker independent design mean you do not write broker specific code. Libraries are available for Java, Python, C#, Excel, AmiBroker, MetaTrader and HTTP REST.

An API (Application Programming Interface) is a contract, or set of rules, that lets two software systems talk to each other. Programmers use APIs to build custom trading systems, such as algorithmic trading systems or systems made for a specific client’s needs.

See the full list of supported brokers.

Demo video

AutoTrader Web APIs

Our APIs are designed to work the same way no matter which broker you use.

  • Broker independent (multi-broker)
    • The same code works across many different stock brokers.
    • Your system stays compatible with many brokers at once.
  • Multi-account
    • Trade across multiple accounts easily. Every API function accepts an account number as a parameter.
    • One API authentication covers all of your trading accounts.
  • Broker independent symbols
    • We provide standard symbols that work across all brokers.
    • You do not need to handle broker-specific symbols in your code.
  • Low latency
    • A typical order is placed in about 80 milliseconds, measured on live orders. One in four takes under 45 milliseconds.
  • Industry leading documentation

How to measure your order speed

A typical order placement takes about 80 milliseconds (0.08 seconds), measured across more than 35,000 live orders. One order in four completes in under 45 milliseconds, and the fastest in under 30. Our own share is typically under 15 milliseconds; the rest is the trip to your broker and your broker processing the order.

Your own number depends mainly on two things:

  • The static IP your account uses. IPv6 and premium IPv4 are the fastest. The standard IPv4 is slower. See speed and performance for the measured comparison.
  • How fast your broker’s servers process the order. This varies from broker to broker and through the day, and market open is the busiest moment for every broker.

You can check these numbers on your own account. The API response does not carry timing, but you do not need to add any timing code, because every order is already recorded in your activity log with a timestamp accurate to the millisecond.

  1. Place the order as usual. The response contains a commandId.
  2. Open Tools -> Activity in AutoTrader Web and paste that command id into the filter box.
  3. You will see two entries for that order. Placing order: Order [...] is the moment we received it, and SUCCESS - [...]. Result: ... is the moment your broker replied with the order id.
  4. Subtract the first time from the second.

For example, 10:15:32.118 and 10:15:32.198 means the order took 80 milliseconds.

That gap covers our system plus your broker, and it leaves out your own internet connection. So if you also measure the full round trip in your own code, the difference between the two numbers is your network and your code. That is the cleanest way to find out where your time is actually going.

Take an average over at least 100 orders before drawing a conclusion. A single order can be slow for reasons that have nothing to do with speed, such as the first order of the day.

See Activity screen and slow performance for more.

API Libraries

Pick the library that matches your programming environment.

API Functions

Click any function below to read its documentation.

Place orders

Cancel orders

Modify orders

Square-off

Read data

Trading accounts

Reference

Writing the code with an AI assistant

Most people now build against this API with an AI coding assistant (ChatGPT, Claude, Gemini, Copilot, or whichever you use). It works far better if you give the tool our documentation first — an AI that has not read it invents function names and field values.

The quickest way is to attach one ready-made file that holds this whole API reference: stocksdeveloper.in/ai/trading-api.txt, or the smaller file for your language, such as stocksdeveloper.in/ai/trading-api/python.txt. Both are built from these pages, so they are never out of date.

Build with AI has the full method — where to get the file, prompts you can copy, the mistakes these tools make, and how to check the result. Ask the tool to check its own code against the reference, then try each call once with Postman before you run it with real money.

Our support can answer anything about the API itself — what a function does, what a parameter expects, what an error means — but it is not set up to read or debug a whole program.

Next steps

Was this page helpful?

Last updated 8 October 2026