Gains and Ostium vault API
Gains Network gToken vault integration.
GToken-based vault smart contracts provide automated market making vaults for perpetual futures purely onchain. The trading engine uses gToken vaults for all trading pairs, making it over 100x more capital efficient than traditional order book approaches.
Known implementations are:
gTrade, formerly known as Gains protocol and its gToken vaults
Ostium vaults, also known as “Ostium LP” vaults where LP stands for liquidity provider
Links
This Python-based API allows you to automate interactions with these vault in your application:
Discover vaults and their features across multiple chains
Historical data reading: share price, profit, TVL, deposits, redemptions
Deposit into a vault from your application
Redeem from the vault
Query your vault positions
Query vault redemption delays
For the example usage, see GainsVault class.
Gains/Ostium vault adapter. |
|
Deposit and redeem flow for GToken-like vaults. |
|
Gains vault testing helpers. |
For more tutorials, like vault historical data, see ERC-4626 tutorials in tutorials section.