Repository navigation
fix(quote): call POST /v1/quote/options/strikes for option_chain_info_by_date - #612
Merged
Merged
Conversation
…_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
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
QuoteContext.option_chain_info_by_datehas failed on every call since 5.1.0. It callsGET /v1/gemini/option/option_chain_list, which no longer exists on the gateway:lb-gemini-appOpenAPIOptionChain) was renamed to/quote/options/strikeson 2026-09-30, and it only acceptsPOSTwith a JSON body.404000 api not foundon 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.What
option_chain_info_by_datenow sendsPOST /v1/quote/options/strikeswith{symbol, expiry_date, standard_only}as a JSON body.standard_onlyis still left out when false.OptionChainContractand the response parsing are unchanged, so no binding (C, C++, Java, Node.js, Python) needs a change.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).Notes
/quote/*routes.🤖 Generated with Claude Code