fix: Forex data source improvements and Tiingo subscription hints

This commit is contained in:
TIANHE
2026-01-12 04:28:42 +08:00
parent bd5db753df
commit 43523d4796
7 changed files with 157 additions and 17 deletions
@@ -1504,7 +1504,12 @@ registerOverlay({
if (response.code === 1 && response.data && Array.isArray(response.data)) {
formattedData = formatKlineData(response.data)
} else {
throw new Error(response.msg || '获取K线数据失败')
// 特殊处理 Tiingo 订阅限制提示
let errMsg = response.msg || '获取K线数据失败'
if (response.hint === 'tiingo_subscription') {
errMsg = proxy.$t('dashboard.indicator.error.tiingoSubscription') || 'Forex 1-minute data requires Tiingo paid subscription'
}
throw new Error(errMsg)
}
} catch (apiErr) {
throw apiErr