Block-Latency Feeds
FTSOv2's block-latency feeds update incrementally with each new block on Flare, approximately every 1.8 seconds. Every feed leverages Flare's network of 100 independent data providers. These feeds primarily support cryptocurrency price data and are free to query on Flare, enabling decentralized applications to access up-to-date information without incurring additional costs.
Each block-latency feed is uniquely identified by an ID composed of three components in a structured encoding process:
-
Category: Indicates the type of asset - Crypto:
01
, Forex:02
, Commodity:03
, Stock:04
, Custom Feeds:05
-
Hex-Encoded Feed Name: The name of the feed is converted to a hexadecimal format.
-
Zero Padding: The combined category and hex-encoded feed name are padded with zeros to a length of 21 bytes.
The resulting string is then prefixed with 0x
.
Example of the structured encoding process.
Taking the feed name FLR/USD
:
- Category:
01
(Crypto) - Hex-Encoded Feed Name:
464c522f555344
(hexadecimal representation ofFLR/USD
) - Zero Padding: The category and hex-encoded feed name combined and padded:
01464c522f55534400000000000000000000000000
- Final ID: Adding the
0x
prefix results in0x01464c522f55534400000000000000000000000000
- Solidity
- Javascript
- Python
- Rust
- Go
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import {ContractRegistry} from "@flarenetwork/flare-periphery-contracts/coston2/ContractRegistry.sol";
import {IFtsoFeedIdConverter} from "@flarenetwork/flare-periphery-contracts/coston2/IFtsoFeedIdConverter.sol";
contract GetFeedId {
IFtsoFeedIdConverter internal feedIdConverter;
constructor() {
feedIdConverter = ContractRegistry.getFtsoFeedIdConverter();
}
function exampleFlrUsdConversion() external view returns (bytes21) {
return feedIdConverter.getFeedId(1, "FLR/USD");
}
}
function getFeedId(category, feedName) {
const hexFeedName = Array.from(feedName)
.map((c) => c.charCodeAt(0).toString(16).padStart(2, "0"))
.join("");
const paddedHexString = (category + hexFeedName).padEnd(42, "0");
return `0x${paddedHexString}`;
}
const feedId = getFeedId("01", "FLR/USD");
console.log(feedId);
def get_feed_id(category: str, feed_name: str) -> str:
hex_feed_name = feed_name.encode("utf-8").hex()
padded_hex_string = (category + hex_feed_name).ljust(42, "0")
return f"0x{padded_hex_string}"
feed_id = get_feed_id("01", "FLR/USD")
print(feed_id)
fn get_feed_id(category: &str, feed_name: &str) -> String {
let hex_feed_name = feed_name
.as_bytes()
.iter()
.map(|byte| format!("{:02x}", byte))
.collect::<Vec<String>>()
.join("");
let combined = format!("{}{}", category, hex_feed_name);
let padded_hex_string = format!("{:0<42}", combined);
format!("0x{}", padded_hex_string)
}
fn main() {
let feed_id = get_feed_id("01", "FLR/USD");
println!("{}", feed_id);
}
package main
import (
"encoding/hex"
"fmt"
"strings"
)
func getFeedID(category, feedName string) string {
hexFeedName := hex.EncodeToString([]byte(feedName))
paddedHexString := category + hexFeedName
if len(paddedHexString) < 42 {
paddedHexString = paddedHexString + strings.Repeat("0", 42-len(paddedHexString))
}
feedId := "0x" + paddedHexString
fmt.Println(feedId)
return feedId
}
🚦 Understanding feed risks.
When building applications, developers must carefully evaluate the quality of the data they use. As a developer, you are responsible for identifying and assessing the accuracy, availability, and overall quality of the data you choose to integrate. It is important to understand that all data feeds carry inherent risks.
The table below categorizes feeds into three risk levels based on their market integrity, ranging from lowest to highest, a feed is assigned a higher risk level if it fails to meet all the criteria required for classification within a lower risk level:
Aspect | 🟢 Low Risk | 🟡 Medium Risk | 🔴 High Risk |
---|---|---|---|
Intrinsic Volatility | Low, stable price trends | Moderate price fluctuations | High, frequent price swings |
Liquidity Variation | Abundant and consistent | Sufficient but variable | Limited and inconsistent |
Liquidity Concentration | Broad and well-distributed across venues | Somewhat concentrated | Highly concentrated in a few sources |
Asset Spread Risk | Tight spreads, minimal bid-ask gaps | Moderate spreads, acceptable bid-ask gaps | Wide spreads, significant bid-ask gaps |
Cross Rate Risk | Low correlation, direct pricing available | Moderate correlation, indirect pricing used | High correlation, dependent on multiple intermediaries |
Other risk categories:
- âš« New Feed New tokens lack historical data for proper risk assessment and stable price discovery. Users must recognize these assets carry higher volatility risks and verify feed reliability independently. After a monitoring period, feeds will be assigned risk levels or potentially discontinued.
Each feed undergoes a rigorous assessment process prior to deployment. The evaluation criteria may vary depending on the specific type of feed being implemented and can evolve over time as our understanding of market integrity risks improves.
- Feed IDs are not addresses. They are
bytes21
structured encodings that combine the category and feed name to ensure each feed has a unique identifier. - Do not hardcode the number of decimals for a feed in your smart contract, as these can change as the feed value changes. You can use either of the following solutions:
- Check the number of decimal places every query using
getFeedById
. - Use the feed value in Wei using
getFeedByIdInWei
.
- Check the number of decimal places every query using
Name | Index | Feed ID | Details | Risk |
---|---|---|---|---|
FLR/USD | 0 | 0x01464c522f55534400000000000000000000000000 | Base Asset: Flare Category: Crypto | 🟢 |
SGB/USD | 1 | 0x015347422f55534400000000000000000000000000 | Base Asset: Songbird Category: Crypto | 🟡 |
BTC/USD | 2 | 0x014254432f55534400000000000000000000000000 | Base Asset: Bitcoin Category: Crypto | 🟢 |
XRP/USD | 3 | 0x015852502f55534400000000000000000000000000 | Base Asset: XRP Category: Crypto | 🟢 |
LTC/USD | 4 | 0x014c54432f55534400000000000000000000000000 | Base Asset: Litecoin Category: Crypto | 🟢 |
XLM/USD | 5 | 0x01584c4d2f55534400000000000000000000000000 | Base Asset: Stellar Category: Crypto | 🟡 |
DOGE/USD | 6 | 0x01444f47452f555344000000000000000000000000 | Base Asset: Dogecoin Category: Crypto | 🟡 |
ADA/USD | 7 | 0x014144412f55534400000000000000000000000000 | Base Asset: Cardano Category: Crypto | 🟢 |
ALGO/USD | 8 | 0x01414c474f2f555344000000000000000000000000 | Base Asset: Algorand Category: Crypto | 🟡 |
ETH/USD | 9 | 0x014554482f55534400000000000000000000000000 | Base Asset: Ethereum Category: Crypto | 🟢 |
FIL/USD | 10 | 0x0146494c2f55534400000000000000000000000000 | Base Asset: Filecoin Category: Crypto | 🟢 |
ARB/USD | 11 | 0x014152422f55534400000000000000000000000000 | Base Asset: Arbitrum Category: Crypto | 🟢 |
AVAX/USD | 12 | 0x01415641582f555344000000000000000000000000 | Base Asset: Avalanche Category: Crypto | 🟢 |
BNB/USD | 13 | 0x01424e422f55534400000000000000000000000000 | Base Asset: BNB Category: Crypto | 🟢 |
POL/USD | 14 | 0x01504f4c2f55534400000000000000000000000000 | Base Asset: POL (ex-MATIC) Category: Crypto | 🟢 |
SOL/USD | 15 | 0x01534f4c2f55534400000000000000000000000000 | Base Asset: Solana Category: Crypto | 🟢 |
USDC/USD | 16 | 0x01555344432f555344000000000000000000000000 | Base Asset: USDC Category: Crypto | 🟢 |
USDT/USD | 17 | 0x01555344542f555344000000000000000000000000 | Base Asset: Tether Category: Crypto | 🟢 |
XDC/USD | 18 | 0x015844432f55534400000000000000000000000000 | Base Asset: XDC Network Category: Crypto | 🟡 |
TRX/USD | 19 | 0x015452582f55534400000000000000000000000000 | Base Asset: TRON Category: Crypto | 🟢 |
LINK/USD | 20 | 0x014c494e4b2f555344000000000000000000000000 | Base Asset: Chainlink Category: Crypto | 🟢 |
ATOM/USD | 21 | 0x0141544f4d2f555344000000000000000000000000 | Base Asset: Cosmos Hub Category: Crypto | 🟢 |
DOT/USD | 22 | 0x01444f542f55534400000000000000000000000000 | Base Asset: Polkadot Category: Crypto | 🟢 |
TON/USD | 23 | 0x01544f4e2f55534400000000000000000000000000 | Base Asset: Toncoin Category: Crypto | 🟢 |
ICP/USD | 24 | 0x014943502f55534400000000000000000000000000 | Base Asset: Internet Computer Category: Crypto | 🟢 |
SHIB/USD | 25 | 0x01534849422f555344000000000000000000000000 | Base Asset: Shiba Inu Category: Crypto | 🟡 |
USDS/USD | 26 | 0x01555344532f555344000000000000000000000000 | Base Asset: USDS Category: Crypto | 🟢 |
BCH/USD | 27 | 0x014243482f55534400000000000000000000000000 | Base Asset: Bitcoin Cash Category: Crypto | 🟢 |
NEAR/USD | 28 | 0x014e4541522f555344000000000000000000000000 | Base Asset: NEAR Protocol Category: Crypto | 🟢 |
LEO/USD | 29 | 0x014c454f2f55534400000000000000000000000000 | Base Asset: LEO Token Category: Crypto | 🔴 |
UNI/USD | 30 | 0x01554e492f55534400000000000000000000000000 | Base Asset: Uniswap Category: Crypto | 🟢 |
ETC/USD | 31 | 0x014554432f55534400000000000000000000000000 | Base Asset: Ethereum Classic Category: Crypto | 🟡 |
WIF/USD | 32 | 0x015749462f55534400000000000000000000000000 | Base Asset: dogwifhat Category: Crypto | 🟡 |
BONK/USD | 33 | 0x01424f4e4b2f555344000000000000000000000000 | Base Asset: Bonk Category: Crypto | 🟡 |
JUP/USD | 34 | 0x014a55502f55534400000000000000000000000000 | Base Asset: Jupiter Category: Crypto | 🟢 |
ETHFI/USD | 35 | 0x0145544846492f5553440000000000000000000000 | Base Asset: Ether.fi Category: Crypto | 🟡 |
ENA/USD | 36 | 0x01454e412f55534400000000000000000000000000 | Base Asset: Ethena Category: Crypto | 🟡 |
PYTH/USD | 37 | 0x01505954482f555344000000000000000000000000 | Base Asset: Pyth Network Category: Crypto | 🟢 |
HNT/USD | 38 | 0x01484e542f55534400000000000000000000000000 | Base Asset: Helium Category: Crypto | 🟡 |
SUI/USD | 39 | 0x015355492f55534400000000000000000000000000 | Base Asset: Sui Category: Crypto | 🟢 |
PEPE/USD | 40 | 0x01504550452f555344000000000000000000000000 | Base Asset: Pepe Category: Crypto | 🟡 |
QNT/USD | 41 | 0x01514e542f55534400000000000000000000000000 | Base Asset: Quant Category: Crypto | 🟢 |
AAVE/USD | 42 | 0x01414156452f555344000000000000000000000000 | Base Asset: Aave Category: Crypto | 🟢 |
S/USD | 43 | 0x01532f555344000000000000000000000000000000 | Base Asset: Sonic (prev. FTM) Category: Crypto | 🔴 |
ONDO/USD | 44 | 0x014f4e444f2f555344000000000000000000000000 | Base Asset: Ondo Category: Crypto | 🟢 |
TAO/USD | 45 | 0x0154414f2f55534400000000000000000000000000 | Base Asset: Bittensor Category: Crypto | 🟡 |
FET/USD | 46 | 0x014645542f55534400000000000000000000000000 | Base Asset: Artificial Superintelligence Alliance Category: Crypto | 🟢 |
RENDER/USD | 47 | 0x0152454e4445522f55534400000000000000000000 | Base Asset: Render Category: Crypto | 🟢 |
NOT/USD | 48 | 0x014e4f542f55534400000000000000000000000000 | Base Asset: Notcoin Category: Crypto | 🟡 |
RUNE/USD | 49 | 0x0152554e452f555344000000000000000000000000 | Base Asset: THORChain Category: Crypto | 🟡 |
TRUMP/USD | 50 | 0x015452554d502f5553440000000000000000000000 | Base Asset: Official Trump Category: Crypto | 🔴 |
USDX/USD | 51 | 0x01555344582f555344000000000000000000000000 | Base Asset: Hex Trust USD Category: Crypto | 🟢 |
JOULE/USD | 52 | 0x014a4f554c452f5553440000000000000000000000 | Base Asset: Joule Category: Crypto | âš« |
HBAR/USD | 53 | 0x01484241522f555344000000000000000000000000 | Base Asset: Hedera Category: Crypto | 🟡 |
PENGU/USD | 54 | 0x0150454e47552f5553440000000000000000000000 | Base Asset: Pudgy Penguins Category: Crypto | 🔴 |
HYPE/USD | 55 | 0x01485950452f555344000000000000000000000000 | Base Asset: Hyperliquid Category: Crypto | 🔴 |
APT/USD | 56 | 0x014150542f55534400000000000000000000000000 | Base Asset: Aptos Category: Crypto | 🟡 |
PAXG/USD | 57 | 0x01504158472f555344000000000000000000000000 | Base Asset: PAX Gold Category: Crypto | 🟢 |
BERA/USD | 58 | 0x01424552412f555344000000000000000000000000 | Base Asset: Berachain Category: Crypto | 🔴 |
Custom Feeds​
Custom Feeds, introduced in FIP.13, have a distinct risk profile compared to standard FTSO feeds. Unlike standard FTSO feeds, the security of a Custom Feed is conditional on the logic defined in its smart contract.
Name | Feed ID | Details |
---|---|---|
SFLR/USD | 0x2173464c522f555344000000000000000000000000 | Base Asset: Staked Flare (Sceptre) Contract: 0xD1002F3820ad32145b868aD889eC7753E3944c8D |
Need more feeds?​
FTSOv2 can scale up to 1000 feeds. If you need additional FTSOv2 feeds beyond what is currently available, you can raise a New Feed Request Issue on GitHub. When a feed request is submitted, it is reviewed by the FTSO Management Group, which is comprised of the FTSO data providers as outlined in FIP.08.
Build your first FTSOv2 app using Foundry, or read feeds offchain in languages like JavaScript, Python, Rust, and Go.