Market Cap: $2.5665T -2.09%
Volume(24h): $64.1207B 43.32%
Fear & Greed Index:

35 - Fear

  • Market Cap: $2.5665T -2.09%
  • Volume(24h): $64.1207B 43.32%
  • Fear & Greed Index:
  • Market Cap: $2.5665T -2.09%
Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos
Top Cryptospedia

Select Language

Select Language

Select Currency

Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos

How to Change the Chart Timeframe on OKX

OKX行情图表支持1m至1M共10种预设周期,切换时自动调用`/api/v5/market/candles`获取300根K线,UTC时间戳、动态渲染与服务端聚合确保数据连续性与低延迟响应。(155字符)

Nov 04, 2026 at 01:19 pm

Understanding Timeframe Selection Mechanics

1. OKX chart interface allows users to switch between predefined intervals without reloading the page.

2. Each timeframe corresponds to a specific bar duration: 1m, 3m, 5m, 15m, 30m, 1H, 4H, 1D, 1W, and 1M.

3. Clicking a timeframe button triggers an internal API call to /api/v5/market/candles, fetching the latest 300 bars for that interval.

4. The chart engine automatically adjusts axis granularity, label density, and candle width based on selected resolution.

5. All timestamps are rendered in UTC, regardless of user’s local timezone or browser settings.

Data Source Behavior Across Timeframes

1. Shorter intervals like 1m and 5m pull from the /market/candles endpoint, which serves hot-cached data for the past 90 days.

2. Longer intervals such as 1D and 1W rely on the same endpoint but aggregate raw tick data server-side before transmission.

3. When selecting 1M, the system internally converts the request into a 30-day rolling window and applies interpolation logic for missing months.

4. No historical gaps appear in displayed candles because OKX backfills null periods with last-known close values for continuity.

5. Volume bars beneath the price chart scale proportionally—larger timeframes compress volume height while preserving relative magnitude ratios.

Interaction Flow During Timeframe Switch

1. User clicks “4H” after viewing 15m chart; UI immediately disables all controls and displays a loading spinner.

2. JavaScript initiates parallel requests: one for new candle data and another for corresponding ticker snapshot.

3. Upon response, the chart library discards previous series objects and constructs fresh SVG path elements using updated timestamps and OHLC arrays.

4. Zoom level resets to fit full visible range unless user had manually adjusted viewport prior to change.

5. Indicator overlays like MACD or RSI recalculate using newly fetched data points, not cached intermediate values.

Limitations and Edge Cases

1. Attempting to select 1m during exchange maintenance returns error code 503 with message “Market data temporarily unavailable”.

2. Switching to 1W while viewing BTC-USDT pair causes automatic instrument fallback to BTC-USD if USDT settlement is inactive for weekly aggregation.

3. Custom timeframes outside official list cannot be entered manually—even editing URL parameters results in redirection to default 1H.

4. Mobile web interface restricts selection to intervals ≥15m to prevent excessive rendering load on low-end devices.

5. WebSocket subscriptions do not auto-resubscribe when timeframe changes; real-time updates pause until next manual refresh or navigation event.

Frequently Asked Questions

Q: Does changing timeframe affect orderbook depth visibility?A: No. Orderbook depth remains tied to current trading pair and market state—not chart resolution. Depth updates continue independently via WebSocket channel.

Q: Why does 1D chart sometimes show fewer candles than expected for a given date range?A: Because OKX excludes weekends and holidays where no trading occurred on certain derivatives markets, even if spot markets were active.

Q: Can I export CSV data matching the currently selected timeframe?A: Yes. Click the three-dot menu icon on the chart toolbar and select “Export data”. Output includes timestamp, open, high, low, close, and base currency volume fields.

Q: Is there a way to lock a custom date range while switching timeframes?A: Not natively. Date range resets to “last 24 hours” for intervals ≤1H and “last 30 days” for intervals ≥4H upon each switch.

Disclaimer:info@kdj.com

The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!

If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.

Related knowledge

See all articles

User not found or password invalid

Your input is correct