Backend API that provides the Uniswap V3 protocol on Ethereum APY information.
Base URL: https://uniswap-v3-apy.onrender.com
It is deployed on Render, and
"Render spins down a Free web service that goes 15 minutes without receiving inbound traffic. Render spins the service back up whenever it next receives a request to process.
Spinning up a service takes a few seconds, which causes a noticeable delay for incoming requests until the service is back up and running. For example, a browser page load will hang momentarily."
GET /v1/apy
param | type | description |
---|---|---|
poolAddress | string | The pool address you want to get APY for (required ). |
Example
GET /v1/apy?poolAddress=0xcbcdf9626bc03e24f779434178a73a0b4bad62ed
POST /v1/pool
Request Body
{ "address": "string" }
DELETE /v1/pool
Request Body
{ "address": "string" }
git clone [email protected]:hsnice16/uniswap-v3-apy.git
cd uniswap-v3-apy
You will need docker on your local machine for this.
docker build -t hsnice16/uniswap-v3-apy:1.0 .
docker run -p 8080:8080 hsnice16/uniswap-v3-apy:1.0
npm install
This way when you will make any changes you won't have to restart the server again.
npm run watch
The server is running on localhost:8080
This is present as a Docker Image on Hub, so you can use that if you want.
docker pull hsnice16/uniswap-v3-apy:1.0
docker run -p 8080:8080 hsnice16/uniswap-v3-apy:1.0
The server is running on localhost:8080
Things that can make it even better.
- Place a rate limiter for endpoints.
- Reverse proxy to secure backend servers, caching, and balance load.
- Write an OpenAPI specification for endpoints and create a Swagger dashboard using that, to make the API documentation more readable.