Price Feeds
Publish Data

Publish Data

Data providers can get started publishing data to the Pyth Network by performing the following steps.

Request access

First, contact the Pyth Data Association and request to become a data provider. You can reach out on Discord (opens in a new tab) or Telegram (opens in a new tab). Only data providers with first-party data (exchanges, market makers, and trading firms) are allowed to participate in the network.

Generate keypair

Every data provider is identified on the network by a public key, and their prices are signed by the corresponding private key. You will need a Solana public/private key pair for this purpose. If you do not already have a keypair, you can create one using the instructions below:

# Install the Solana Tool Suite, needed for creating the key used to sign your transactions.
# See https://docs.solana.com/cli/install-solana-cli-tools for the latest version
sh -c "$(curl -sSfL https://release.solana.com/v1.14.13/install)"
 
# Generate a public/private keypair.
solana-keygen new --no-bip39-passphrase --outfile publish_key_pair.json

This command will create a public/private keypair in publish_key_pair.json. Please extract the public key from this file and share it with the Pyth Data Association so they can enable you to publish prices.

# Print the public key of the keypair.
solana-keygen pubkey publish_key_pair.json

This command will output the public key in base58 encoding and will look something like:

5rYvdyWAunZgD2EC1aKo7hQbutUUnkt7bBFM6xNq2z7Z

Most data providers choose to generate two separate keypairs, one for testing and one for production. If you do so, please share both public keys with the Pyth Data Association.

Procure validators

Every data provider to the network will require both a Solana RPC node and a Pythnet validator. The Pyth Data Association will assist you with this step.

pyth-agent

Data providers can publish data to the network using the pyth-agent (opens in a new tab) software package. This package abstracts away all of the communication with the underlying blockchain and exposes a simple JSON RPC interface for submitting price data. Please see the README (opens in a new tab) of that package for instructions on using it. This software requires you to configure both the keypair and validators from the previous steps in order to run. Please also see the JSON RPC API documentation. Finally, the example publisher (opens in a new tab) is a fully-worked example of how to integrate with the pyth-agent API.

Last updated on