Skip to content

Gateway / Add pool - Telegram sends incomplete pool payload and fails with 422 #137

Description

@rapcmia

Describe the bug

While testing the Condor /gateway -> pool management in Telegram, adding a pool failed even when the input used a valid connector format such as orca,clmm,9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B. Instead of adding the pool, the request failed with a 422 response from the Hummingbot API route.

Image
#### Condor logs 
2026-06-19 15:45:48,794 - handlers.config.gateway._shared - INFO - Pool input: network_id=solana-mainnet-beta, message_id=2782, chat_id=1474408604
2026-06-19 15:45:49,225 - handlers.config.gateway._shared - INFO - Adding pool: network_id=solana-mainnet-beta, connector=orca, pool_type=clmm, address=9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B
2026-06-19 15:45:49,230 - handlers.config.gateway._shared - ERROR - Error adding pool: 422, message=[{'type': 'missing', 'loc': ['body', 'base'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}, {'type': 'missing', 'loc': ['body', 'quote'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}, {'type': 'missing', 'loc': ['body', 'base_address'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}, {'type': 'missing', 'loc': ['body', 'quote_address'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}], url='http://localhost:8000/gateway/networks/solana-mainnet-beta/pools'
Traceback (most recent call last):
  File "/home/eddga/hummingbot/condor/latest/handlers/config/gateway/pools.py", line 781, in handle_pool_input
    await client.gateway.add_network_pool(
    ...<4 lines>...
    )
  File "/home/eddga/hummingbot/condor/latest/.venv/lib/python3.13/site-packages/hummingbot_api_client/routers/gateway.py", line 450, in add_network_pool
    return await self._post(f"/gateway/networks/{network_id}/pools", json=pool_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eddga/hummingbot/condor/latest/.venv/lib/python3.13/site-packages/hummingbot_api_client/routers/base.py", line 83, in _post
    raise aiohttp.ClientResponseError(
    ...<5 lines>...
    )
aiohttp.client_exceptions.ClientResponseError: 422, message=[{'type': 'missing', 'loc': ['body', 'base'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}, {'type': 'missing', 'loc': ['body', 'quote'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}, {'type': 'missing', 'loc': ['body', 'base_address'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}, {'type': 'missing', 'loc': ['body', 'quote_address'], 'msg': 'Field required', 'input': {'connector_name': 'orca', 'type': 'clmm', 'address': '9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B'}}], url='http://localhost:8000/gateway/networks/solana-mainnet-beta/pools'

The current Telegram add-pool flow appears to be out of sync with the HAPI. Condor prompts the user to enter only connector,pool_type,address, and the handler sends only those three fields to POST /gateway/networks/{network_id}/pools. But the Hummingbot API route now requires more pool metadata, including base, quote, base_address, and quote_address. Because of that mismatch, the add-pool flow appears to fail consistently from Telegram even when the connector and pool address are valid.

Steps to reproduce

  1. Open Condor and go to the /gateway then pool
  2. Choose a network such as solana-mainnet-beta.
  3. Try to add a pool using the prompted format connector,pool_type,address, for example orca,clmm,9tXiuRRw7kbejLhZXtxDxYs2REe43uH2e7k1kocgdM9B
  4. Observe that the request fails with 422 because the API route requires base, quote, base_address, and quote_address in the request body.

Attach required files

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions