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

implement chart for historical pool data #6022

Closed
Tracked by #5940
0xean opened this issue Jan 16, 2024 · 2 comments · Fixed by #6624
Closed
Tracked by #5940

implement chart for historical pool data #6022

0xean opened this issue Jan 16, 2024 · 2 comments · Fixed by #6624
Assignees

Comments

@0xean
Copy link
Contributor

0xean commented Jan 16, 2024

AC

  • see thoryield for reference
  • data from midgard is available already
  • finish implementing chart (volume and liquidity line charts for time frames displayed 1W, 1M, All)
@0xean 0xean moved this from To schedule to Up next in ShapeShift Dashboard Jan 16, 2024
@0xean 0xean moved this from Up next / groomed to Backlog in ShapeShift Dashboard Apr 1, 2024
@0xean 0xean moved this from Backlog to Up next / groomed in ShapeShift Dashboard Apr 1, 2024
@0xean
Copy link
Contributor Author

0xean commented Apr 1, 2024

  swapsData: (poolAssetId: string, interval: Interval, count: number) => ({
    queryKey: ['midgardSwapsData', poolAssetId, interval, count],
    staleTime: 60_000,
    queryFn: async () => {
      const { data } = await axios.get<MidgardSwapHistoryResponse>(
        `${midgardUrl}/history/swaps?pool=${poolAssetId}&interval=${interval}&count=${count}`,
      )
      return data
    },
  }),
  tvl: (interval: Interval, count: number) => ({
    queryKey: ['tvl', interval, count],
    staleTime: 60_000,
    queryFn: async () => {
      const { data } = await axios.get<MidgardTvlHistoryResponse>(
        `${midgardUrl}/history/tvl?interval=${interval}&count=${count}`,
      )
      return data
    },
  }),

@0xean
Copy link
Contributor Author

0xean commented Apr 1, 2024

.../shapeshift/web/src/react-queries/queries/midgard.ts

@gomesalexandre gomesalexandre self-assigned this Apr 2, 2024
@gomesalexandre gomesalexandre moved this from Up next / groomed to In review in ShapeShift Dashboard Apr 3, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in ShapeShift Dashboard Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants