Market Data
useTickerStream
Software Development Kits
[EVM] React Components SDK
- Overview
- Getting started
- Configuration
- Theming
- Wallet connect
- Framework Guides
- Page Components
- Block Components
[EVM] React Hooks SDK
[EVM] Core SDK
[EVM] Perp SDK
Market Data
useTickerStream
This hooks streams market information data for given symbol (e.g. PERP_BTC_USDC
).
Example
const marketInfo = useTickerStream("PERP_BTC_USDC");
return (
<>
<div className="flex flex-col">
<div className="color-gray">Mark</div>
<div>{stream.mark_price}</div>
</div>
<div className="flex flex-col">
<div className="color-gray">Index</div>
<div>{stream.index_price}</div>
</div>
<div className="flex flex-col">
<div className="color-gray">24h volume</div>
<div>{stream["24h_amount"]}</div>
</div>
</>
);
On this page