Skip to content

Validation & Reference Data

Validation errors are usually deterministic. Retrying the same request will fail again until the request or reference data is corrected.

7 documented errors

Instrument Error Lookup

Search stale `ref_id`, instrument lookup, exchange map, and reference-data errors.

Request Validation

Failure Fix
Missing required field Compare payload against the endpoint contract.
Wrong enum Use documented values for exchange, order side, price type, validity, and product.
Wrong type Convert numeric, boolean, array, and object fields before sending.
Invalid quantity Use valid lot size and quantity boundaries.
Invalid price or trigger Respect tick size, trigger/limit relation, and price band rules.
Invalid basket/flexi structure Preserve required legs and basket-level fields.

Reference Data Errors

Failure Fix
Stale ref_id Refresh the instrument master.
Wrong environment Resolve instruments separately for UAT and PROD.
Wrong exchange Confirm NSE/BSE or segment mapping.
Expired contract Refresh expiry list and instrument chain.
Unknown Nubra name Resolve from the current reference master instead of hardcoding.

Handling Rule

Validation or refdata failure
      |
      v
Stop retry
      |
      v
Fix request or refresh instruments
      |
      v
Send a new corrected request

User Message Pattern

Keep the user message direct:

Internal Message User Message
Reference ID missing from exchange map Instrument is unavailable. Refresh instruments.
Quantity is not a multiple of lot size Quantity must match the contract lot size.
Invalid trigger price relation Stop-loss trigger and limit price are invalid.
NEO Assistant