Quotes High Usage
Get a current or historical end of day quote for a single options contract.
Endpoint
https://api.marketdata.app/v1/options/quotes/{optionSymbol}/
Method
GET
Request Example
- HTTP
- NodeJS
- Python
- Go
fetch("https://api.marketdata.app/v1/options/quotes/AAPL250117C00150000/")
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
import requests
url = "https://api.marketdata.app/v1/options/quotes/AAPL250117C00150000/"
response = requests.request("GET", url)
print(response.text)
import (
"fmt"
api "github.com/MarketDataApp/sdk-go"
)
func ExampleOptionQuoteRequest() {
quotes, err := OptionQuote().OptionSymbol("AAPL250117C00150000").Get()
if err != nil {
fmt.Print(err)
return
}
for _, quote := range quotes {
fmt.Println(quote)
}
}
Response Example
{
"s": "ok",
"optionSymbol": ["AAPL250117C00150000"],
"ask": [5.25],
"askSize": [57],
"bid": [5.15],
"bidSize": [994],
"mid": [5.2],
"last": [5.25],
"volume": [977],
"openInterest": [61289],
"underlyingPrice": [136.12],
"inTheMoney": [false],
"updated": [1665673292],
"iv": [0.3468],
"delta": [0.347],
"gamma": [0.015],
"theta": [-0.05],
"vega": [0.264],
"rho": [0.115],
"intrinsicValue": [13.88],
"extrinsicValue": [8.68]
}
Request Parameters
- Required
- Optional
-
optionSymbol
string
The option symbol (as defined by the OCC) for the option you wish to lookup. Use the current OCC option symbol format, even for historic options that quoted before the format change in 2010.
-
date
date
Use to lookup a historical end of day quote from a specific trading day. If no date is specified the quote will be the most current price available during market hours. When the market is closed the quote will be from the last trading day. Accepted date inputs:
ISO 8601
,unix
,spreadsheet
. -
from
date
Use to lookup a series of end of day quotes. From is the oldest (leftmost) date to return (inclusive). If from/to is not specified the quote will be the most current price available during market hours. When the market is closed the quote will be from the last trading day. Accepted date inputs:
ISO 8601
,unix
,spreadsheet
. -
to
date
Use to lookup a series of end of day quotes. From is the newest (rightmost) date to return (exclusive). If from/to is not specified the quote will be the most current price available during market hours. When the market is closed the quote will be from the last trading day. Accepted date inputs:
ISO 8601
,unix
,spreadsheet
.
Response Attributes
- Success
- No Data
- Error
-
s
string
Status will always be
ok
when there is data for the quote requested. -
optionSymbol
array[string]
The option symbol according to OCC symbology.
-
ask
array[number]
The ask price.
-
askSize
array[number]
The number of contracts offered at the ask price.
-
bid
array[number]
The bid price.
-
bidSize
array[number]
The number of contracts offered at the bid price.
-
mid
array[number]
The midpoint price between the ask and the bid, also known as the mark price.
-
last
array[number]
The last price negotiated for this option contract at the time of this quote.
-
volume
array[number]
The number of contracts negotiated during the trading day at the time of this quote.
-
openInterest
array[number]
The total number of contracts that have not yet been settled at the time of this quote.
-
underlyingPrice
array[number]
The last price of the underlying security at the time of this quote.
-
inTheMoney
array[booleans]
Specifies whether the option contract was in the money true or false at the time of this quote.
-
intrinsicValue
array[number]
The instrinisc value of the option.
-
extrnisicValue
array[number]
The extrinsic value of the option.
-
updated
array[number]
The date and time of this quote snapshot in Unix time.
-
iv
array[number]
The implied volatility of the option.
-
delta
array[number]
The delta of the option.
-
gamma
array[number]
The gamma of the option.
-
theta
array[number]
The theta of the option.
-
vega
array[number]
The vega of the option.
-
rho
array[number]
The rho of the option.
-
s
string
Status will be
no_data
if no candles are found for the request. -
nextTime
number
optionalUnix time of the next quote if there is no data in the requested period, but there is data in a subsequent period.
-
prevTime
number
optionalUnix time of the previous quote if there is no data in the requested period, but there is data in a previous period.
-
s
string
Status will be
error
if the request produces an error response. -
errmsg
string
An error message.