Search…
⌃K

Pyth on Aptos

Consume Pyth Network prices in applications on Aptos
Aptos contracts can update and fetch the Pyth prices using the Pyth Aptos Contract, which has been deployed on Testnet. The documented source code can be found here.

Updating Price Feeds

The mechanism by which price feeds are updated on Aptos is explained here. The pyth-aptos-js package can be used to fetch price feed update data which can be passed to the pyth::update_price on-chain function.

Examples

Networks

Pyth is currently deployed on Aptos Testnet, and will be available on Aptos Mainnet as soon as the chain is live.

Addresses

When deploying contracts using Pyth, the named addresses pyth, wormhole and deployer need to be defined at compile time. These addresses are the same across both Testnet and Mainnet.
Named Address
Value
pyth
0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387
wormhole
0x5bc11445584a763c1fa7ed39081f1b920954da14e04b32440cba863d03e19625
deployer
0xb31e712b26fd295357355f6845e77c888298636609e93bc9b05f0f604049f434
deployer and wormhole are implementation details of the Pyth contract: you will not need to interact with these.

Price Feeds