Access Token·InactiveLog in to your Public account to generate your access code.
Market Data
Get option chain
Retrieve option chain
Returns the option chain for a given instrument. Requires the `marketdata` scope. Supported types: EQUITY, UNDERLYING_SECURITY_FOR_INDEX_OPTION.
POST/userapigateway/marketdata/{accountId}/option-chain
Parameters
Path Parameters
string
Request body
Required*Parameters
Name | Type | Required | Description |
---|---|---|---|
accountId | string | Yes | - |
Body
application/jsonRequest Body
application/json
instrumentrequired
expirationDatestringrequired
The expiration date of the option chain.
Responses
Response
200
application/json
baseSymbolstringrequired
The base symbol for which the option chain belongs.
callsobject[]required
List of call quotes for the given option chain.
putsobject[]required
List of put quotes for the given option chain.
Response
400application/json
Invalid input: unsupported instrument type, nonexistent instrument, invalid account, or unauthorized access.
No response body defined
curl --request POST \
--url https://api.public.com/userapigateway/marketdata/{accountId}/option-chain \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"instrument": {
"symbol": "string",
"type": "EQUITY"
},
"expirationDate": "2023-11-07"
}'
{
"baseSymbol": "string",
"calls": [
{
"instrument": {
"symbol": "string",
"type": "EQUITY"
},
"outcome": "SUCCESS",
"last": "string",
"lastTimestamp": "2023-11-07T05:31:56Z",
"bid": "string",
"bidSize": 123,
"bidTimestamp": "2023-11-07T05:31:56Z",
"ask": "string",
"askSize": 123,
"askTimestamp": "2023-11-07T05:31:56Z",
"volume": 1234567890,
"openInterest": 1234567890
}
],
"puts": [
{
"instrument": {
"symbol": "string",
"type": "EQUITY"
},
"outcome": "SUCCESS",
"last": "string",
"lastTimestamp": "2023-11-07T05:31:56Z",
"bid": "string",
"bidSize": 123,
"bidTimestamp": "2023-11-07T05:31:56Z",
"ask": "string",
"askSize": 123,
"askTimestamp": "2023-11-07T05:31:56Z",
"volume": 1234567890,
"openInterest": 1234567890
}
]
}
The Public Individual API is for your own personal, non-commercial use. Unauthorized access is prohibited. You are responsible for all trades made via the API. Learn more