Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hummingbot_api_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
from .sync_client import SyncHummingbotAPIClient
from .ws import MarketDataWebSocket, ExecutorsWebSocket, WebSocketRouter

__version__ = "1.5.7"
__version__ = "1.5.8"
__all__ = ["HummingbotAPIClient", "SyncHummingbotAPIClient", "MarketDataWebSocket", "ExecutorsWebSocket", "WebSocketRouter"]
24 changes: 17 additions & 7 deletions hummingbot_api_client/routers/gateway_clmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ async def get_pool_info(
self,
connector: str,
network: str,
pool_address: str
pool_address: str,
bin_count: int = 0
) -> Dict[str, Any]:
"""
Get detailed information about a CLMM pool by pool address.
Expand All @@ -21,28 +22,37 @@ async def get_pool_info(
connector: CLMM connector (e.g., 'meteora', 'raydium')
network: Network ID in 'chain-network' format (e.g., 'solana-mainnet-beta')
pool_address: Pool contract address
bin_count: If > 0, include the per-tick liquidity distribution (`bins`)
around the active price. Meteora always returns its bins and ignores
this; orca, raydium, uniswap and pancakeswap compute them on request.
Defaults to 0, which skips the extra on-chain reads.

Returns:
Pool information including liquidity, price, bins (for Meteora), etc.
Pool information including liquidity, price, and bins.
All field names are returned in snake_case format.

Raises:
HTTPError (400): For Raydium, returns error if pool is a Standard AMM pool
instead of a CLMM pool. This endpoint only supports Concentrated
Liquidity (CLMM) pools.

Example:
pool_info = await client.gateway_clmm.get_pool_info(
connector='meteora',
network='solana-mainnet-beta',
pool_address='2sf5NYcY4zUPXUSmG6f66mskb24t5F8S11pC1Nz5nQT3'
)

# With the bin distribution around the active price
pool_info = await client.gateway_clmm.get_pool_info(
connector='orca',
network='solana-mainnet-beta',
pool_address='Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE',
bin_count=11
)
"""
params = {
"connector": connector,
"network": network,
"pool_address": pool_address
}
if bin_count:
params["bin_count"] = bin_count
return await self._get("/gateway/clmm/pool-info", params=params)

async def get_pools(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "hummingbot-api-client"
version = "1.5.7"
version = "1.5.8"
description = "An async Python client for Hummingbot API"
readme = "README.md"
requires-python = ">=3.8"
Expand Down