Giter VIP home page Giter VIP logo

swirgefi-api's Introduction

Swirge Finance API

API that powers Swirge Finance. You can find the repo for the frontend here.

To Run

Optional enviroment vars:

BSC_RPC - A custom RPC endpoint that you want to use. HECO_RPC - A custom RPC endpoint for HECO. You can just leave the default one otherwise. FORTUBE_API_TOKEN - A token from Fortube to use their API. If you don't have a token you will get a console warning and the Fortube APYs will be slightly smaller than in production. Everything works fine otherwise.

Afterwards just do

yarn
yarn start

Endpoints

Consumed by the app.

/apy: The main endpoint used by the frontend. It returns the APY of all the vaults in the following format.

{
	"swgb-maxi": 0.22448469479728606, // 22%
	"cake-cake": 2.8002377054263174, // 280%
	"cake-smart": 2.8002377054263174, // 280%
	"cake-swingby-bnb": 21.85102752680053 // 2185%
}

After you start the API it can take a minute or two before you can fetch the APYs. We currently log getApys() to the console when all the data is available.

/prices: All token prices under the same endpoint (crosschain).

/lps: All liqudity pair prices under a single endpoint (crosschain).

Consumed by third party platforms

/cmc: Custom endpoint required by CoinMarketCap to display our vaults in their yield farming section. /supply: Used by Coingecko to display SWGb's total supply and circulating supply.

Consumed by the dashboard

/earnings: Used to display the total and daily earnings of the platform. /holders: Used to display the total number of holders. This calc takes into account users with 0 SWGb in their wallet, but SWGb staked in the reward pool.

Contribute

Swirge Finance exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the contribution guide!

License

MIT.

swirgefi-api's People

Contributors

mrjaycrypto avatar radiancegeorge avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.