400: Invalid Option Symbol
Use this page when you receive a 400 BAD REQUEST with:
{
"s": "error",
"errmsg": "Invalid option symbol. Use valid OCC symbology for the option symbol."
}
If you need the broader 400 troubleshooting flow, start here:
What This Error Means
The endpoint and query string can be valid, but the optionSymbol itself is not valid OCC format.
OCC Option Symbol Format
Expected format:
UNDERLYING + YYMMDD + C/P + STRIKE
Example:
AAPL250117C00150000
Field rules:
UNDERLYING: Root symbol (for exampleAAPL,SPY,INTC)YYMMDD: Expiration date (2-digit year, month, day)C/P:Cfor call orPfor putSTRIKE: 8 digits, zero-padded, implied 3 decimal places
Strike Encoding Reference
The strike is represented as an integer with three implied decimal places.
Examples:
150becomes0015000032.5becomes0003250032.25becomes00032250
Common Construction Errors
- Expiration is not in
YYMMDD - Missing call/put flag (
CorP) - Strike field is not 8 digits
- Strike is not zero-padded
- Decimal strike is encoded incorrectly
- Legacy pre-2010 style symbol is used
Validate Before Calling Quotes/History
Use the lookup endpoint to build/validate a symbol first.
# Build/validate OCC symbol from human-readable contract
GET https://api.marketdata.app/v1/options/lookup/AAPL%201/17/2025%20150%20Call
# Then request data with the returned optionSymbol
GET https://api.marketdata.app/v1/options/quotes/AAPL250117C00150000/
400 vs 404 for Options
400: the option symbol format is invalid404: format is valid, but no matching contract/data was found
Quick Debug Checklist
- Log the exact
optionSymbolyour client sent - Check
YYMMDD,C/P, and 8-digit strike encoding - Validate with
options/lookup - Reuse the exact returned symbol in follow-up requests