> For the complete documentation index, see [llms.txt](https://docs.clickoptions.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clickoptions.ai/api/instruments-controller.md).

# Instruments Controller

## Get options instruments

> Returns a list of OPTIONS instrumens with optional filtering

```json
{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"tags":[],"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"paths":{"/v1/instrument/{type}":{"get":{"tags":["instruments-controller"],"summary":"Get options instruments","description":"Returns a list of OPTIONS instrumens with optional filtering","operationId":"getOptionsInstruments","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"searchDto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/InstrumentSearchDto"}}],"responses":{"200":{"description":"Successfully retrieved result","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstrumentOptionDto"}}}}},"500":{"description":"Internal server error"}}}}},"components":{"schemas":{"InstrumentSearchDto":{"type":"object","properties":{"search":{"type":"string","description":"Search query string"},"pageNumber":{"type":"integer","format":"int32","default":0,"description":"Page number (zero-based)"},"pageSize":{"type":"integer","format":"int32","default":40,"description":"Page size (number of items per page)"},"wl":{"type":"integer","format":"int32","description":"Whitelist filter value"},"sortByField":{"type":"string","description":"Field to sort by"},"sortByDirection":{"type":"string","description":"Sort direction (ASC or DESC)","enum":["ASC","DESC"]},"symbol":{"type":"string"},"name":{"type":"string"},"baseCurrency":{"type":"string"},"quoteCurrency":{"type":"string"},"instrumentType":{"type":"string"},"isActive":{"type":"boolean"},"isTradable":{"type":"boolean"}}},"InstrumentOptionDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"symbol":{"type":"string","maxLength":2147483647,"minLength":3},"name":{"type":"string","maxLength":2147483647,"minLength":3},"baseCurrencyCode":{"type":"string","minLength":1},"quoteCurrencyCode":{"type":"string","minLength":1},"priceScale":{"type":"integer","format":"int32","maximum":8,"minimum":0},"amountScale":{"type":"integer","format":"int32","maximum":8,"minimum":0},"active":{"type":"boolean"},"tradable":{"type":"boolean"},"instrumentType":{"type":"string"},"description":{"type":"string"},"wl":{"type":"integer","format":"int32"},"lotAmountMult":{"type":"number","maximum":100000,"minimum":0.0001},"source":{"type":"string"},"contractAmount":{"type":"number","maximum":1000000,"minimum":0.0001},"makerFeeRate":{"type":"number","maximum":1,"minimum":0},"takerFeeRate":{"type":"number","maximum":1,"minimum":0},"liquidationFeeRate":{"type":"number","maximum":1,"minimum":0},"minQty":{"type":"number","minimum":0},"maxQty":{"type":"number","minimum":0},"stepQty":{"type":"number","minimum":0},"initialMargin":{"type":"number","minimum":0},"maintenanceMargin":{"type":"number","minimum":0},"commissionPolicyId":{"type":"string","maxLength":50,"minLength":0},"iconUrl":{"type":"string","maxLength":255,"minLength":0}},"required":["amountScale","baseCurrencyCode","contractAmount","instrumentType","name","priceScale","quoteCurrencyCode","symbol"]}}}}
```

## GET /v1/instrument/{type}/{symbol}/depth

> Get instrument OrderBook (Depth) data

```json
{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"tags":[],"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"paths":{"/v1/instrument/{type}/{symbol}/depth":{"get":{"tags":["instruments-controller"],"summary":"Get instrument OrderBook (Depth) data","operationId":"getOptionsExchangeInfoDepth","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"symbol","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved OrderBook data","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderBook"}}}},"500":{"description":"Internal server error"}}}}},"components":{"schemas":{"OrderBook":{"type":"object","properties":{"i":{"type":"string"},"T":{"type":"integer","format":"int64"},"u":{"type":"integer","format":"int64"},"bids":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"asks":{"type":"array","items":{"type":"array","items":{"type":"string"}}}}}}}}
```

## Get options symbols

> Returns a list of Option symbols with optional filtering

```json
{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"tags":[],"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"paths":{"/v1/instrument/{type}/{instrument}":{"get":{"tags":["instruments-controller"],"summary":"Get options symbols","description":"Returns a list of Option symbols with optional filtering","operationId":"getOptionsSymbols","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string"}},{"name":"dto","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OptionExchangeSearchDto"}}],"responses":{"200":{"description":"Successfully retrieved result","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OptionsExchangesCollectionDto"}}}},"500":{"description":"Internal server error"}}}}},"components":{"schemas":{"OptionExchangeSearchDto":{"type":"object","description":"Search criteria for option exchange queries","properties":{"searchString":{"type":"string","description":"Free text search string"},"pageNumber":{"type":"integer","format":"int32","description":"Page number (zero-based)"},"pageSize":{"type":"integer","format":"int32","description":"Number of items per page"},"sortBy":{"type":"array","description":"Sorting criteria list","items":{"$ref":"#/components/schemas/SortingDto"}},"symbol":{"type":"string","description":"Option symbol"},"expiryDateFrom":{"type":"string","format":"date-time","description":"Start of expiry date range (yyyy-MM-dd)"},"expiryDateTo":{"type":"string","format":"date-time","description":"End of expiry date range (yyyy-MM-dd)"},"side":{"type":"string","description":"Option side (CALL or PUT)","pattern":"CALL|PUT"},"strikePriceFrom":{"type":"number","description":"Minimum strike price"},"strikePriceTo":{"type":"number","description":"Maximum strike price"}}},"SortingDto":{"type":"object","description":"Sorting criteria for search results","properties":{"field":{"type":"string","description":"Field name to sort by"},"direction":{"type":"string","description":"Sort direction (ASC or DESC)","enum":["ASC","DESC"]}}},"OptionsExchangesCollectionDto":{"type":"object","properties":{"call":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeInfoDto"}},"put":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeInfoDto"}}}},"ExchangeInfoDto":{"type":"object","description":"Exchange information data transfer object","properties":{"expiryDate":{"type":"integer","format":"int64","description":"Expiry date as epoch millis"},"createdAt":{"type":"integer","format":"int64","description":"Creation date as epoch millis"},"symbol":{"type":"string","description":"Trading symbol"},"side":{"type":"string","description":"Option side (CALL/PUT)","enum":["PUT","CALL"]},"strikePrice":{"type":"string","description":"Strike price"},"underlying":{"type":"string","description":"Underlying asset"},"minQty":{"type":"string","description":"Minimum order quantity"},"maxQty":{"type":"string","description":"Maximum order quantity"},"stepQty":{"type":"string","description":"Order quantity step"},"priceScale":{"type":"integer","format":"int32","description":"Number of decimal places for price"},"quantityScale":{"type":"integer","format":"int32","description":"Number of decimal places for quantity"},"quoteAsset":{"type":"string","description":"Quote asset"},"bid":{"$ref":"#/components/schemas/QuoteDto","description":"Best bid quote"},"ask":{"$ref":"#/components/schemas/QuoteDto","description":"Best ask quote"},"indexPrice":{"type":"string","description":"Current index price"},"deleted":{"type":"boolean","description":"Whether the exchange info is deleted"}}},"QuoteDto":{"type":"object","description":"Quote data transfer object","properties":{"price":{"type":"string","description":"Quote price"},"qty":{"type":"string","description":"Quote quantity"}}}}}}
```

## Get option expiration dates

> Returns a list of expiration dates im milleseconds from epoch

```json
{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"tags":[],"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"paths":{"/v1/instrument/{type}/{instrument}/expirations":{"get":{"tags":["instruments-controller"],"summary":"Get option expiration dates","description":"Returns a list of expiration dates im milleseconds from epoch","operationId":"getOptionsExpirations","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"instrument","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved result","content":{"*/*":{"schema":{"type":"array","items":{"type":"integer","format":"int64"}}}}},"500":{"description":"Internal server error"}}}}}}
```

## Get instrument types

> Returns a list of instruments types.

```json
{"openapi":"3.1.0","info":{"title":"fintp-public-api","version":"0.0.1"},"tags":[],"servers":[{"url":"https://api.clickoptions.ai/api","description":"Generated server url"}],"paths":{"/v1/instrument/types":{"get":{"tags":["instruments-controller"],"summary":"Get instrument types","description":"Returns a list of instruments types.","operationId":"getTypes","responses":{"200":{"description":"Successfully retrieved instrument types","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstrumentTypeDto"}}}}},"500":{"description":"Internal server error"}}}}},"components":{"schemas":{"InstrumentTypeDto":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}}}}}}
```
