Merged
Conversation
aflament
reviewed
Feb 11, 2025
Comment on lines
+31
to
+34
| "Get the current price of a token pair from available DEXes. " | ||
| "Returns a list of TokenPriceResult object. " | ||
| "Result is expressed in amount of token_out per token_in. " | ||
| "Examples: 'Get the price of ETH in USDC on ethereum', 'Get the price of GIGA in SOL on solana'" |
Contributor
There was a problem hiding this comment.
Suggested change
| "Get the current price of a token pair from available DEXes. " | |
| "Returns a list of TokenPriceResult object. " | |
| "Result is expressed in amount of token_out per token_in. " | |
| "Examples: 'Get the price of ETH in USDC on ethereum', 'Get the price of GIGA in SOL on solana'" | |
| "Get the current price of a token pair from available DEXes." | |
| "Returns a list of TokenPriceResult object." | |
| "Result is expressed in amount of token_out per token_in." | |
| "Examples: 'Get the price of ETH in USDC on ethereum', 'Get the price of GIGA in SOL on solana'" |
Contributor
Author
There was a problem hiding this comment.
This multiline string would actually render better with the extra spaces at the end
aflament
reviewed
Feb 11, 2025
|
|
||
| def get_token_info_by_address_or_none(self, address: str) -> Optional[TokenInfo]: | ||
| """Get token info from its address, returning None if not found""" | ||
| return next((token for token in self.tokens.values() if token.address == address), None) |
Contributor
There was a problem hiding this comment.
to_lower() to compare addresses?
Contributor
Author
There was a problem hiding this comment.
I'd rather not as some chains or contracts may be case sensitive
ethancjackson
added a commit
that referenced
this pull request
Feb 12, 2025
* Add new API endpoint for AlchemyClient (#54) alchemy_getAssetTransfers * Update ruff and mypi (#55) * README improvements (#52) * Improvements to README * improved prompt for token price tool (#57) * Fix LLMFunction caching test (#58) * Refactor replace quote base (#56) * token_in and token_out for quote * replace base and quote in swap * clean up * fix IT * Update alphaswarm/services/exchanges/base.py Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Update alphaswarm/services/exchanges/base.py Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Update alphaswarm/services/exchanges/uniswap/uniswap_client_base.py Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Update alphaswarm/services/exchanges/uniswap/uniswap_client_v2.py Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Update alphaswarm/services/exchanges/uniswap/uniswap_client_v3.py Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Update alphaswarm/tools/exchanges/get_token_price_tool.py Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Update tests/integration/services/exchanges/uniswap/test_uniswap_client_v3.py Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Update uniswap_client_base.py * clean up --------- Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> * Feature modify PriceTool with token address (#60) * Use contract address for token price tool * Update description * Doctring typo * [Portfolio] Add support to `alchemy_getTokenBalances` (#61) * [Portfolio] Add support to `alchemy_getTokenBalances` * Update test_alchemy_client.py * Add UT * Update test_alchemy.py * Refactor tools to use token address (#62) * add `GetTokenAddress` tool * Update terminal.py * token addresses for get_token_price and dex quote * swap tool to use token address * revert services to use TokenInfo * Update test_get_token_address.py * lint * Update test_web3_client.py * lint * fix (#63) * Feature readme improvements (#59) * Add links & notes * Add docstring to AlphaSwarmAgent * Updates for usage * Return model_id parameter for clarity * Organize examples/ and more instructions into separate README.md * Address comments * Example script modifications (#65) * Update telegram_bot.py * Update telegram_bot.py * Update telegram_bot.py * Update telegram_bot.py * Update telegram_bot.py * Update telegram_bot.py * Update telegram_bot.py --------- Co-authored-by: Arnaud Flament <arnaud.flament@gmail.com> * add retries for some EVM functions (#66) * add retries for some EVM functions * add retry delay * refactor and more test related to PR-66 (#68) * refactor and add more tests on EVMClient * lint * Update .env.example * Update python.yaml * Update test_evm_client.py --------- Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com> Co-authored-by: david <dvdmllr@outlook.com> Co-authored-by: Nikolaiev Dmytro <nikolaevdmitryprog@gmail.com> Co-authored-by: Guillaume Koch <39165367+gkoch78@users.noreply.github.com> Co-authored-by: dan-kur <95598696+dan-kur@users.noreply.github.com> Co-authored-by: PM <70244162+pandaring2you@users.noreply.github.com> Co-authored-by: Arnaud Flament <arnaud.flament@gmail.com>
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.
No description provided.