Skip to main content

Complete endpoint reference

Offline source audit: IMC baseline ec9832a7bd461e07115315f990374e9c2450a0f1 with the endpoint-wiring working-tree corrections. This reference is not a claim of deployed broker verification.

Base URL: https://imc.layr0.org. Trading and mode-sensitive operations require current mode metadata. All JSON requests reject documentation fields recursively. See request validation and mode requirements.

Methods, authentication and request fields​

Method / URLAuthenticationRequired request fieldsOptional fields and defaults
POST /api/v1/analyzerapikey JSON; identity checked in route/serviceapikey (String)None in declared schema; query options may apply
POST /api/v1/analyzer/toggleapikey JSON; identity checked in route/serviceapikey (String), mode (Boolean)None in declared schema; query options may apply
POST /api/v1/basketorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), orders (List)None in declared schema; query options may apply
POST /api/v1/brokers/activeapplication Authorization header (AUTH_MAGIC_KEY) plus apikey JSONapikey (String)None in declared schema; query options may apply
POST /api/v1/cancelallorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String)strategy (String = null)
POST /api/v1/cancelgttorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), trigger_id (String)None in declared schema; query options may apply
POST /api/v1/cancelorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), orderid (String)None in declared schema; query options may apply
POST /api/v1/cancelprotectedorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), protected_order_id (String)None in declared schema; query options may apply
GET /api/v1/chartapikey queryapikey (String)None in declared schema; query options may apply
POST /api/v1/chartapikey JSON; identity checked in route/serviceapikey (String)None in declared schema; query options may apply
POST /api/v1/closepositionapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String)strategy (String = null)
POST /api/v1/ddpistatusapikey JSON; identity checked in route/serviceapikey (String)None in declared schema; query options may apply
POST /api/v1/depthapikey JSON; identity checked in route/serviceapikey (String), symbol (String), exchange (String)None in declared schema; query options may apply
POST /api/v1/expiryapikey JSON; identity checked in route/serviceapikey (String), symbol (String), exchange (String), instrumenttype (String)None in declared schema; query options may apply
POST /api/v1/fundsapikey JSON; identity checked in route/serviceapikey (String)None in declared schema; query options may apply
POST /api/v1/gttorderbookapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String)None in declared schema; query options may apply
POST /api/v1/historyapikey JSON; identity checked in route/serviceapikey (String), symbol (String), exchange (String), interval (String), start_date (Date), end_date (Date)None in declared schema; query options may apply
POST /api/v1/holdingsapikey JSON; identity checked in route/serviceapikey (String)strategy (String)
GET /api/v1/instrumentsapikey queryapikey (String)exchange (String), format (String)
POST /api/v1/intervalsapikey JSON; identity checked in route/serviceapikey (String)None in declared schema; query options may apply
POST /api/v1/marginapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), positions (List)None in declared schema; query options may apply
POST /api/v1/market/holidaysapikey schema-required; calendar service does not verify identityapikey (String)year (Integer)
POST /api/v1/market/timingsapikey schema-required; calendar service does not verify identityapikey (String), date (String)None in declared schema; query options may apply
POST /api/v1/modifygttorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), trigger_type (String), exchange (String), symbol (String), action (String), product (String), quantity (Float), price (Float), trigger_id (String)pricetype (String = "LIMIT"), triggerprice_sl (Float = 0.0), triggerprice_tg (Float = 0.0), stoploss (Float = null), target (Float = null)
POST /api/v1/modifyorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), exchange (String), symbol (String), orderid (String), action (String), product (String), pricetype (String), price (Float), quantity (Integer), disclosed_quantity (Integer), trigger_price (Float)None in declared schema; query options may apply
POST /api/v1/modifyprotectedorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), protected_order_id (String), target_trigger (Float), target_limit (Float), stoploss_trigger (Float), stoploss_limit (Float)trailing_jump (Float)
POST /api/v1/multiquotesapikey JSON; identity checked in route/serviceapikey (String), symbols (List)None in declared schema; query options may apply
POST /api/v1/optionchainapikey JSON; identity checked in route/serviceapikey (String), underlying (String), exchange (String), expiry_date (String)strike_count (Integer)
POST /api/v1/optiongreeksapikey JSON; identity checked in route/serviceapikey (String), symbol (String), exchange (String)interest_rate (Float), forward_price (Float), underlying_symbol (String), underlying_exchange (String), expiry_time (String)
POST /api/v1/optionsmultiorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), underlying (String), exchange (String), legs (List)expiry_date (String), strike_int (Integer)
POST /api/v1/optionsorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), underlying (String), exchange (String), offset (String), option_type (String), action (String), quantity (Integer), position_size (Integer)expiry_date (String), strike_int (Integer), splitsize (Integer = 0), pricetype (String = "MARKET"), product (String = "MIS"), price (Float = 0.0), trigger_price (Float = 0.0), disclosed_quantity (Integer = 0)
POST /api/v1/optionsymbolapikey JSON; identity checked in route/serviceapikey (String), underlying (String), exchange (String), offset (String), option_type (String)strategy (String), expiry_date (String), strike_int (Integer)
POST /api/v1/orderbookapikey JSON; identity checked in route/serviceapikey (String)strategy (String)
POST /api/v1/orderstatusapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), orderid (String)None in declared schema; query options may apply
POST /api/v1/pingapikey JSON; identity checked in route/serviceapikey (String)None in declared schema; query options may apply
POST /api/v1/placegttorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), trigger_type (String), exchange (String), symbol (String), action (String), product (String), quantity (Float), price (Float)pricetype (String = "LIMIT"), triggerprice_sl (Float = 0.0), triggerprice_tg (Float = 0.0), stoploss (Float = null), target (Float = null), expires_at (String = null)
POST /api/v1/placeorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), exchange (String), symbol (String), action (String), quantity (Integer)pricetype (String = "MARKET"), product (String = "MIS"), price (Float = 0.0), trigger_price (Float = 0.0), disclosed_quantity (Integer = 0), underlying_ltp (Float = null)
POST /api/v1/placeprotectedorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), exchange (String), symbol (String), action (String), quantity (Integer), product (String), entry_pricetype (String), entry_price (Float), target_trigger (Float), target_limit (Float), stoploss_trigger (Float), stoploss_limit (Float)order_system (String = null), trailing_jump (Float = 0)
POST /api/v1/placesmartorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), exchange (String), symbol (String), action (String), quantity (Integer), position_size (Integer)pricetype (String = "MARKET"), product (String = "MIS"), price (Float = 0.0), trigger_price (Float = 0.0), disclosed_quantity (Integer = 0)
POST /api/v1/pnl/symbolsapikey JSON; identity checked in route/serviceapikey (String)None in declared schema; query options may apply
POST /api/v1/positionbookapikey JSON; identity checked in route/serviceapikey (String)strategy (String)
POST /api/v1/positionsopenapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), symbol (String), exchange (String), product (String)None in declared schema; query options may apply
POST /api/v1/protectedorderbookapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String)None in declared schema; query options may apply
POST /api/v1/quotesapikey JSON; identity checked in route/serviceapikey (String), symbol (String), exchange (String)None in declared schema; query options may apply
POST /api/v1/recoverprotectedorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), protected_order_id (String)None in declared schema; query options may apply
POST /api/v1/searchapikey JSON; identity checked in route/serviceapikey (String), query (String)exchange (String)
POST /api/v1/splitorderapikey JSON; identity checked in route/serviceexpected_mode (String), expected_balance_type (String), expected_mode_version (Integer), request_id (String), apikey (String), strategy (String), exchange (String), symbol (String), action (String), quantity (Integer), splitsize (Integer)pricetype (String = "MARKET"), product (String = "MIS"), price (Float = 0.0), trigger_price (Float = 0.0), disclosed_quantity (Integer = 0)
GET /api/v1/strategy/strategiesX-Layr0-Api-Key or apikey headerHandler-specific filters; see details belowNone in declared schema; query options may apply
POST /api/v1/symbolapikey JSON; identity checked in route/serviceapikey (String), symbol (String), exchange (String)None in declared schema; query options may apply
POST /api/v1/syntheticfutureapikey JSON; identity checked in route/serviceapikey (String), underlying (String), exchange (String), expiry_date (String)None in declared schema; query options may apply
GET /api/v1/ticker/<string:symbol>X-API-KEY header or apikey queryapikey (String), interval (String), from (Date), to (Date)None in declared schema; query options may apply
POST /api/v1/tradebookapikey JSON; identity checked in route/serviceapikey (String)strategy (String)

Response and capability contracts​

  • Ordinary order placement returns status and broker orderid; BasketOrder/SplitOrder/options multi-order retain per-order or per-leg results. Errors retain endpoint-specific fields. Composite operations execute under one parent mode lease.
  • Account books return status with endpoint-specific data; Funds/Analyzer additionally provide current mode/balance/version metadata. Never substitute a default mode snapshot for missing server evidence.
  • Market-data and options helper APIs retain their existing quote/history/chain/symbol/Greek structures. Ticker also supports text output; Instruments supports JSON/CSV. Consult the dedicated data pages and use current broker instrument identities.
  • GTT retains existing legacy envelopes. Upstox protective-only OCO remains unsupported; its native MULTIPLE workflow uses protected entry. Dhan new placements use explicit Super intent. See GTT/options contracts, Dhan Super, and protected orders.
  • Protected book remains non-billable; protected placement/recovery use durable identity and contract-v2 fill evidence. Acceptance, trigger IDs, missing orders or zero exposure must not be interpreted as completed fills.
  • Analytics endpoints return account-scoped strategy/P&L data. Strategy analytics authenticates via X-Layr0-Api-Key or apikey headers. Effective filters vary by mode and orderType; Live unified pagination metadata does not slice results. See the dedicated strategy analytics contract.
  • Calendar requests require an apikey field syntactically; the current calendar service does not validate its identity and does not access a broker account. This documented limitation must not be interpreted as authenticated account evidence.
  • Source registration roster: Dhan, Upstox, Zerodha and FYERS. Adapter existence does not establish support for every operation or production broker eligibility. Unsupported capabilities must remain explicit errors.

GET and dynamic preference details​

GET /api/v1/instruments uses query apikey, optional exchange, and format (json/csv). GET /api/v1/chart uses query apikey; POST chart accepts authenticated preference fields and preserves existing custom preferences except forbidden documentation fields. GET /api/v1/ticker/{symbol} uses exchange:symbol, X-API-KEY or query apikey, date bounds from/to, and interval/format options documented in the Ticker guide.

Errors and verification limits​

Schema errors are 400; forbidden documentation fields are 400/FORBIDDEN_JSON_FIELD; missing service mode requirements are 428; stale/conflicting modes are 409. Missing/invalid credentials, unavailable auth and broker failures retain endpoint-specific 401/403/503/5xx semantics. See HTTP status codes. No automatic trading retry is implied.

The JSON contract snapshot is available as /imc-endpoint-contract.json. Source registration, mock dispatch and schema checks are offline evidence; live sessions, optional management subsystems and broker execution remain runtime pending.

Broker discovery also requires application Authorization supplied by the authorized caller. Playground never fetches this server secret; an authorized operator can enter it explicitly in the Headers tab. P&L symbols is Analyze-only.

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