Skip to main content

IMC API v1

Layr0 India Market Connector exposes REST APIs under /api/v1.

Hosted URL   : https://imc.layr0.org/api/v1

Account authentication normally uses apikey in POST JSON. GET endpoints use the documented query or header location; broker discovery also requires application Authorization. See each dedicated page for exceptions. Trading and write endpoints also require mode precondition fields so clients cannot trade against stale live/analyze state.

Response Shape​

Successful responses use:

{
"status": "success"
}

Errors preserve IMC-specific fields:

{
"status": "error",
"error_code": "SERVER_MODE_SWITCH_DETECTED",
"message": "Server mode switch detected",
"mode": "analyze",
"balance_type": "sandbox",
"mode_version": 8
}

Clients should not discard fields they do not immediately use. Mode metadata and error_code values are part of the public contract.

Protected-order availability and SDK compatibility​

SDK baseline 1.1.5; protected APIs in SDK 1.2.0, verified against IMC a995f3e (contract v2 originated at 364acaf). Production registration for this release: Dhan, Upstox, Zerodha and FYERS. Angel One is blocked in development and production. See release and migration details. The protected-order APIs are available in IMC. SDK 1.2.0 is the compatibility version that includes the corresponding Python client methods; SDK 1.1.5 is the prior package baseline.

Complete offline contract reference​

See all endpoint contracts and request validation. Contract corrections are verified offline on the endpoint-wiring branch; deployed behavior requires separate verification.

Independent endpoint pages​

One page per public URL path; the Chart page documents both GET and POST.

Method / URLDedicated page
POST /api/v1/analyzeraccounts-api/analyzer-status.md
POST /api/v1/analyzer/toggleaccounts-api/analyzer-toggle.md
POST /api/v1/basketorderorders-api/basketorder.md
POST /api/v1/brokers/activebrokers-active.md
POST /api/v1/cancelallorderorders-api/cancelallorder.md
POST /api/v1/cancelgttordercancelgttorder.md
POST /api/v1/cancelorderorders-api/cancelorder.md
POST /api/v1/cancelprotectedordercancelprotectedorder.md
GET /api/v1/chartchart.md
POST /api/v1/chartchart.md
POST /api/v1/closepositionorders-api/closeposition.md
POST /api/v1/ddpistatusddpi-status.md
POST /api/v1/depthdata-api/depth.md
POST /api/v1/expirydata-api/expiry.md
POST /api/v1/fundsaccounts-api/funds.md
POST /api/v1/gttorderbookgttorderbook.md
POST /api/v1/historydata-api/history.md
POST /api/v1/holdingsaccounts-api/holdings.md
GET /api/v1/instrumentsinstruments.md
POST /api/v1/intervalsdata-api/intervals.md
POST /api/v1/marginmargin.md
POST /api/v1/market/holidaysmarket-holidays.md
POST /api/v1/market/timingsmarket-timings.md
POST /api/v1/modifygttordermodifygttorder.md
POST /api/v1/modifyorderorders-api/modifyorder.md
POST /api/v1/modifyprotectedordermodifyprotectedorder.md
POST /api/v1/multiquotesmultiquotes.md
POST /api/v1/optionchainoptionchain.md
POST /api/v1/optiongreeksoptiongreeks.md
POST /api/v1/optionsmultiorderoptionsmultiorder.md
POST /api/v1/optionsorderoptionsorder.md
POST /api/v1/optionsymboloptionsymbol.md
POST /api/v1/orderbookaccounts-api/orderbook.md
POST /api/v1/orderstatusorders-api/orderstatus.md
POST /api/v1/pingping.md
POST /api/v1/placegttorderplacegttorder.md
POST /api/v1/placeorderorders-api/placeorder.md
POST /api/v1/placeprotectedorderplaceprotectedorder.md
POST /api/v1/placesmartorderorders-api/placesmartorder.md
POST /api/v1/pnl/symbolspnl-symbols.md
POST /api/v1/positionbookaccounts-api/positionbook.md
POST /api/v1/positionsopenorders-api/positionsopen.md
POST /api/v1/protectedorderbookprotectedorderbook.md
POST /api/v1/quotesdata-api/quotes.md
POST /api/v1/recoverprotectedorderrecoverprotectedorder.md
POST /api/v1/searchdata-api/search.md
POST /api/v1/splitorderorders-api/splitorder.md
GET /api/v1/strategy/strategiesstrategy-analytics.md
POST /api/v1/symboldata-api/symbol.md
POST /api/v1/syntheticfuturesyntheticfuture.md
GET /api/v1/ticker/<string:symbol>data-api/ticker.md
POST /api/v1/tradebookaccounts-api/tradebook.md