-
Notifications
You must be signed in to change notification settings - Fork 1
Implement AI prediction history card, news UI, and API connections #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1f51834
4343148
29fe796
0142761
74e535a
20ed3e1
2684bc5
7f229e1
910c17a
709c013
9296631
5a3161e
e00cd22
b649e73
cd91f2e
5b25992
7c0f74a
bbcbfd9
7de8006
51e4d66
a883c45
4be789a
0c3a4ef
1a6338f
1cd08c7
d9b8e50
72c3351
74b332e
7cd7c5b
984bdf3
bc4103f
a4163ae
5e69963
7b8c2d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||
| import { instance } from "../../utils/axios"; | ||||||
|
|
||||||
| export const getAiPredictions = async (ticker) => { | ||||||
| try { | ||||||
| const res = await instance.get(`/api/v1/crypto/${ticker}/predictions`); | ||||||
| //console.log(res); | ||||||
| return res.data; | ||||||
| } catch (error) { | ||||||
| console.error("코인 예측 히스토리 불러오기 실패: ", error); | ||||||
| throw error; | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| export const getPredictionNews = async (ticker, predictionId) => { | ||||||
| try { | ||||||
| const res = await instance.get(`/api/v1/crypto/${ticker}/predictions/${predictionId}/news`); | ||||||
| console.log(res); | ||||||
|
||||||
| console.log(res); | |
| //console.log(res); |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,2 +1,13 @@ | ||||||||||
| const BACKEND = import.meta.env.VITE_BACKEND_URL; | ||||||||||
| import { instance } from "../../utils/axios"; | ||||||||||
|
|
||||||||||
| export const getCandleInfo = async (ticker, unit=1, count=200) => { | ||||||||||
| try { | ||||||||||
| const res = await instance.get(`/api/v1/market/candles/${ticker}?unit=${unit}&count=${count}`); | ||||||||||
|
||||||||||
| const res = await instance.get(`/api/v1/market/candles/${ticker}?unit=${unit}&count=${count}`); | |
| const res = await instance.get(`/api/v1/market/candles/${ticker}`, { | |
| params: { unit, count }, | |
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { instance } from "../../utils/axios"; | ||
|
|
||
| export const getCoinNews = async (ticker, page=0, size=20) => { | ||
| try { | ||
| const res = await instance.get(`/api/v1/crypto/${ticker}/news/recent`, { | ||
| params: {page, size} | ||
| }); | ||
| //console.log(res); | ||
| return res.data; | ||
| } catch (error) { | ||
| console.error("코인 관련 뉴스 불러오기 실패: ", error); | ||
| throw error; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { instance } from "../../utils/axios"; | ||
|
|
||
| export const getTickers = async (marketType = "KRW", sortBy = "tradeValue") => { | ||
| try { | ||
| const res = await instance.get("/api/v1/market/tickers", { | ||
| params: { marketType, sortBy }, | ||
| }); | ||
| return res.data; | ||
| } catch (error) { | ||
| console.error("코인 시세 목록 불러오기 실패: ", error); | ||
| throw error; | ||
| } | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { instance } from "../../utils/axios"; | ||
|
|
||
| export const getNewsAnalysis = async (page = 0, size = 20) => { | ||
| try { | ||
| const res = await instance.get("/api/v1/news/analysis", { | ||
| params: { page, size }, | ||
| }); | ||
| return res.data; | ||
| } catch (error) { | ||
| console.error("뉴스 분석 목록 불러오기 실패: ", error); | ||
| throw error; | ||
| } | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { instance } from "../../utils/axios"; | ||
|
|
||
| export const searchNews = async (keyword, page = 0, size = 20) => { | ||
| try { | ||
| const res = await instance.get("/api/v1/news/search", { | ||
| params: { keyword, page, size }, | ||
| }); | ||
| return res.data; | ||
| } catch (error) { | ||
| console.error("뉴스 검색 실패: ", error); | ||
| throw error; | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
iconify-iconpackage is added underdevDependencies, but it is used at runtime in multiple components (RoundButton, SearchBar, CoinListTable, HistoryCard, etc.) as a web component. Since it is needed in the production bundle, it should be independenciesinstead ofdevDependencies. While Vite will still bundle it during development, this is semantically incorrect and could cause issues in certain build/deployment pipelines that strip devDependencies.