feat(clmm): bin_count on get_pool_info (1.5.8) - #25
Open
fengtality wants to merge 1 commit into
Open
Conversation
get_pool_info could not request the per-tick liquidity distribution, so callers wanting bins had to bypass the client and hit the endpoint directly. It now forwards bin_count, which hummingbot-api passes to Gateway. Meteora always returns its bins and ignores it; orca, raydium, uniswap and pancakeswap compute them on request, so the default of 0 keeps pool-info cheap. Also drops the stale note about Raydium rejecting Standard AMM pools — that came from hummingbot-api's direct-Raydium-API path, which has been removed in favour of routing every CLMM connector through Gateway. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 13, 2026
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.
Summary
Adds
bin_counttogateway_clmm.get_pool_infoso callers can request a pool's per-tick liquidity distribution, and bumps the package to 1.5.8.Until now the method could not ask for bins at all. Meteora returns its own
binsunconditionally, so it appeared to work — but every other CLMM connector computes them only on request, and there was no way to make that request through the client. Callers who wanted bins had to bypass the typed method and hit the endpoint directly.The parameter is only sent when non-zero, so existing calls are byte-identical on the wire.
Also drops a stale note in the docstring claiming Raydium returns 400 for Standard AMM pools — that behaviour came from hummingbot-api's direct-Raydium-API path, which hummingbot/hummingbot-api#217 removes in favour of routing every CLMM connector through Gateway.
Requires
bin_countis forwarded by hummingbot/hummingbot-api#217 to Gateway's unified/trading/clmm/pool-info, which learnsbinCountin hummingbot/gateway#679. Against an older API server the parameter is ignored, not an error.Companion PRs
docs/retry-architecture.md(in the gateway PR)binCounton unified CLMM pool-infoPOSITION_HOLD, fresh position reads, bounded pending-tx pollingbin_countpassthrough, Raydium routed through Gatewaybin_countonget_pool_info(1.5.8)bin_countonget_pool_infoValidation
Verified against a live mainnet stack (Gateway + hummingbot-api deployed from the companion branches):
bin_count=61returns 61 populated bins for orca, raydium, uniswap and pancakeswap, while Meteora keeps returning its own 141 and ignores the parameter.bin_count=0returns none for all of them.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mt84XBEMVxbbyMG8fDxDKj