Skip to main content

Pegasys API

API for querying key values for Pegasys and the PSYS token

For to see the Pegasys-API.

Development#

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.

Location#

The API is available at https://api.pegasys.finance

Methods#

All methods accept a GET request.

Pegasys TVL

Get the total value locked in Pegasys in USD.

Endpoint: /psys/tvl

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/tvl'

Pegasys Volume

Get the total lifetime volume of swaps on Pegasys in USD.

Endpoint: /psys/total-volume

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/total-volume'

PSYS Total Supply

Get the total lifetime supply of PSYS. PSYS is a hard-capped asset and this value will never increase.

18 Decimal Denomination

The PSYS token has 18 decimals. Query the total supply denominated in units of "wei." With this method, a result of 1 PSYS would return the value 1000000000000000000.

Endpoint: /psys/total-supply

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/total-supply'

Whole Token Denomination

The PSYS token has 18 decimals. Query the total supply denominated in units of whole PSYS. With this method, a result of 1 PSYS would return the value 1.

Endpoint: /psys/total-supply-whole

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/total-supply-whole'

PSYS Circulating Supply

Get the current circulating supply of PSYS. This value is calculated to be the total supply of PSYS minus the locked, unvested PSYS and also excludes the locked Pegasys community treasury. 18 Decimal Denomination

The PSYS token has 18 decimals. Query the circulating supply denominated in units of "wei." With this method, a result of 1 PSYS would return the value 1000000000000000000.

Endpoint: /psys/circulating-supply

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/circulating-supply'

Whole Token Denomination

The PSYS token has 18 decimals. Query the circulating supply denominated in units of whole PSYS. With this method, a result of 1 PSYS would return the value 1.

Endpoint: /psys/circulating-supply-whole

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/circulating-supply-whole'

Pegasys Community Treasury Supply

Get the current PSYS supply of the Pegasys Community Treasury.

18 Decimal Denomination

The PSYS token has 18 decimals. Query the balance denominated in units of "wei." With this method, a result of 1 PSYS would return the value 1000000000000000000.

Endpoint: /psys/community-treasury

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/community-treasury'

Whole Token Denomination

The PSYS token has 18 decimals. Query the circulating supply denominated in units of whole PSYS. With this method, a result of 1 PSYS would return the value 1.

Endpoint: /psys/community-treasury-whole

Example call: curl --location --request GET 'https://api.pegasys.finance/psys/community-treasury-whole'

Pegasys Number of Address

Get the total lifetime number of unique addresses to transact on Pegasys.

Endpoint: /pegasys/addresses

Example call: curl --location --request GET 'https://api.pegasys.finance/pegasys/addresses'

Pegasys Average Swap Size

Get the average size of each swap on Pegasys in USD.

Endpoint: /pegasys/transaction-average

Example call: curl --location --request GET 'https://api.pegasys.finance/pegasys/transaction-average'

Pegasys Average Percentage Reward Rate

Get the PSYS Reward Rate of the inputted StakingRewards contract address. Refer to Syscoin Explorer to find pIDs(pool ids).

Endpoint: /pegasys/apr/{pID}

Example call: curl --location --request GET 'https://api.pegasys.finance/pegasys/apr/1'