OpenViSTAI · Agents · Blockchain · Crypto
Menu
DeFi

Uniswap Python

Uniswap Python is an unofficial, MIT-licensed Python client library that wraps Uniswap contract functions and variables, parses returned data, and provides a basic CLI for prices and token metadata.

Independent OpenViST project profile, based on linked sources.

Uniswap Python — OpenViST project profile in DeFi.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Choose it when a Python project needs a direct Uniswap integration layer or a small command-line interface for exchange data. Check the protocol version and network scope before relying on a feature, especially for beta v4 support or entries marked untested.

Who it is for

  • Python developers integrating Uniswap into applications or services
  • Teams building Ethereum DeFi, trading or market-data tools
  • Developers automating supported automated-market-maker interactions

Documented uses

  • Query Uniswap prices and token metadata
  • Call supported Uniswap contract functions from Python
  • Build token-swap and trading integrations
  • Work with documented Uniswap liquidity-management workflows
  • Test integrations against a mainnet fork using Anvil and a provider
Before you choose

Requirements & limits

The project is publicly available on GitHub under the MIT license. The documented test workflow requires Foundry, Poetry and a mainnet provider URL.

  • Python is the primary implementation language.
  • The library covers Uniswap v2 and v3 and identifies v4 support as beta as of version 0.8.0.
  • The v4 feature list includes swaps, price quoting, liquidity management and pool discovery through a pool cache service.
  • Arbitrum and Optimism support is identified as beta, while Polygon and Fantom support is described as basic and untested.
  • Uniswap v1 is deprecated, and support for various forks is described as untested.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the project for its documented test suite

Prepare the repository and a mainnet provider for running its pytest-based tests on an Anvil fork.

Before you start

  • A local project copy of the public repository
  • Foundry, including Anvil
  • A mainnet provider URL
  • Poetry

Steps

  1. Install Foundry using the installation command documented in the repository README, then run foundryup.

  2. Set the PATH entry for the local Foundry binaries as shown in the README.

  3. In the project directory, run poetry install.

  4. Set the PROVIDER environment variable to a mainnet provider URL.

  5. Run make test, or run poetry run pytest --capture=no for uncaptured output.

Expected outcome

The documented test command is configured to use a mainnet fork through Anvil and pytest.

Guide limitations

  • The README says unit tests are under development.
  • The repository instructions do not establish that the test suite passes in every environment.
  • Several listed network integrations are described as untested.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
2 October 2026
Original website title
uniswap-python/uniswap-python · Official homepage title · retained in its source language