-
Notifications
You must be signed in to change notification settings - Fork 138
Enable CLMM add/remove liquidity endpoints #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Enable CLMM add/remove liquidity endpoints #105
Conversation
VeXHarbinger
commented
Jan 4, 2026
- Uncommented /gateway/clmm/add and /gateway/clmm/remove endpoints in routers/gateway_clmm.py
- Updated Gateway client methods to use correct connector-specific paths
- Fixed clmm_add_liquidity() to use connectors/{connector}/clmm/add-liquidity
- Fixed clmm_remove_liquidity() to use connectors/{connector}/clmm/remove-liquidity
- Updated parameter names to match Gateway API (walletAddress instead of address)
- Uncommented /gateway/clmm/add and /gateway/clmm/remove endpoints in routers/gateway_clmm.py
- Updated Gateway client methods to use correct connector-specific paths
- Fixed clmm_add_liquidity() to use connectors/{connector}/clmm/add-liquidity
- Fixed clmm_remove_liquidity() to use connectors/{connector}/clmm/remove-liquidity
- Updated parameter names to match Gateway API (walletAddress instead of address)
|
Sorry, I fixed the routes but in retrospect, I'm not sure if it should validate the token values (ratio) to add to facilitate the add, or if the route should just accept values and a different component should calculate the token mix and the endpoint should allow for values, right or wrong. |
|
hi @VeXHarbinger ! originally I commented it to reduce complexity, but if you are going to use it we can add it. @fengtality mentioned that is not necessary to do validation here since the gateway should take care of it |
Excellent, I'm almost done with my workflow using Pancakeswap and LPs and then I have another PR that builds on this one to properly call the open/add/remove/close position. It makes sense to not have the ratio validator inside, i'm writing a seperate fn, I just found all that trial and error annoying. Unless I was calling the wrong ite,. TYVM for all your hard work! Much appreciated |
|
Sorry I branched off of main not development I'll re-do this and issue another PR. I just read the submission outline. |
|
@cardosofede and @fengtality REALLY REALLY Sorry for any confusion and notification spam related to this PR ()opening/closing/opening ... However, The contribution guide wants features branched from develop however my changed files (routers/gateway_clmm.py and services/gateway_client.py) only exist in Main and not in development, yet. I'll reopen this and let you decide a/the path forwards. I just know that the next PR I'll be issuing uses these changes in extending the functionality for LP positions on PancakeSwap. Again I apologize for all the hubbub in my attempts to contribute. Pretty much in most aspects of life I always tend to be a data outlier. If there is a quantum abyss within a mile of me, I'll find an absurd way to fall into it backwards. Sorry again for the verbosity & confusion |
|
no problem, thanks a lot for your contribution! I will try to improve the
Gateway docs and standardize the API so that it will be easier to
contribute in the future. let me know if you have any questions or
suggestions for the codebase.
…On Mon, Jan 5, 2026, 11:31 PM Alex Pearlstein ***@***.***> wrote:
*VeXHarbinger* left a comment (hummingbot/hummingbot-api#105)
<#105 (comment)>
@cardosofede <https://github.com/cardosofede> and @fengtality
<https://github.com/fengtality> REALLY REALLY Sorry for any confusion and
notification spam related to this PR ()opening/closing/opening ... However,
The contribution guide wants features branched from develop however my
changed files (routers/gateway_clmm.py and services/gateway_client.py) only
exist in Main and not in development, yet. I'll reopen this and let you
decide a/the path forwards. I just know that the next PR I'll be issuing
uses these changes in extending the functionality for LP positions on
PancakeSwap.
Again I apologize for all the hubbub in my attempts to contribute. Pretty
much in most aspects of life I always tend to be a data outlier. If there
is a quantum abyss within a mile of me, I'll find an absurd way to fall
into it backwards.
So while I've used it to my advantage to learn a vast array if triage
skills to identify and resolve issues, it does have the side effect of
turning introductions into much more complex events than just a simple
hello.
Sorry again for the verbosity & confusion
—
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANWHVXSUWNVHAL3KEHGNTT4FNQGJAVCNFSM6AAAAACQVJNKUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMJTGUYDONJRHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@VeXHarbinger the contributions are wrong... just do it for main. btw @VeXHarbinger pls check https://github.com/hummingbot/hummingbot-api-client you can install it by pip install hummingbot-api-client and has a very nice structure to interact with teh routers like: |
As far as I had been able to get into my workflow the AI first flagged the commented out endpoints but then it found some issues with the open/add to liquidity position that was the need for what my 2nd PR will contain for the gateway. I forget ATM if they just weren't completed or it was a route name/path overlap. Of course I'll confirm it's missing/needed before I issue a PR. As for this one, I did create tests as well but didn't add them to the PR. I 2x check before I do the PR for that (FYI the 2nd link under the dev chnl on the Hummingbot Discord is a link to the dev docs, but is broken) If the tests are prefered to be included I'll pass them along as well. As for this though, it should be self contained and GTG. Thanks for the time, I do appreciate it and the product of your efforts and will do my best to conform to the contribution guidelines and help it all grow. I haven't gotten the API client up and running yet, just the dashboard, gateway, API, and MCP. Unfortunately, my learning path is driven towards a goal and your infobase is a bit amorphous. When I know what I want to learn, the info is easily available/accessible. However, when actual work does arise and I need to put this on pause, it's always a bit uneasy starting up again for I'm not sure about paradigm changes occured in-between releases and what needs to be purged from my working sandbox to embrace the new clients. I suppose the best way is to just join the community, so I'm lingering about in discord so that I can get the gist of the current dev paths |
|
@cardosofede Just in case I'm wasting time re-inventing the wheel with my current workflow; My whole goal to kick off a process for when my LP current price is approaching the limits of my LP position range. Then it closes the position, rebalances my token ratio correctly and reopens a new position for my given range %, then some data refinement in there to optimize. It was the endpoints for open position/add liquidity the rhe AI stated didn't match PancakeSwaps fn signature and is what I'm going to branch and complete next. Are these calls all in the API Client? I love to pitch in where I can, which is why I did this PR rather than just fix it for myself, but I'd hate to waste effort in creating functions that already live elsewhere. Id much rather put in some effort on things that aren't already fixed and where the other devs didn't have the bandwidth to waste the time and do |
|