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

[SERVICES-2315] Tokens query extra fields #1330

Merged
merged 17 commits into from
May 9, 2024

Conversation

mad2sm0key
Copy link
Contributor

@mad2sm0key mad2sm0key commented Apr 22, 2024

Reasoning

  • expose previous 7 days price, volume, liquidity and token creation date in tokens query

Proposed Changes

  • add extra optional fields and resolvers to EsdtToken model : previous7dPrice, volumeUSD24h, liquidityUSD, createdAt
  • allow custom intervals by using start and time arguments in getLatestCompleteValues timescaledb query
  • add methods for computing the new fields using data from the analytics service and elastic search (for token creation timestamp)

How to test

query {
  tokens(identifiers: []) {
    identifier
    previous7dPrice
    volumeUSD24h
    liquidityUSD
    createdAt
  }
}

cfaur09
cfaur09 previously approved these changes Apr 22, 2024
- remove "priceChange24h" field and resolver
- rename volumeUSD24h field and fix computation
- use subquery for gapfilling in "getLatestCompleteValues" query
@mad2sm0key mad2sm0key merged commit 230a5bd into development May 9, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants