Signals
A signal says what you want traded: instrument, side, size, order type and product. This page lists every field, the rules that tie fields together, and what happens to a signal after you send it.
The signal object#
Send one signal as the JSON body of POST /api/v1/signals or POST /api/v1/signals/test, or up to 10 inside items for POST /api/v1/signals/batch. Field names are case-sensitive and enum values are upper case.
| Field | Type | Need | Allowed values and rules |
|---|---|---|---|
client_signal_id | string | Required | Your id for this signal: 1 to 64 characters from A-Z a-z 0-9 _ -. Unique per key for the life of the key. It is the idempotency key, see Idempotency. |
exchange | string | Required | NSE, BSE, NFO, BFO or MCX. |
segment | string | Optional | CASH, FNO or COMMODITY. Derived from exchange (NSE and BSE are CASH, NFO and BFO are FNO, MCX is COMMODITY), so you can leave it out. If you send it, it must match: segment_mismatch. |
symbol | string | Required | The exchange trading symbol of the underlying, such as RELIANCE, NIFTY, M&M or CRUDEOIL. Lower-case ASCII letters are upper-cased, then it must be 1 to 32 characters from A-Z 0-9 & _ -. Look-alike Unicode letters are rejected: invalid_symbol. |
instrument_type | string | Required | EQ (cash equity), FUT (future), CE (call option) or PE (put option). |
expiry | string | Conditional | Contract expiry as YYYY-MM-DD, a real date from today (IST) to 1,830 days ahead. Required for FUT, CE, PE; not allowed for EQ. |
strike | decimal | Conditional | Strike price, above 0 and at most 10,000,000, up to 2 decimal places. Required for CE and PE; not allowed for EQ and FUT. |
side | string | Required | BUY or SELL. |
quantity | integer | Conditional | Units (shares, or contract units), 1 to 1,000,000. Send exactly one of quantity or lots. |
lots | integer | Conditional | Number of lots, 1 to 10,000. Send exactly one of quantity or lots. Not allowed for EQ. |
order_type | string | Required | MARKET, LIMIT, SL (stop-loss limit) or SL-M (stop-loss market). |
price | decimal | Conditional | Limit price, above 0 and at most 10,000,000, up to 2 decimal places. Required for LIMIT and SL; not allowed, not even 0, for MARKET and SL-M. |
trigger_price | decimal | Conditional | Stop trigger, same format as price. Required for SL and SL-M; not allowed for MARKET and LIMIT. |
product | string | Required | MIS (intraday), NRML (carry-forward derivatives) or CNC (equity delivery). |
validity | string | Optional | DAY or IOC. Defaults to DAY. |
tag | string | Optional | Your label, 1 to 20 characters from A-Z a-z 0-9 _ -. |
strategy_id | string | Optional | Your strategy name, 1 to 32 characters from A-Z a-z 0-9 _ -. |
algo_id | string | Optional | 1 to 32 characters from A-Z a-z 0-9 _ -. Stored now for exchange algo-ID tagging once signals are routed. |
notes | string | Optional | Free text for the desk, 1 to 200 characters after trimming spaces. Control and bidirectional-override characters are rejected. |
Validation is strict. A field MQuant does not know is an error, not something it quietly ignores, so a typo such as trigger for trigger_price is caught before the desk sees the signal.
Number and text formats#
Prices and strikes
price,trigger_priceandstrikeaccept a JSON number or a decimal string such as"112.50". Strings are recommended: they avoid binary floating-point surprises.- At most 2 decimal places (
too_many_decimals), above 0, at most 10,000,000. Exponents such as1e3are rejected. - MQuant always returns them as strings with exactly 2 decimals:
"24500"comes back as"24500.00". - MQuant does not check tick sizes in v1. Send prices on the instrument's tick (0.05 for most NSE and NFO contracts) so the desk can use them unchanged.
Quantities
quantity and lots must be JSON integers. 10.0, "10" and true are rejected with invalid_type. For futures and options you may size in either units or lots; for equity, units only.
Strict JSON
- The body must be a single JSON object in UTF-8. Anything else is
400 invalid_json. - A repeated key, such as two
pricefields, is400 duplicate_json_key. NaN,Infinity, exponents and integers longer than 15 digits are400 invalid_number.- Nesting deeper than 4 levels is
400 invalid_json. A signal never needs more than 1, a batch 3. - Unknown fields are rejected with
unknown_field, including fields that look like server fields, such asstatus,signal_idoraccount_id. - Control characters, bidirectional overrides and lone surrogates in any string are rejected with
forbidden_character. - A field set to
nullis treated as absent.
Cross-field rules#
Each rule below is checked on its own, and every failure is reported in details of one 422 invalid_signal response, so you can fix them all at once.
Exchange and instrument
Cash exchanges take equity only; derivative exchanges take futures and options only (instrument_type_not_allowed).
| Exchange | Segment | EQ | FUT | CE / PE |
|---|---|---|---|---|
NSE | CASH | Yes | No | No |
BSE | CASH | Yes | No | No |
NFO | FNO | No | Yes | Yes |
BFO | FNO | No | Yes | Yes |
MCX | COMMODITY | No | Yes | Yes |
Expiry, strike and size
| instrument_type | expiry | strike | Size with |
|---|---|---|---|
EQ | Not allowed | Not allowed | quantity only |
FUT | Required | Not allowed | quantity or lots |
CE, PE | Required | Required | quantity or lots |
Send exactly one of quantity or lots (quantity_xor_lots). Equity must use quantity (lots_not_allowed_for_equity). Missing or extra contract fields give expiry_required, expiry_not_allowed, strike_required or strike_not_allowed. An expiry before today (IST) is expiry_in_past; more than 1,830 days ahead is expiry_too_far.
Order type, price and trigger
| order_type | price | trigger_price | Meaning |
|---|---|---|---|
MARKET | Not allowed | Not allowed | Trade at the market |
LIMIT | Required | Not allowed | Trade at price or better |
SL | Required | Required | When trigger_price trades, place a limit order at price |
SL-M | Not allowed | Required | When trigger_price trades, place a market order |
Breaking these gives price_required, price_not_allowed, trigger_price_required or trigger_price_not_allowed. For SL, the trigger must sit on the correct side of the limit price (trigger_price_inconsistent):
- BUY stop-loss:
trigger_price ≤ price. For example trigger 100.00, limit 100.50. - SELL stop-loss:
trigger_price ≥ price. For example trigger 53000.00, limit 52990.00.
Product
| product | EQ | FUT, CE, PE |
|---|---|---|
CNC | Yes | No |
NRML | No | Yes |
MIS | Yes | Yes |
CNC is equity delivery only and NRML is derivatives only (product_not_allowed). MIS works with every instrument.
Risk caps#
After a signal passes validation it is checked against the risk caps on your key. The current caps are in limits of GET /api/v1/me; the desk sets them. A breach returns 422 with error_type: "RiskException" and nothing is stored.
| Code | When | Default cap |
|---|---|---|
max_quantity_exceeded | quantity is above max_quantity | 100,000 units |
max_lots_exceeded | lots is above max_lots | 1,000 lots |
max_notional_exceeded | price × quantity is above max_notional, when both are set | ₹5,00,00,000.00 |
The notional check needs both a price and a quantity in units. It is skipped for MARKET and SL-M orders and for signals sized in lots; such signals get the notional_unchecked warning.
Warnings#
Warnings never stop a signal. They are stored on it, returned to you and shown to the desk.
| Warning | Added when |
|---|---|
outside_market_hours | The signal arrives outside Monday to Friday 09:15 to 15:30 IST for NSE, BSE, NFO and BFO, or 09:00 to 23:55 IST for MCX. Exchange holidays and special sessions are not modelled in v1. |
notional_unchecked | The notional could not be checked: the order is MARKET or SL-M, or it is sized in lots. |
expiry_today | The contract expires today (IST). |
Example payloads#
Each body below is complete and valid. The derivative examples use fixed expiry dates; change expiry to the expiry of a contract that is trading when you send it. Dry-run with POST /api/v1/signals/test first.
NSE equity, LIMIT, delivery (CNC)#
{
"client_signal_id": "reliance-0001",
"exchange": "NSE",
"symbol": "RELIANCE",
"instrument_type": "EQ",
"side": "BUY",
"quantity": 10,
"order_type": "LIMIT",
"price": "1250.50",
"product": "CNC"
}NSE equity, MARKET, intraday (MIS), IOC#
{
"client_signal_id": "infy-0003",
"exchange": "NSE",
"symbol": "INFY",
"instrument_type": "EQ",
"side": "SELL",
"quantity": 25,
"order_type": "MARKET",
"product": "MIS",
"validity": "IOC",
"strategy_id": "infy-mean-rev"
}NFO index future, stop-loss limit (SL), sized in lots#
{
"client_signal_id": "bnf-fut-0007",
"exchange": "NFO",
"symbol": "BANKNIFTY",
"instrument_type": "FUT",
"expiry": "2026-12-29",
"side": "SELL",
"lots": 1,
"order_type": "SL",
"price": "52990.00",
"trigger_price": "53000.00",
"product": "NRML",
"strategy_id": "bnf-breakdown"
}NFO call option, LIMIT, sized in lots#
{
"client_signal_id": "nifty-0001",
"exchange": "NFO",
"symbol": "NIFTY",
"instrument_type": "CE",
"expiry": "2026-12-29",
"strike": "24500",
"side": "BUY",
"lots": 2,
"order_type": "LIMIT",
"price": "112.50",
"product": "NRML",
"tag": "momo1"
}NFO put option, stop-loss market (SL-M), sized in units#
{
"client_signal_id": "nifty-pe-0042",
"exchange": "NFO",
"symbol": "NIFTY",
"instrument_type": "PE",
"expiry": "2026-12-29",
"strike": "24000",
"side": "SELL",
"quantity": 75,
"order_type": "SL-M",
"trigger_price": "85.00",
"product": "MIS",
"algo_id": "hedge-v2"
}MCX commodity future, LIMIT#
{
"client_signal_id": "crude-0101",
"exchange": "MCX",
"symbol": "CRUDEOIL",
"instrument_type": "FUT",
"expiry": "2026-12-17",
"side": "BUY",
"lots": 1,
"order_type": "LIMIT",
"price": "6120.00",
"product": "NRML",
"notes": "Breakout above the opening range"
}Batch of two (a pair trade)
Up to 10 signals in one call, stored all together or not at all. See POST /signals/batch.
{
"items": [
{
"client_signal_id": "pair-0001-a",
"exchange": "NSE",
"symbol": "HDFCBANK",
"instrument_type": "EQ",
"side": "BUY",
"quantity": 50,
"order_type": "LIMIT",
"price": "1712.40",
"product": "MIS"
},
{
"client_signal_id": "pair-0001-b",
"exchange": "NSE",
"symbol": "ICICIBANK",
"instrument_type": "EQ",
"side": "SELL",
"quantity": 60,
"order_type": "LIMIT",
"price": "1281.05",
"product": "MIS"
}
]
}The stored signal#
Every endpoint that returns a signal returns this shape. Fields you did not send come back as null; segment and validity are filled in.
{
"object": "signal",
"signal_id": "sig_9f2c4e1a7b3d5f60a1b2c3d4",
"client_signal_id": "nifty-0001",
"batch_id": null,
"status": "received",
"mode": "live",
"exchange": "NFO",
"segment": "FNO",
"symbol": "NIFTY",
"instrument_type": "CE",
"expiry": "2026-12-29",
"strike": "24500.00",
"side": "BUY",
"quantity": null,
"lots": 2,
"order_type": "LIMIT",
"price": "112.50",
"trigger_price": null,
"product": "NRML",
"validity": "DAY",
"tag": "momo1",
"strategy_id": null,
"algo_id": null,
"notes": null,
"warnings": ["outside_market_hours"],
"reject_reason": null,
"cancel_reason": null,
"received_at": "2026-12-02T04:00:00.123Z",
"updated_at": "2026-12-02T04:00:00.123Z",
"status_history": [
{"status": "received", "at": "2026-12-02T04:00:00.123Z", "by": "trader", "note": null}
]
}signal_id: MQuant's id,sig_+ 24 hex characters.batch_id:bat_+ 24 hex characters when the signal arrived in a batch, otherwisenull.mode:liveortest, from the key that sent it.status_history: every status change, oldest first.byistrader,deskorsystem;notecarries a cancel reason or a desk note.received_at,updated_at: UTC with milliseconds.replayed: present only on create responses.truewhen MQuant returned an existing signal instead of storing a new one.
Statuses and lifecycle#
| Status | Meaning | Set by |
|---|---|---|
received | Stored and waiting for the desk. Every new signal starts here. | MQuant |
accepted | The desk accepted it. Nothing is sent anywhere in v1. | Desk |
rejected | The desk rejected it. reject_reason says why. Final. | Desk |
cancelled | You cancelled it before it was mapped. Final. | You |
mapped | Reserved for desk routing to accounts. Not used in v1. | Desk |
cancel_requested | You asked to cancel a signal that was already mapped. Reserved; not reachable in v1. | You |
- The desk can move
receivedtoacceptedorrejected, andacceptedtorejected. - You can cancel a
receivedoracceptedsignal withPOST /api/v1/signals/{signal_id}/cancel. Cancelling arejectedorcancelledsignal returns409 signal_not_cancellable. - Cancel only changes the stored status. In v1 there is no order at a broker to cancel.
- Test signals can be rejected but never accepted.
- MQuant does not push status changes to you. Poll
GET /api/v1/signals/{signal_id}, or list recent signals withGET /api/v1/signals?status=accepted, within your read limits.
Idempotency#
client_signal_id makes sending safe to retry. MQuant stores at most one signal per client_signal_id per key, for the life of the key, across secret rotations.
| You send | MQuant answers |
|---|---|
A new client_signal_id | 202, the new signal, replayed: false |
| The same id and an identical payload | 200, the original signal as it is now, replayed: true and the header Idempotent-Replayed: true. This holds even if the signal's status changed, your caps changed or the expiry has passed since. |
| The same id and a different payload | 409 idempotency_conflict, with the existing signal_id in details |
The comparison uses the normalised signal: "symbol": "reliance" and "RELIANCE", or "price": 1250.5 and "1250.50", count as the same payload. Signals that fail validation (400 or 422) are never stored and do not use up the id, so fix the body and resend with the same id.
Safe retry
- On a timeout, a dropped connection or a
5xx, send the identical body again with the sameclient_signal_idand a fresh timestamp, nonce and signature. If the first attempt was stored you get it back withreplayed: true; if not, it is stored now. - If you no longer have the exact body, look the signal up first with
GET /api/v1/signals/by-client-id/{client_signal_id}. A404means it was never stored. - On
429, wait forRetry-Afterseconds, then retry the same way. - Do not retry any other
4xxwithout changing the request. It will fail the same way. - A new trading decision always gets a new
client_signal_id. Reusing one for a different signal returns409 idempotency_conflict.
The Python and Node clients on Code examples implement this in send_signal() / sendSignal(). A good client_signal_id is built from your own order reference, for example momo1-20261202-000123.
Batches
- A batch is all or nothing. If any item fails validation, every failing item is listed with its
indexand nothing is stored. - Two items with the same
client_signal_idreturn422 duplicate_client_signal_id. - If any item reuses an existing id with a different payload, the batch returns
409 idempotency_conflictand nothing is stored. - Items that exactly match existing signals come back with
replayed: true. New items share one newbatch_id. If every item was a replay, the status is200andbatch_idisnull.