Skip to main content

OracleTask

Fetch the current price of a Solana oracle protocol.

Input: None

Returns: The current price of an on-chain oracle.

Example: The Switchboard SOL/USD oracle price.

{
"oracleTask": {
"switchboardAddress": "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"
}
}

Example: The Pyth SOL/USD oracle price.

{
"oracleTask": {
"pythAddress": "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG"
}
}

Example: The Chainlink SOL/USD oracle price.

{
"oracleTask": {
"chainlinkAddress": "CcPVS9bqyXbD9cLnTbhhHazLsrua8QMFUHTutPtjyDzq"
}
}


Fields

NameTypeDescription
 chainlinkAddress

string

Mainnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana

 chainlinkConfigs
 edgeConfigs
 edgeId

string

 pythAddress

string

Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/price-feeds/

 pythAllowedConfidenceInterval

double

Value (as a percentage) that the lower bound confidence interval is of the actual value. / Confidence intervals that are larger that this treshold are rejected. / / The confidence interval should be provided as a raw percentage value. For example, to / represent 10%, enter the value as 10, not 0.1.

Deprecated “pyth_allowed_confidence_interval”

 pythConfigs
 redstoneConfigs
 redstoneId

string

 switchboardAddress

string

Mainnet address of a Switchboard feed. Switchboard is decentralized and allows anyone to build their own feed.

 switchboardConfigs

Messages

 EdgeConfigs

NameTypeDescription

 PythConfigs

NameTypeDescription
 hermesUrl

string

 pythAllowedConfidenceInterval

double

 RedstoneConfigs

NameTypeDescription

 SwitchboardConfigs

NameTypeDescription
 version

int32

 jobs