Skip to main content

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:

  1. Category: Indicates the type of asset - Crypto: 01, Forex: 02, Commodity: 03, Stock: 04

  2. Hex-Encoded Feed Name: The name of the feed is converted to a hexadecimal format.

  3. 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 of FLR/USD)
  • Zero Padding: The category and hex-encoded feed name combined and padded: 01464c522f55534400000000000000000000000000
  • Final ID: Adding the 0x prefix results in 0x01464c522f55534400000000000000000000000000
GetFeedId.sol
// 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");
}
}
warning

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.

Feed NameFeed IndexFeed IDBase AssetDecimalsCategory
FLR/USD00x01464c522f55534400000000000000000000000000Flare7Crypto
SGB/USD10x015347422f55534400000000000000000000000000Songbird8Crypto
BTC/USD20x014254432f55534400000000000000000000000000Bitcoin2Crypto
XRP/USD30x015852502f55534400000000000000000000000000XRP6Crypto
LTC/USD40x014c54432f55534400000000000000000000000000Litecoin5Crypto
XLM/USD50x01584c4d2f55534400000000000000000000000000Stellar6Crypto
DOGE/USD60x01444f47452f555344000000000000000000000000Dogecoin6Crypto
ADA/USD70x014144412f55534400000000000000000000000000Cardano6Crypto
ALGO/USD80x01414c474f2f555344000000000000000000000000Algorand6Crypto
ETH/USD90x014554482f55534400000000000000000000000000Ethereum3Crypto
FIL/USD100x0146494c2f55534400000000000000000000000000Filecoin5Crypto
ARB/USD110x014152422f55534400000000000000000000000000Arbitrum6Crypto
AVAX/USD120x01415641582f555344000000000000000000000000Avalanche5Crypto
BNB/USD130x01424e422f55534400000000000000000000000000BNB4Crypto
MATIC/USD140x014d415449432f5553440000000000000000000000Polygon6Crypto
SOL/USD150x01534f4c2f55534400000000000000000000000000Solana4Crypto
USDC/USD160x01555344432f555344000000000000000000000000USDC5Crypto
USDT/USD170x01555344542f555344000000000000000000000000Tether5Crypto
XDC/USD180x015844432f55534400000000000000000000000000XDC Network7Crypto
TRX/USD190x015452582f55534400000000000000000000000000TRON6Crypto
LINK/USD200x014c494e4b2f555344000000000000000000000000Chainlink5Crypto
ATOM/USD210x0141544f4d2f555344000000000000000000000000Cosmos Hub5Crypto
DOT/USD220x01444f542f55534400000000000000000000000000Polkadot5Crypto
TON/USD230x01544f4e2f55534400000000000000000000000000Toncoin5Crypto
ICP/USD240x014943502f55534400000000000000000000000000Internet Computer5Crypto
SHIB/USD250x01534849422f555344000000000000000000000000Shiba Inu10Crypto
DAI/USD260x014441492f55534400000000000000000000000000Dai5Crypto
BCH/USD270x014243482f55534400000000000000000000000000Bitcoin Cash4Crypto
NEAR/USD280x014e4541522f555344000000000000000000000000NEAR Protocol5Crypto
LEO/USD290x014c454f2f55534400000000000000000000000000LEO Token5Crypto
UNI/USD300x01554e492f55534400000000000000000000000000Uniswap5Crypto
ETC/USD310x014554432f55534400000000000000000000000000Ethereum Classic5Crypto
WIF/USD320x015749462f55534400000000000000000000000000dogwifhat5Crypto
BONK/USD330x01424f4e4b2f555344000000000000000000000000Bonk10Crypto
JUP/USD340x014a55502f55534400000000000000000000000000Jupiter5Crypto
ETHFI/USD350x0145544846492f5553440000000000000000000000Ether.fi5Crypto
ENA/USD360x01454e412f55534400000000000000000000000000Ethena6Crypto
PYTH/USD370x01505954482f555344000000000000000000000000Pyth Network6Crypto

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.


What's next?

Build your first FTSOv2 app using Foundry, or read feeds offchain in languages like JavaScript, Python, Rust, and Go.