> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://okx-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://okx-demo.ferndocs.com/_mcp/server.

# Get option market data

GET https://www.okx.com/api/v5/public/opt-summary

Retrieve option market data (Greeks and implied volatilities) for an underlying or instrument family.

Reference: https://okx-demo.ferndocs.com/api/api-reference/public-data/get-opt-summary

## Request

### Query parameters

- `uly` (string, optional) — Underlying, e.g. BTC-USD. Either uly or instFamily is required; if both are passed, instFamily is used.
- `instFamily` (string, optional) — Instrument family, e.g. BTC-USD. Either uly or instFamily is required.
- `expTime` (string, optional) — Contract expiry date, the format is YYMMDD, e.g. 200527.

## Response

### 200

Successful response

- `code` (string, optional) — Result code. `0` means success; any other value is an error code.
- `msg` (string, optional) — Error message. Empty on success.
- `data` (list of ApiV5PublicOptSummaryGetResponsesContentApplicationJsonSchemaDataItems, optional)

## Types

### ApiV5PublicOptSummaryGetResponsesContentApplicationJsonSchemaDataItems

- `instType` (string, optional) — Instrument type, OPTION.
- `instId` (string, optional) — Instrument ID, e.g. BTC-USD-200103-5500-C.
- `uly` (string, optional) — Underlying, e.g. BTC-USD.
- `delta` (string, optional) — Sensitivity of option price to uly price (BS).
- `gamma` (string, optional) — Rate of change in delta with respect to uly price (BS).
- `theta` (string, optional) — Sensitivity of option price to remaining maturity (BS).
- `vega` (string, optional) — Sensitivity of option price to implied volatility (BS).
- `deltaBS` (string, optional) — Sensitivity of option price to uly spot price in the Black-Scholes model.
- `gammaBS` (string, optional) — Rate of change in deltaBS with respect to uly spot price.
- `thetaBS` (string, optional) — Sensitivity of option price to remaining maturity in the Black-Scholes model.
- `vegaBS` (string, optional) — Sensitivity of option price to implied volatility in the Black-Scholes model.
- `realVol` (string, optional) — Realized volatility (not currently used).
- `bidVol` (string, optional) — Bid implied volatility.
- `askVol` (string, optional) — Ask implied volatility.
- `markVol` (string, optional) — Mark implied volatility.
- `lever` (string, optional) — Leverage.
- `fwdPx` (string, optional) — Forward price.
- `ts` (string, optional) — Data update time, Unix timestamp in milliseconds.

## Examples

**Response**

```json
{
  "code": "0",
  "msg": "",
  "data": [
    {
      "instType": "OPTION",
      "instId": "BTC-USD-220309-33000-C",
      "uly": "BTC-USD",
      "delta": "0.8310206676289528",
      "gamma": "-1.1965483553276135",
      "theta": "-0.0014131955002093717",
      "vega": "0.000018173851073258973",
      "deltaBS": "0.9857332101544538",
      "gammaBS": "0.000011933182397798109",
      "thetaBS": "-66.03526900575946",
      "vegaBS": "0.7089307622132419",
      "realVol": "0",
      "bidVol": "0",
      "askVol": "3.7207056835937498",
      "markVol": "1.5551965233045728",
      "lever": "0",
      "fwdPx": "39016.8143629068452065",
      "ts": "1646733631242",
      "volLv": "0"
    },
    {
      "instType": "OPTION",
      "instId": "BTC-USD-220309-33000-P",
      "uly": "BTC-USD",
      "delta": "-0.014668822072611904",
      "gamma": "0.49483062407551576",
      "theta": "-0.0014131955002093717",
      "vega": "0.000018173851073258973",
      "deltaBS": "-0.01426678984554619",
      "gammaBS": "0.000011933182397798109",
      "thetaBS": "-54.93377294845015",
      "vegaBS": "0.7089307622132419",
      "realVol": "0",
      "bidVol": "0",
      "askVol": "1.7968814062499998",
      "markVol": "1.5551965233045728",
      "lever": "0",
      "fwdPx": "39016.8143629068452065",
      "ts": "1646733631242",
      "volLv": "0"
    }
  ]
}
```

**SDK Code**

```python publicData_getOptSummary_example
import requests

url = "https://www.okx.com/api/v5/public/opt-summary"

response = requests.get(url)

print(response.json())
```

```javascript publicData_getOptSummary_example
const url = 'https://www.okx.com/api/v5/public/opt-summary';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go publicData_getOptSummary_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://www.okx.com/api/v5/public/opt-summary"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby publicData_getOptSummary_example
require 'uri'
require 'net/http'

url = URI("https://www.okx.com/api/v5/public/opt-summary")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java publicData_getOptSummary_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://www.okx.com/api/v5/public/opt-summary")
  .asString();
```

```php publicData_getOptSummary_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://www.okx.com/api/v5/public/opt-summary');

echo $response->getBody();
```

```csharp publicData_getOptSummary_example
using RestSharp;

var client = new RestClient("https://www.okx.com/api/v5/public/opt-summary");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift publicData_getOptSummary_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://www.okx.com/api/v5/public/opt-summary")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```