> For the complete documentation index, see [llms.txt](https://docs.synthdata.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.synthdata.co/insights/options.md).

# Options

Use Synth API for options pricing and trading.

## Get Option Prices

{% code title="get\_option\_prices.py" %}

```python
import requests

response = requests.get(
    "https://api.synthdata.co/insights/option-pricing",
    headers={"Authorization": "Apikey YOUR_API_KEY"},
    params={"asset": "BTC"}
)

data = response.json()
current_price = data['current_price']
call_options = data['call_options']  # {"84000": 4813.78, "84500": 4313.81, ...}
put_options = data['put_options']    # {"84000": 0.0, "84500": 0.03, ...}
expiry = data['expiry_time']         # "2026-01-23 08:00:00Z"
```

{% endcode %}

## Find Mispriced Options

{% code title="find\_mispriced\_options.py" %}

```python
for strike, synth_call in call_options.items():
    market_call = get_market_price(strike)
    
    if synth_call > 0:
        edge = (market_call - synth_call) / synth_call
        
        if edge > 0.05:
            print(f"SELL {strike} call - {edge:.1%} edge")
        elif edge < -0.05:
            print(f"BUY {strike} call - {abs(edge):.1%} edge")
```

{% endcode %}

## Bull Call Spread

{% code title="bull\_call\_spread.py" %}

```python
# Buy ATM call, sell OTM call
strikes = sorted([int(k) for k in call_options.keys()])

# Find ATM (closest to current price)
atm_strike = min(strikes, key=lambda x: abs(x - current_price))

# Find OTM (5% above current price)
otm_strike = min([s for s in strikes if s > current_price * 1.05], default=strikes[-1])

cost = call_options[str(atm_strike)] - call_options[str(otm_strike)]
max_profit = (otm_strike - atm_strike) - cost
```

{% endcode %}
