API for querying key values for Pangolin and the PNG token
Wrangler is used for a local development server. This is effectively a proxy-service that (nearly) replicates the Cloudflare Worker runtime.
Anyone can develop this repository locally. Fill in account_id
in the wrangler.toml
file. This value may (and should) be your own personal account_id
.
The API is available at https://api.pangolin.exchange
All methods accept a GET request.
Get the total value locked in Pangolin in USD.
Endpoint: /png/tvl
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/tvl'
Get the total lifetime volume of swaps on Pangolin in USD.
Endpoint: /png/total-volume
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/total-volume'
Get the total lifetime supply of PNG. PNG is a hard-capped asset and this value will never increase.
The PNG token has 18 decimals. Query the total supply denominated in units of "wei." With this method, a result of 1 PNG would return the value 1000000000000000000
.
Endpoint: /png/total-supply
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/total-supply'
The PNG token has 18 decimals. Query the total supply denominated in units of whole PNG. With this method, a result of 1 PNG would return the value 1
.
Endpoint: /png/total-supply-whole
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/total-supply-whole'
Get the current circulating supply of PNG. This value is calculated to be the total supply of PNG minus the locked, unvested PNG and also excludes the locked Pangolin community treasury.
The PNG token has 18 decimals. Query the circulating supply denominated in units of "wei." With this method, a result of 1 PNG would return the value 1000000000000000000
.
Endpoint: /png/circulating-supply
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/circulating-supply'
The PNG token has 18 decimals. Query the circulating supply denominated in units of whole PNG. With this method, a result of 1 PNG would return the value 1
.
Endpoint: /png/circulating-supply-whole
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/circulating-supply-whole'
Get the current PNG supply of the Pangolin Community Treasury.
The PNG token has 18 decimals. Query the balance denominated in units of "wei." With this method, a result of 1 PNG would return the value 1000000000000000000
.
Endpoint: /png/community-treasury
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/community-treasury'
The PNG token has 18 decimals. Query the circulating supply denominated in units of whole PNG. With this method, a result of 1 PNG would return the value 1
.
Endpoint: /png/community-treasury-whole
Example call: curl --location --request GET 'https://api.pangolin.exchange/png/community-treasury-whole'
Get the total lifetime number of unique address to transact on Pangolin.
Endpoint: /pangolin/addresses
Example call: curl --location --request GET 'https://api.pangolin.exchange/pangolin/addresses'
Get the average size of each swap on Pangolin in USD.
Endpoint: /pangolin/transaction-average
Example call: curl --location --request GET 'https://api.pangolin.exchange/pangolin/transaction-average'
Get the median size of each swap on Pangolin in USD.
Endpoint: /pangolin/transaction-median
Example call: curl --location --request GET 'https://api.pangolin.exchange/pangolin/transaction-median'
Get the PNG Reward Rate of the inputted StakingRewards contract address. Refer to Snowtrace to find pIDs(pool ids).
Endpoint: /pangolin/apr2/{pID}
Example call: curl --location --request GET 'https://api.pangolin.exchange/pangolin/apr2/1'