This commit is contained in:
eric
2025-11-13 05:05:53 +08:00
parent cbdc65f56e
commit 891af61146
691 changed files with 83952 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
'use client'
export interface FinancialDataResponse {
id: string
cell: {
fund_id: string
fund_nm: string
price: string
volume: string
amount: string
index_nm: string
mt_fee: string
mt_fee_tips: string
issuer_nm: string
urls: string
est_val_dt: string
increase_rt: string
discount_rt: string
}
}
export interface FinancialData {
code: string
name: string
price: number
volume: string
amount: string
index_nm: string
mt_fee: string
mt_fee_tips: string
issuer_nm: string
issuer_url: string
navDate: string
increase_rt: string
discount_rt: string
}
export async function fetchFinancialData(): Promise<FinancialData[]> {
const response = await fetch('/api/financial')
if (!response.ok) {
throw new Error('Failed to fetch data')
}
return response.json()
}