MarketBar
The MarketBar component provides a concise overview of important market details such as the last price, open interest, notional cap, and funding rates. It's structured to give traders quick insights into market conditions.
All components of the website are based on this selected token pair.
Overview:
Component Structure: This component uses
styled-componentsfor styling. It includes sub-components likeMarketInfo,BlinkingPrice,MarketDepths, andMarketFundingRateto display various pieces of market data.Hooks Used:
useActiveMarketto fetch the currently active market details.useMarketOpenInterestanduseMarketNotionalCapfrom@symmio/frontend-sdk/state/hedger/hooksto retrieve the market's open interest and notional cap, respectively.
Key Features:
Market Information: Displays key market details including the last price, which is highlighted using the
BlinkingPricecomponent for visual emphasis on price updates.Open Interest & Notional Cap: Presents the market's open interest and the specific symbol's notional cap.
Funding Rates & Market Depth: Integrates with
MarketFundingRateandMarketDepthscomponents to offer a broader view of the market, including funding rates and depth chart visualizations.
State Interactions:
Market Data: Leverages global state management to access the current market data, open interest, and notional cap information.
API State Management: Utilizes
ApiStatefrom@symmio/frontend-sdk/types/apito handle loading and error states, ensuring that the component reacts appropriately to the availability of data.
Last updated