Asset Coverage

Pragma supports a wide range of cryptocurrency pairs and currencies with ongoing expansion

Pragma supports specific pairs that are listed and traded by our data partners. We also support a broader concept of currencies (each pair is a price of the quote currency in terms of the base currency). For pairs not listed, their price can be deduced by “hoping” using pairs that are listed, e.g. we can combine ETH/USD and BTC/USD to get a ETH/BTC feed.

Please read the risk section and contact us before integrating.

Asset Pairs

The following asset pairs are officially supported by Pragma. More are added every week, so just reach out on Twitter or Discord if you have a specific one you need.

The pair_id is calculated by utf-8 encoding the uppercased string (e.g. str_to_felt(“BTC/USD”)) and used to refer to specific feeds on-chain.

TickerPair IdDecimalsMainnetRisk
BTC/USD186699959965663408L
ETH/USD195144424015347888L
WBTC/USD62876806772962967728M
WBTC/BTC62876806772950518438M
BTC/EUR186699959955182908L
WSTETH/USD4123830361201186138570928M
LORDS/USD14076682556030795989168H
UNI/USD240114492541059248M
STRK/USD60045146860618596528L
ZEND/USD65046912915654131888H
NSTR/USD56439474699835359408H
EKUBO/USD12782536589196880330928H
XSTRK/USD16293179931725024018608H
KSTRK/USD13895103202142782308528H
SSTRK/USD15370842728039546437808H
BROTHER/USDPLUS34436103535974753067674129114256725118H

Currencies & Rebasing

If you want the price of one asset that Pragma lists in the price of another asset also listed (e.g. the price of BTC/ETH), you can simply get the result by calling the get_data_with_USD_hop endpoint. In that case, the result will have as many decimals as the base asset you are requesting, e.g. for BTC/ETH it would be 18 decimals because the base unit of ETH is wei where 10^18 wei = 1 ETH.

Abstract currencies are not tracking a specific token but rather a broader concept or fiat currency. E.g. there is a difference between the ETH/USD price in the abstract and the ETH/USDC price that can be had in a specific AMM pool.

USDPLUS is exactly the same as USD but with 18 decimals to account for assets with very low price such as memecoins.

CurrencyCurrency IdDecimalsMainnetRisk
USD55918768L
USDPLUS2401692589046715518M
BTC43469478L
EUR45438268M
FIXEDRESERVED556867049429118205999183129939618L

Fixed Price

Fixed 1$ Rate

We have introduced a fixed price pair FIXEDRESERVED/USD for consumers who want to have a fixed rate of 1$. The resulting fixed price will have 8 decimals.

use pragma_lib::abi::{IPragmaABIDispatcher, IPragmaABIDispatcherTrait};
use pragma_lib::types::{AggregationMode, DataType, PragmaPricesResponse};
use starknet::ContractAddress;
use starknet::contract_address::contract_address_const;


const KEY :felt252 = 23917257655180781648846825458055798674244; // felt252 conversion of "FIXEDRESERVED/USD", can also write const KEY : felt252 = 'FIXEDRESERVED/USD';

fn get_asset_price_median(oracle_address: ContractAddress, asset : DataType) -> u128  {
    let oracle_dispatcher = IPragmaABIDispatcher{contract_address : oracle_address};
    let output : PragmaPricesResponse= oracle_dispatcher.get_data(asset, AggregationMode::Median(()));
    return output.price;
}

Need More Assets?

Request New Assets

Need a specific asset that’s not listed here? We’re constantly expanding our coverage.