## Scrip master
Master reference for every tradable and quotable instrument. Download the CSV at start of day and pass its `id` column as `instrument_id` for every market-data call (`/v1/marketdata/ltp`, `/v1/marketdata/quotes`, `/v1/marketdata/candles`, `WSS /v1/stream/marketdata`) and as the `instrument_id` returned in positions.

- **Format:** CSV, UTF-8, RFC 4180 (fields containing `,`, `"`, or newlines are double-quoted). Header row included. One instrument per row.
- **Refresh:** rebuilt once per trading day before the pre-open phase (around 06:00 IST). The file is immutable for the day; new listings or status changes flow on the next day's file.
- **URL:** [`https://assets.sahi.com/external/instruments.csv`](https://assets.sahi.com/external/instruments.csv)

### Columns

The header row is, verbatim:

```
id,isin,symbol,company_name,series,underlying_symbol,exchange,segment,token,instrument_type,option_type,expiry_date,strike_price,lot_size,tick_size,freeze_quantity,price_precision,price_multiplier
```

Read columns by header name, not position.

| Column | Type | Notes |
|---|---|---|
| `id` | int | Primary key — pass as `instrument_id` in all Market Data API calls; matches the `instrument_id` returned in positions. Stable across trading days for the same instrument. |
| `isin` | string | 12-character ISIN. Empty for derivatives and indices. |
| `symbol` | string | The symbol `POST /v1/orders` takes and the order book returns: the exchange trading symbol, with the `-EQ` series suffix dropped on NSE cash (`RELIANCE`, `3IINFOLTD-BE`, `NIFTY27OCT26C25000`). Empty for indices, which are not tradable. |
| `company_name` | string | Display name. Empty for NSE, BSE and NCOM derivatives. |
| `series` | string | Cash-equity series (`EQ`, `BE`, `A`, `B`, and so on). Empty for derivatives and indices. |
| `underlying_symbol` | string | Underlying symbol for derivatives; empty otherwise. |
| `exchange` | string | Listing exchange: `NSE`, `BSE`, `MCX` or `NCOM`. Derivatives carry the listing exchange here, so an NSE option has `exchange=NSE`; use `segment` for orders. |
| `segment` | string | The `exchange_segment` Order APIs take with `symbol`: `NSE`, `NFO`, `BSE` or `BFO`. Commodity rows carry `MCX` or `NCOM`. |
| `token` | int | Exchange-assigned numeric token. Not accepted by these APIs — always reference an instrument by `id`. |
| `instrument_type` | string | `STK`, `ETF`, `IDX`, `FUTSTK`, `FUTIDX`, `OPTSTK`, `OPTIDX` on NSE and BSE; `FUTBAS`, `FUTBLN`, `FUTENR`, `OPTFUT`, `UNDCOM` on MCX and NCOM. See [Field mappings](#field-mappings) for the proto `InstrumentType` used on the tick stream. |
| `option_type` | string | `CE` (call) or `PE` (put). Empty for non-options. |
| `expiry_date` | string | `DD-MM-YYYY` for derivatives; empty otherwise. |
| `strike_price` | decimal | Strike price in **rupees** (decimal). `0.00` for non-options, except NSE futures, which carry `-0.01`. |
| `lot_size` | int | Tradable lot size; order quantity must be a multiple of it. Usually `1` for cash equities, but some carry larger lots, such as `25000` for privately placed InvITs; `0` for indices. |
| `tick_size` | decimal | Minimum price increment in **rupees** (decimal). |
| `freeze_quantity` | int | Per-order regulatory quantity ceiling, in units; `0` if not applicable. |
| `price_precision` | int | Decimal places in a quoted price: `2` for every tradable instrument, `0` for indices. |
| `price_multiplier` | decimal | Contract value = price × quantity × `price_multiplier`. `1` for NSE and BSE instruments; commodity contracts carry their own (`100` for MCX GOLD, `0.1` for GOLDM), fractional for some. `0` for indices. |

### Field mappings

**Marketdata WS `InstrumentType`** is derived from CSV `instrument_type` + `option_type` for NSE and BSE rows:

| CSV `instrument_type` | CSV `option_type` | proto `InstrumentType` |
|---|---|---|
| `STK` | — | `STOCK` |
| `ETF` | — | `ETF` |
| `IDX` | — | `INDEX` |
| `FUTSTK` | — | `STOCK_FUT` |
| `FUTIDX` | — | `INDEX_FUT` |
| `OPTSTK` | `CE` | `STOCK_OPT_CE` |
| `OPTSTK` | `PE` | `STOCK_OPT_PE` |
| `OPTIDX` | `CE` | `INDEX_OPT_CE` |
| `OPTIDX` | `PE` | `INDEX_OPT_PE` |

### Sample records

```csv
id,isin,symbol,company_name,series,underlying_symbol,exchange,segment,token,instrument_type,option_type,expiry_date,strike_price,lot_size,tick_size,freeze_quantity,price_precision,price_multiplier
10854,,,Nifty 50,,,NSE,NSE,26000,IDX,,,0.00,0,0.00,0,0,0
12027,INE002A01018,RELIANCE,Reliance Industries,EQ,,NSE,NSE,2885,STK,,,0.00,1,0.10,0,2,1
10914,INE748C01038,3IINFOLTD-BE,3i Infotech,BE,,NSE,NSE,6240,STK,,,0.00,1,0.01,0,2,1
725069,INE002A01018,RELIANCE,Reliance Industries,A,,BSE,BSE,500325,STK,,,0.00,1,0.05,0,2,1
1914891,,NIFTY27OCT26C25000,,,NIFTY,NSE,NFO,51440,OPTIDX,CE,27-10-2026,25000.00,65,0.05,3510,2,1
1914890,,NIFTY27OCT26P25000,,,NIFTY,NSE,NFO,51441,OPTIDX,PE,27-10-2026,25000.00,65,0.05,3510,2,1
1963491,,RELIANCE23NOV26F,,,RELIANCE,NSE,NFO,61697,FUTSTK,,23-11-2026,-0.01,500,0.10,20000,2,1
2027645,,ALUMINI29JAN27,ALUMINI,,ALUMINI,MCX,MCX,587169,FUTBAS,,29-01-2027,0.00,1,0.05,150,2,1000
```

---
