On this page
The full loop: find an instrument, validate the order locally, check the margin, place it, read it back, and cancel it. Written so that nothing actually trades.
Practise first on Sandbox (UAT / Test — NOT live): https://uat.infinn.in. Then use live. Live calls hit your real account with your real money.
The technique this guide uses to stay safe: a limit order to buy one share of a liquid stock at a price far below the market. Such an order cannot fill - nobody will sell you Reliance at half price - so it rests in the order book where you can inspect it, and then you cancel it.
Do not substitute a market order. Do not increase the quantity. Do not move the price closer while experimenting.
What we will build
The short path
- Find the instrument with
SearchScrip(exchange + trading symbol, e.g.RELIANCE-EQ). - Get the price with
GetQuotesand pick a limit price far below it (for example half). - Validate quantity, tick size and price band before sending.
- Check margin with
GetOrderMargin. - Place 1 share,
prctyp: LMT, withPlaceOrder. Keep thenorenordno. - Read it back with
SingleOrdStatusorOrderBook; expectOPEN. - Cancel with
CancelOrder; expectCANCELED.
The Your first trade in 30 minutes page has a copy-paste script that does all of this, dry-run by default.
Learn more: every step in detail, with full code →