---
title: "Custom option pricer"
method: POST
path: "/optionprice"
tags: ["options"]
---

# Custom option pricer

`POST /optionprice`

## Request

- Base URL: `https://api.merqurian.com`
- URL: `https://api.merqurian.com/optionprice`
- Auth: none declared
- TypeScript: <https://skmtc.dev/merqube/apis/merqube-api/docs/optionprice/post.ts> (a function with typed inputs; its response is checked against the schema)

MERQUBE OPTIONPRICE API returns the price of a custom option, the implied volatility (vol), implied interest rate (interest_rate), implied dividend yield (dividend_yield), and the option greeks (delta, vega, theta, and gamma). The API requires the underlying (root), date on which the pricing is desired (asofdate), strike of the custom option (strike), expiration (expiry), the type of the option (otype) [Put/Call], and the exercise type (etype)[European/American].

## Request body

- object
  - `asofdate` string, date, required: The date as of which the price of the option is being requested. Any date between 01-10-2005 and the most recent trading date of the underlying asset.
  - `etype` 'European' | 'American', required: The option exercise type is either “European”, which can only be exercised at expiration, or “American”, which can be exercised at any time up to and including the expiration date.
  - `expiry` string, date, required: The expiry or expiration date is the date on which the options contract expires. Any date between 01-10-2005 and the expiration date of the longest dated options series on the given underlying asset.
  - `extrapolation_days` integer: This parameter allows the pricing of the option to use an implied dividend schedule to be moved forward by the number of days specified in this parameter. Any number greater than or equal to zero. Default value is zero.
  - `otype` 'put' | 'call', required: The option type refers to whether an option is a put option or a call option.
  - `request_id` string: This request id is returned back to the sender in the response
  - `root` 'SPY' | 'TLT' | 'QQQ' | 'IWM', required: Code for the underlying instrument on which the option is priced.
  - `scale_dividend` number: Allows all of the dividends in the implied dividend schedule to be scaled by this input parameter. Any number greater than zero and less than 5. Default value is one.
  - `strike` number, required: Strike of the option being priced. Any number greater than zero.
  - `volatility_shift` number: Allows the user to change the implied volatility that is used to compute the price of the option (calculated from the volatility surface) by adding the input value to the one computed. For example, if the parameter provided is 0.1, the implied volatility used to calculate the option price would add 10% to the implied volatility calculated internally from the volatility surface. Number between -0.25 and 0.25, default value of zero.

## Response `200`

200 response

- OptionResponse
  - `bid_ask_spread` number: Spread between Bid and Ask prices of the option being priced
  - `delta` number: Delta of this option
  - `dividend_yield` number: Implied Dividend Yield for the underlying
  - `gamma` number: Gamma of the option being priced
  - `interest_rate` number: Implied Interest Rate
  - `price` number: Option Price
  - `request_id` string: Request ID sent in the request
  - `spot` number: Underlying spot price
  - `theta` number: Theta of the option being priced
  - `vega` number: Vega of the option being priced
  - `vol` number: Implied Volatility

---

[API](https://skmtc.dev/merqube/apis/merqube-api.md) - [All operations](https://skmtc.dev/merqube/apis/merqube-api/llms.txt) - [OpenAPI document](https://skmtc.dev/merqube/apis/merqube-api/revisions/20f47ca36587?raw)
