Index Price

market:index_price

Live index price updates per trading pair.

Channel: market:index_price:{pair} Example: market:index_price:BTC_USDC

No history, no recovery — pure real-time streaming. Updates arrive within milliseconds of the on-chain price change.

Payload

{
  "pair": "BTC_USDC",
  "value": "50123.45",
  "timestamp_ms": 1704067200100
}
FieldTypeDescription
pairstringTrading pair (e.g. BTC_USDC, ETH_USDC)
valuestringIndex price as a decimal string (full precision, no floating-point loss)
timestamp_msintegerServer emission timestamp in milliseconds

Subscribe — SDK Protobuf

Smallest frames, fastest deserialization. Recommended for HFT/algo clients.

import { Centrifuge } from "centrifuge/build/protobuf";

const client = new Centrifuge("wss://staging.kyan.sh/stream/websocket?format=protobuf");

const pairs = ["BTC_USDC", "ETH_USDC"];
for (const pair of pairs) {
  const sub = client.newSubscription(`market:index_price:${pair}`);

  sub.on("publication", (ctx) => {
    // Protobuf transport delivers data as Uint8Array — decode to JSON
    const data = ctx.data instanceof Uint8Array
      ? JSON.parse(new TextDecoder().decode(ctx.data))
      : ctx.data;

    const { pair, value, timestamp_ms } = data;
    // value is a string — parse to number or Decimal as needed
    console.log(pair, value, timestamp_ms);
  });

  sub.subscribe();
}

client.connect();

Subscribe — SDK JSON

import { Centrifuge } from "centrifuge";

const client = new Centrifuge("wss://staging.kyan.sh/stream/websocket");
const sub = client.newSubscription("market:index_price:ETH_USDC");

sub.on("publication", (ctx) => {
  const { pair, value, timestamp_ms } = ctx.data;
});

sub.subscribe();
client.connect();

Notes

  • Deduplicated — only publishes when the price value changes for a given pair.
  • No recovery — on reconnect, clients receive the next price change (no replay of last known price)

Related channels

Channels providing related data.

ChannelWhy
Index CandlesOHLC aggregation of this feed over configurable time periods.
Perps BBOPerps top-of-book. Basis = perp mid - index.
Funding RateDerived from the basis (perp price - index).
Options BBOOptions mark price and Greeks are computed relative to spot index.
SVI SurfaceSVI defines IV as a function of moneyness (log(K/F)), which depends on the forward derived from spot.
Interest RateTogether with index price, defines the forward: F = S * e^(r*T).