Entropy
Search…
⌃K

Oracles

Entropy uses Switchboard and Pyth for its pricing oracles to derive mark prices.
Each group uses a set of oracles that provide up to date price feeds for it's tokens. For the mainnet.2 group Pyth and Switchboard oracles are used.
// fetch current oracle price of a single token
mangoGroup.getPrice(tokenIndex: number, mangoCache: MangoCache): I80F48
// then use I80F48 .add/.sub/.mul/.div functions to perform calculations
// or convert to human-friendly number with .toNumber() or .toFixed(2)
List of Entropy Oracles
"oracles": [
{
"symbol": "BTC^2",
"publicKey": "GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU"
},
{
"symbol": "BTC",
"publicKey": "GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU"
},
{
"symbol": "BTC_1D_IV",
"publicKey": "57HtzNrNGP7LtzsdRbmFqj5jgHUKL2HR2wnrPSrd4Qyu"
}
]