Skip to content

hsnice16/uniswap-v3-apy

Repository files navigation

✨ Uniswap V3 APY

Forks Stars

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."


📋 API Reference

Get the APY

GET /v1/apy

Query parameters

param type description
poolAddress string The pool address you want to get APY for (required).

Example

GET /v1/apy?poolAddress=0xcbcdf9626bc03e24f779434178a73a0b4bad62ed
• • •

Save a pool

POST /v1/pool

Request Body
{ "address": "string" }
• • •

Delete a pool

DELETE /v1/pool

Request Body
{ "address": "string" }

⚙️ Develop Locally

Pull the code

git clone git@github.com:hsnice16/uniswap-v3-apy.git
cd uniswap-v3-apy

Run in a Docker Container or start the server manually

➡️ Run in a Docker Container

You will need docker on your local machine for this.

• Build the image
docker build -t hsnice16/uniswap-v3-apy:1.0 .
• Run container
docker run -p 8080:8080 hsnice16/uniswap-v3-apy:1.0
• • •

➡️ Run manually

• Install dependencies
npm install
• Run in watch mode

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


🐳 Use its Docker Image

This is present as a Docker Image on Hub, so you can use that if you want.

Pull the image

docker pull hsnice16/uniswap-v3-apy:1.0

Run container

docker run -p 8080:8080 hsnice16/uniswap-v3-apy:1.0

The server is running on localhost:8080


⏭️ Next Steps

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.

About

Backend API that provides the Uniswap V3 protocol on Ethereum APY information.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published