Skip to content
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

[Refactor] 將 CFD呈現上增加 無限滾輪 or Pagination, 並把 開倉與歷史成本分成兩個api call #1567

Open
2 tasks
Tracked by #1548
TinyMurky opened this issue Mar 20, 2024 · 0 comments
Assignees
Labels
8 hard level 8 enhancement New feature or request

Comments

@TinyMurky
Copy link
Contributor

TinyMurky commented Mar 20, 2024

說明:

以下後端 API新增Query功能 (API文件點我)

GET /api/v1/cfds

新增如下:

  • state: 分成 OPENING, CLOSED, FREEZE,方便拆分成開倉中與歷史CFD
  • begin, end 可以輸入YYYY-MM-DD格式來搜尋 created_time
  • limit :一次預設 20筆,但可以改成更多
  • Page: 從1開始,會依照limit的數量算出offset達到page的效果 (也就是說前端不用算offset, 只要page一直往上加就可以呼叫到後面的參數)

希望完成的事情

  • 開倉中和歷史紀錄分開call api, 使用者點過去的時候再call api,資料讀取速度加快(目前是一次call出來再從前端分)
  • 用無線卷軸或是bolt-transaction history 點擊載入更多的方法,讓資料不要一次call太多到前端

備註

begin, end 是用Date的格式,如果需要改成timestamp 格式請通知 Murky

圖片

@TinyMurky TinyMurky self-assigned this Mar 20, 2024
@TinyMurky TinyMurky added 8 hard level 8 enhancement New feature or request labels Mar 20, 2024
@TinyMurky TinyMurky assigned arealclimber and unassigned TinyMurky Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8 hard level 8 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants