This API has been built using web3, fastapi and slowapi to communicate with blockchains and fetch various types of data.
This API has the following features:
- Runs on uvicorn ASGI server
- Interactive GUI documentation of the API using Swagger UI and ReDoc
- Uses slowapi to limit number of requests for a given time period
- Has Bearer Authentication feature for users
- Handles exceptions and returns errors promptly
- Can customize and add more networks in app -> internal -> networks.py (Currently only EVM compatible networks like Ethereum, Polygon, Binance Smart Chain work with the library)
- Python 3.x installed on your system
- JSON-RPC urls of the networks you want to use
- Clone or download the files from this repository.
- Open terminal and run the following:
pip install -r requirements.txt
- Modify or add networks in
network.py
file
- Run the following command:
python main.py
- Uvicorn will start running on ip
127.0.0.1
and port8000
- If you want the GUI documentation, go to
127.0.0.1:8000/docs
- Swagger UI and ReDoc documentation served at
/docs
can turned off withapp = FastAPI(docs_url=None, redoc_url=None)
- Authenticate yourself using Bearer Auth and send requests to the API