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
-
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 |
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.
Name | Index | Feed ID | Details | Risk |
---|---|---|---|---|
FLR/USD | 0 | 0x01464c522f55534400000000000000000000000000 | Base Asset: Flare Decimals: 7 Category: Crypto | 🟢 |
SGB/USD | 1 | 0x015347422f55534400000000000000000000000000 | Base Asset: Songbird Decimals: 8 Category: Crypto | 🟡 |
BTC/USD | 2 | 0x014254432f55534400000000000000000000000000 | Base Asset: Bitcoin Decimals: 2 Category: Crypto | 🟢 |
XRP/USD | 3 | 0x015852502f55534400000000000000000000000000 | Base Asset: XRP Decimals: 6 Category: Crypto | 🟢 |
LTC/USD | 4 | 0x014c54432f55534400000000000000000000000000 | Base Asset: Litecoin Decimals: 5 Category: Crypto | 🟢 |
XLM/USD | 5 | 0x01584c4d2f55534400000000000000000000000000 | Base Asset: Stellar Decimals: 6 Category: Crypto | 🟡 |
DOGE/USD | 6 | 0x01444f47452f555344000000000000000000000000 | Base Asset: Dogecoin Decimals: 6 Category: Crypto | 🟡 |
ADA/USD | 7 | 0x014144412f55534400000000000000000000000000 | Base Asset: Cardano Decimals: 6 Category: Crypto | 🟢 |
ALGO/USD | 8 | 0x01414c474f2f555344000000000000000000000000 | Base Asset: Algorand Decimals: 6 Category: Crypto | 🟡 |
ETH/USD | 9 | 0x014554482f55534400000000000000000000000000 | Base Asset: Ethereum Decimals: 3 Category: Crypto | 🟢 |
FIL/USD | 10 | 0x0146494c2f55534400000000000000000000000000 | Base Asset: Filecoin Decimals: 5 Category: Crypto | 🟢 |
ARB/USD | 11 | 0x014152422f55534400000000000000000000000000 | Base Asset: Arbitrum Decimals: 6 Category: Crypto | 🟢 |
AVAX/USD | 12 | 0x01415641582f555344000000000000000000000000 | Base Asset: Avalanche Decimals: 5 Category: Crypto | 🟢 |
BNB/USD | 13 | 0x01424e422f55534400000000000000000000000000 | Base Asset: BNB Decimals: 4 Category: Crypto | 🟢 |
POL/USD | 14 | 0x01504f4c2f55534400000000000000000000000000 | Base Asset: POL (ex-MATIC) Decimals: 6 Category: Crypto | 🟢 |
SOL/USD | 15 | 0x01534f4c2f55534400000000000000000000000000 | Base Asset: Solana Decimals: 4 Category: Crypto | 🟢 |
USDC/USD | 16 | 0x01555344432f555344000000000000000000000000 | Base Asset: USDC Decimals: 5 Category: Crypto | 🟢 |
USDT/USD | 17 | 0x01555344542f555344000000000000000000000000 | Base Asset: Tether Decimals: 5 Category: Crypto | 🟢 |
XDC/USD | 18 | 0x015844432f55534400000000000000000000000000 | Base Asset: XDC Network Decimals: 7 Category: Crypto | 🟡 |
TRX/USD | 19 | 0x015452582f55534400000000000000000000000000 | Base Asset: TRON Decimals: 6 Category: Crypto | 🟡 |
LINK/USD | 20 | 0x014c494e4b2f555344000000000000000000000000 | Base Asset: Chainlink Decimals: 5 Category: Crypto | 🟢 |
ATOM/USD | 21 | 0x0141544f4d2f555344000000000000000000000000 | Base Asset: Cosmos Hub Decimals: 5 Category: Crypto | 🟢 |
DOT/USD | 22 | 0x01444f542f55534400000000000000000000000000 | Base Asset: Polkadot Decimals: 5 Category: Crypto | 🟢 |
TON/USD | 23 | 0x01544f4e2f55534400000000000000000000000000 | Base Asset: Toncoin Decimals: 5 Category: Crypto | 🟢 |
ICP/USD | 24 | 0x014943502f55534400000000000000000000000000 | Base Asset: Internet Computer Decimals: 5 Category: Crypto | 🟢 |
SHIB/USD | 25 | 0x01534849422f555344000000000000000000000000 | Base Asset: Shiba Inu Decimals: 10 Category: Crypto | 🔴 |
DAI/USD | 26 | 0x014441492f55534400000000000000000000000000 | Base Asset: Dai Decimals: 5 Category: Crypto | 🟢 |
BCH/USD | 27 | 0x014243482f55534400000000000000000000000000 | Base Asset: Bitcoin Cash Decimals: 4 Category: Crypto | 🟢 |
NEAR/USD | 28 | 0x014e4541522f555344000000000000000000000000 | Base Asset: NEAR Protocol Decimals: 5 Category: Crypto | 🟢 |
LEO/USD | 29 | 0x014c454f2f55534400000000000000000000000000 | Base Asset: LEO Token Decimals: 5 Category: Crypto | 🔴 |
UNI/USD | 30 | 0x01554e492f55534400000000000000000000000000 | Base Asset: Uniswap Decimals: 5 Category: Crypto | 🟢 |
ETC/USD | 31 | 0x014554432f55534400000000000000000000000000 | Base Asset: Ethereum Classic Decimals: 5 Category: Crypto | 🟡 |
WIF/USD | 32 | 0x015749462f55534400000000000000000000000000 | Base Asset: dogwifhat Decimals: 5 Category: Crypto | 🔴 |
BONK/USD | 33 | 0x01424f4e4b2f555344000000000000000000000000 | Base Asset: Bonk Decimals: 10 Category: Crypto | 🔴 |
JUP/USD | 34 | 0x014a55502f55534400000000000000000000000000 | Base Asset: Jupiter Decimals: 5 Category: Crypto | 🟢 |
ETHFI/USD | 35 | 0x0145544846492f5553440000000000000000000000 | Base Asset: Ether.fi Decimals: 5 Category: Crypto | 🟡 |
ENA/USD | 36 | 0x01454e412f55534400000000000000000000000000 | Base Asset: Ethena Decimals: 6 Category: Crypto | 🔴 |
PYTH/USD | 37 | 0x01505954482f555344000000000000000000000000 | Base Asset: Pyth Network Decimals: 6 Category: Crypto | 🟢 |
HNT/USD | 38 | 0x01484e542f55534400000000000000000000000000 | Base Asset: Helium Decimals: 5 Category: Crypto | 🟡 |
SUI/USD | 39 | 0x015355492f55534400000000000000000000000000 | Base Asset: Sui Decimals: 5 Category: Crypto | 🟢 |
PEPE/USD | 40 | 0x01504550452f555344000000000000000000000000 | Base Asset: Pepe Decimals: 10 Category: Crypto | 🔴 |
QNT/USD | 41 | 0x01514e542f55534400000000000000000000000000 | Base Asset: Quant Decimals: 5 Category: Crypto | 🟡 |
AAVE/USD | 42 | 0x01414156452f555344000000000000000000000000 | Base Asset: Aave Decimals: 4 Category: Crypto | 🟢 |
FTM/USD | 43 | 0x0146544d2f55534400000000000000000000000000 | Base Asset: Fantom Decimals: 6 Category: Crypto | 🟡 |
ONDO/USD | 44 | 0x014f4e444f2f555344000000000000000000000000 | Base Asset: Ondo Decimals: 6 Category: Crypto | 🟡 |
TAO/USD | 45 | 0x0154414f2f55534400000000000000000000000000 | Base Asset: Bittensor Decimals: 4 Category: Crypto | 🟡 |
FET/USD | 46 | 0x014645542f55534400000000000000000000000000 | Base Asset: Artificial Superintelligence Alliance Decimals: 5 Category: Crypto | 🟢 |
RENDER/USD | 47 | 0x0152454e4445522f55534400000000000000000000 | Base Asset: Render Decimals: 5 Category: Crypto | 🟢 |
NOT/USD | 48 | 0x014e4f542f55534400000000000000000000000000 | Base Asset: Notcoin Decimals: 8 Category: Crypto | 🟡 |
RUNE/USD | 49 | 0x0152554e452f555344000000000000000000000000 | Base Asset: THORChain Decimals: 5 Category: Crypto | 🟡 |
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.