feat: ai完成stock模块搭建

This commit is contained in:
橙子
2025-03-08 22:14:26 +08:00
parent 337088c908
commit 82865631fc
26 changed files with 1044 additions and 294 deletions

View File

@@ -0,0 +1,49 @@
import request from "@/config/axios/service";
// 获取股票新闻列表
export function getStockNews(params) {
return request({
url: "/stock/news",
method: "get",
params
});
}
// 获取用户股票持仓
export function getUserHoldings() {
return request({
url: "/stock/user-holdings",
method: "get"
});
}
// 获取用户交易记录
export function getUserTransactions(stockCode) {
return request({
url: "/stock/user-transactions",
method: "get",
params: { stockCode }
});
}
// 获取股票价格记录
export function getStockPriceRecords(stockId, startTime, endTime, periodType = 'Hour') {
return request({
url: "/stock/price-records",
method: "get",
params: {
StockId: stockId,
StartTime: startTime,
EndTime: endTime,
PeriodType: periodType
}
});
}
// 获取股市列表
export function getStockMarkets() {
return request({
url: "/stock/markets",
method: "get"
});
}