Consuming the OracleConsuming the Feeds

Consuming the Feeds

Mecone publishes every flagship index as a cryptographically signed feed on the Stork oracle network (oracle id mecon, assets namespaced MECON_*). All six flagship feeds are signed each cycle from a production publisher and registered on Stork. There are two ways to consume them.

A. On-chain, via Stork (EVM venues)

Reading a Mecone index on-chain is identical to reading any Stork feed:

  • Feed id = keccak256("MECON_<symbol>"). Stork’s encoded asset id is the keccak hash of the plaintext symbol.
  • Call getTemporalNumericValueV1(bytes32 id) on the Stork contract; it returns { uint64 timestampNs, int192 quantizedValue }.
  • Values are quantized ×10¹⁸ (divide by 1e18 to de-quantize).
  • $ valuations are published in -billions** so they quantize in line with the macro percentages: `MOAI` reading `~921` means **\921B. Macro % feeds read directly (2.13 = 2.13%).
struct TemporalNumericValue { uint64 timestampNs; int192 quantizedValue; }
interface IStork {
    function getTemporalNumericValueV1(bytes32 id) external view returns (TemporalNumericValue memory);
}
 
// Read US GDP:
bytes32 id = keccak256("MECON_MGDP");
TemporalNumericValue memory v = IStork(STORK).getTemporalNumericValueV1(id);
int256 gdp = int256(v.quantizedValue); // 1e18-scaled -> 2.13% = 2.13e18

We ship a reference consumer (MeconeStorkConsumer) that maps a short market key to its feed id and adds a tight staleness window on top of Stork’s, plus a minimal reference perp that settles against it, both live on testnet (quickstart).

⚠️

Stork is a pull oracle. The on-chain value for a feed updates when someone submits Stork’s signed payload (updateTemporalNumericValuesV1, fee via getUpdateFeeV1). Venues either run Stork’s open-source chain-pusher with an API key entitled to MECON_*, or submit the signed update atomically in the transaction that consumes it. For pilots we run the pusher and arrange the MECON_* entitlement on your Stork key.

Feed ids (same on mainnet and testnet)

SymbolStork asset idFeed id (bytes32)
MGDPMECON_MGDP0xc1b9ff58ed9bcf48022dd2c866207d7d4300802f6b4582b3b096817be2f233f0
MCPIMECON_MCPI0x09e722e06a32236b1653a32d00d58f38d9d52156cce4e510edcf6c0be3dc2e22
MUNEMPMECON_MUNEMP0xc960b63f8aa14945c9c86e08309fe2686b415058c1dd3677bf8538c19f593cda
MOAIMECON_MOAI0xc0be26c2318039c5bd6715deae6f49f873ba7e5226529659119338c137f2a192
MANTHMECON_MANTH0x9b9da9435546ad30be4a18c1afd6fdfd202c1d57088bfb21bd1dc2d9f9ca7e80
MKRKNMECON_MKRKN0x7f7a61fa3ce529802be4d62d7bc8797bc1a9d3abdbee571fd088569f7fa6d233

Stork contract addresses per chain: docs.stork.network/resources/contract-addresses/evm.

B. Off-chain feed

If you post your own oracle price (an internal oracle, or a HIP-3 style deployer feeding an L1), pull the value directly from the Mecone API and post it:

curl https://api.mecone.trade/api/markets/us-gdp
# -> { "index_now": 2.12…, "unit": "%", "funding_rate_pct": …, … }

index_now is the index level in its natural unit; the same values are available over Stork’s REST/WS once MECON_* read access is enabled on your Stork key (we arrange this). Full field reference: API.