Skip to content

fix(quote): call POST /v1/quote/options/strikes for option_chain_info_by_date - #612

Merged
hogan-yuan merged 1 commit into
mainfrom
fix/option-chain-strikes-route
Oct 22, 2026
Merged

hogan-yuan merged 1 commit into
mainfrom
fix/option-chain-strikes-route

Conversation

@hogan-yuan

@hogan-yuan hogan-yuan commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Why

QuoteContext.option_chain_info_by_date has failed on every call since 5.1.0. It calls GET /v1/gemini/option/option_chain_list, which no longer exists on the gateway:

  • Api id 496 (lb-gemini-app OpenAPIOptionChain) was renamed to /quote/options/strikes on 2026-09-30, and it only accepts POST with a JSON body.
  • The old path returns 404000 api not found on every host (openapi.longbridge.com, openapi-hk, openapi-us, .cn, staging). Over the last 60 days prod shows about 1.2M requests to it and no 200 responses.
  • The US UAT for the Nov 7 beta hit this as check 3.2 (option chain returns 404000 for AAPL.US / SPY.US).

What

  • option_chain_info_by_date now sends POST /v1/quote/options/strikes with {symbol, expiry_date, standard_only} as a JSON body. standard_only is still left out when false.
  • The signature, OptionChainContract and the response parsing are unchanged, so no binding (C, C++, Java, Node.js, Python) needs a change.
  • CHANGELOG entry under Unreleased.

The MCP server and the CLI already call this route and get data back on HK prod, with the same response fields.

Testing

  • cargo check, cargo clippy --all-targets (the 3 existing warnings are in unrelated files), cargo test --lib (73 passed).
  • Not yet run against a live account with a token.

Notes

🤖 Generated with Claude Code

…_by_date

GET /v1/gemini/option/option_chain_list was renamed on the gateway and
returns 404000 api not found in every region, so the method failed on
every call since 5.1.0. Send the same fields as a JSON body to the
current route. The signature and OptionChainContract are unchanged.
hogan-yuan added a commit to longbridge/openapi-go that referenced this pull request Oct 22, 2026
@hogan-yuan
hogan-yuan merged commit 84f0389 into main Oct 22, 2026
56 checks passed
@hogan-yuan
hogan-yuan deleted the fix/option-chain-strikes-route branch October 22, 2026 09:13
hogan-yuan added a commit to longbridge/openapi-go that referenced this pull request Oct 22, 2026
…Date (#134)

## Why

`QuoteContext.OptionChainInfoByDate` has failed on every call since
v0.28.0. It calls `GET /v1/gemini/option/option_chain_list`, which no
longer exists on the gateway: api id 496 (`lb-gemini-app`
`OpenAPIOptionChain`) was renamed to `/quote/options/strikes` on
2026-09-30 and only accepts `POST` with a JSON body. The old path
returns `404000 api not found` in every region.

## What

- `OptionChainInfoByDate` now sends `POST /v1/quote/options/strikes`
with `{symbol, expiry_date, standard_only}` as a JSON body.
`standard_only` is still left out when false.
- The signature and `OptionChainContract` are unchanged.
- CHANGELOG entry under Unreleased.

Ports longbridge/openapi#612.

## Testing

- `gofmt`, `go vet ./quote/...` (existing `copylocks` warnings in
`core.go` only), `go test ./quote/...` passed.
- Not yet run against a live account with a token.

## Notes

US accounts will still get 404 until the US gateway gets the `/quote/*`
routes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant