feat / gateway update pool API to use chain+network organization#155
Merged
Conversation
- Update gateway_client to use chain+network as primary keys for pool operations
- get_pools: add chain parameter, connector becomes optional filter
- add_pool: add chain parameter
- remove_pool: change from connector to chain parameter
- Add new network-based pool endpoints: GET/POST/DELETE /networks/{network_id}/pools
- Deprecate legacy /pools endpoints (still functional for backward compatibility)
- Update models to reflect new API structure
This aligns with Gateway API changes that organize pools by network
instead of by DEX connector.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 task
- Simplify CLMMPoolListItem to match Gateway response format - Update CLMMPoolListResponse to use pageSize instead of limit - Add gateway_base_url to AccountsService - Remove Query aliases to match client parameter names - Remove is_verified field (not available from Gateway) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This was referenced Apr 29, 2026
Previously, portfolio state refresh=true did not actually fetch fresh balances from exchanges - it only read cached connector data. Changes: - _get_connector_tokens_info now calls connector._update_balances() - Added skip_balance_refresh param to avoid double fetch in background loop - Errors during balance refresh log warning and use stale data gracefully - Added tests for refresh behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…list
- Add POST /gateway/networks/{network_id}/tokens/save/{token_address} endpoint
- Update get_gateway_wallets to include default_address for each chain
- Fix gateway_client save_token to pass json={} for correct content-type
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add GET /gateway/apiKeys to retrieve all configured API keys - Add POST /gateway/apiKeys to update API keys - Add UpdateApiKeysRequest model - Add get_api_keys() and update_api_keys() to gateway_client Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
rapcmia
approved these changes
May 8, 2026
Contributor
There was a problem hiding this comment.
- Build local hummingbot lib from hummingbot/hummingbot#8206
- Build local docker images for this PR and hummingbot/gateway#630
- Start hummingbot-api via
make deployok - Tested GET and POST /gateway/apiKeys on port 8000 ok
- GET returns current keys.
- POST successfully updated helius and infura.
- Values are consistent with ./gateway-files/conf/apiKey.yml.
- Manual pool-listing tests on solana-mainnet-beta for meteora, orca, and raydium (CLMM context) ok
- Meteora and Orca address lookup works via GET /gateway/clmm/pools.
- Raydium CLMM lookup works via GET /gateway/networks/{network_id}/pools?connector=raydium&pool_type=clmm (Raydium is not supported by GET /gateway/clmm/pools).
- Token save test: passed.
- POST /gateway/networks/solana-mainnet-beta/tokens/save/2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo succeeded and added PYUSD.
- Verification via GET /gateway/networks/solana-mainnet-beta/tokens confirms token is present.
- Test lp executor using meteora ok
- LP executor creation passed for Meteora SOL-USDC
- Executor lifecycle was validated end to end
- RUNNING (in range, position created
- Stop request accepted (/executors/{executor_id}, keep_position=true)
- TERMINATED (close_type=POSITION_HOLD)
- Portfolio/Balances
- portfolio/state with refresh:true was verified after a real SOL -> USDC swap and reflected updated balances.
- Multi-exchange + Gateway balance queries were verified with Binance + Solana balances returned, and Gateway wallets confirmed (Solana + Ethereum).
- For ethereum, add preferred network to
default_networksofethereum-mainnet
- For ethereum, add preferred network to
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
gateway_base_urlattribute to AccountsServicepageSizeinstead oflimit/gateway/apiKeysendpoints for RPC provider API key managementget_api_keys()andupdate_api_keys()methods to gateway_clientUpdateApiKeysRequestmodelNew Endpoints
GET /gateway/apiKeys
Returns all configured API keys from Gateway:
{ "helius": "46951ec2-16af-4fc0-a5df-970b0eb925b7", "infura": "920646320ec3463fa1b5235be9fa48d3", "coingecko": "CG-Rw786jTpNmV1MvRrqpDAHR6r", "etherscan": "" }POST /gateway/apiKeys
Update API keys in Gateway configuration:
{ "api_keys": { "helius": "new-api-key", "infura": "another-key" } }Response:
{ "success": true, "message": "Updated 2 API key(s). Restart Gateway for changes to take effect.", "restart_required": true, "restart_endpoint": "POST /gateway/restart", "updated_keys": ["helius", "infura"] }Related PRs
Test plan
🤖 Generated with Claude Code