Dev tools
Last updated
Was this helpful?
Last updated
Was this helpful?
Content Out of Date
This content is not maintained and refers to an out-of-date version of Perpetual Protocol.
For the latest documentation, see
An open source maker bot for providing liquidity on Perp v2:
Check out the following resources to get started:
An open source trading bot for arbitraging between Perp v2 and CEXes like Binance/FTX:
Check out the following resources to get started:
Perpetual Protocol does not provide an official API. Instead it relies on services such as The Graph. This is to ensure the maximum distribution and decentralization possible at this point in the project's development.
The Graph is intended as a data collection, and may not be realtime.
🚧 Definitions will be added as they are requested. Please come to our Discord and request in in the #coding-chat channel!
FundingUpdated
Updates the global funding params which are used to calculate each trader's funding payment
Updated per timestamp
FundingPaymentSettled
Settles a trader's funding payment into owedRealizedPnl
Calculated before executing openPosition
, closePosition
, addLiquidity
, removeLiquidity
.
dailyFundingRate
Shows funding rate from past 24h
exchangedPositionNotional
Shows value of a trade in USD
Includes non-fee generating swaps, so aggregate fees will be less than 0.1% of this value
See more examples in the “playground” at The Graph link above.
Perp v3
Schema
Uniswap v3
shows dailyFundingRate / 24 * 100