Goat plugin for uniswap
Project description
Uniswap Plugin for GOAT SDK
A plugin for the GOAT SDK that provides Uniswap DEX functionality for token swaps and liquidity operations.
Installation
# Install the plugin
poetry add goat-sdk-plugin-uniswap
# Install required dependencies
poetry add goat-sdk-wallet-evm
poetry add goat-sdk-plugin-erc20
Usage
from goat_plugins.uniswap import uniswap, UniswapPluginOptions
# Initialize the plugin
options = UniswapPluginOptions(
api_key="${UNISWAP_API_KEY}", # Optional: API key for higher rate limits
rpc_url="${RPC_PROVIDER_URL}" # Your EVM RPC provider URL
)
plugin = uniswap(options)
# Get token price
price = await plugin.get_token_price(
token_address="0x6B175474E89094C44Da98b954EedeAC495271d0F", # DAI
chain_id=1 # Ethereum mainnet
)
# Get swap quote
quote = await plugin.get_swap_quote(
chain_id=1,
token_in="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", # WETH
token_out="0x6B175474E89094C44Da98b954EedeAC495271d0F", # DAI
amount="1000000000000000000", # 1 WETH in wei
slippage=50 # 0.5% slippage tolerance
)
Features
- Token price discovery
- Swap quote generation
- Token swap execution
- Liquidity pool information
- Position management
- Supported chains:
- Ethereum
- Polygon
- Arbitrum
- Optimism
- Base
- All Uniswap v3 supported networks
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file goat_sdk_plugin_uniswap-0.1.2.tar.gz.
File metadata
- Download URL: goat_sdk_plugin_uniswap-0.1.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1476d296d7f29be640cfda06cd10760c93c337411b54d39f39e395361b4d1f90
|
|
| MD5 |
a83dc1b76d4892670bb44717c7a4b002
|
|
| BLAKE2b-256 |
aef908c71a76f17e6fefacfdd341850db082b6c0c9e103c402098b888843e67d
|
File details
Details for the file goat_sdk_plugin_uniswap-0.1.2-py3-none-any.whl.
File metadata
- Download URL: goat_sdk_plugin_uniswap-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
480887453d313e6d12c20b1ff38ea0fe7ca3ccb29042c79b4e5244e2058c7682
|
|
| MD5 |
a975c76ee699fa776f7c956877ef59a5
|
|
| BLAKE2b-256 |
7551f574ca05e922c78020049f58bd78e22c9ce8598a40d2288387dc987db8e8
|