A Python library for aggregating token prices and swaps across multiple DEXs
Project description
pyBaseSwap
pyBaseSwap is a Python library designed to facilitate interaction with ERC-20 tokens on the Base L2 Ethereum blockchain. It provides an easy-to-use interface for managing token balances, allowances, and transactions, allowing developers to focus on building their applications without worrying about the complexities of blockchain interactions.
Warning
Warning: You will be charged a 1% fee on your swap volume during the initial phase. This fee is temporarily set higher to cover server costs and other expenses.
Documentation
Examples
Pypi Realese
Installation
You can install the package using pip:
pip install pyBaseSwap
Installing from Source
If you prefer to install pyBaseSwap from the source, follow these steps:
Clone the repository:
git clone https://github.com/BaseTools/pyBaseSwap
cd pyBaseSwap
python setup.py install
EXAMPLE USE
from pyBaseSwap import BaseSwap
BS = BaseSwap() # No Token Addresss Provided fallback to USDC
BS.changeToken(
"0x65e570b560027F493f2b1907e8e8e3B9546053bD" #Tyler Token
)
usdPrice = BS.getUSDPrice() # fetch usd price
print(usdPrice)
LICENSE
MIT License
Copyright (c) [2024] [BasedTools]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Project details
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
File details
Details for the file pybaseswap-0.11.tar.gz
.
File metadata
- Download URL: pybaseswap-0.11.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9489d1ce2acab2f71d4708f46743405fa82681d6c1a65ebfd69e9c86bf82379b |
|
MD5 | b291b70df2930c1be42009d72d1e434c |
|
BLAKE2b-256 | 3c69ac5f2d70fb84de72c8fd887ef42e677e4eaa29aa8d478343e44d91c8b953 |
File details
Details for the file pyBaseSwap-0.11-py3-none-any.whl
.
File metadata
- Download URL: pyBaseSwap-0.11-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5306b2d7dff1fbb667a4e5bbb67dc8c02973c1540ca48f86fee05ca5d6b68e86 |
|
MD5 | 7f5810c850c72b3d759479d8664aefbb |
|
BLAKE2b-256 | 8cbed78095c2a56944bc43873b2fdda44312ad1e4309328c5e6b6f73ed91ec9c |