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-2457] Extra fields on Pair model for previous 24h data (fees, volume, liquidity) #1370

Conversation

mad2sm0key
Copy link
Contributor

Reasoning

  • compute and display % change over the past 24 hours for pair volume, fees and liquidity

Proposed Changes

  • add fields and resolvers on Pair model : previous24hLockedValueUSD, previous24hVolumeUSD, previous24hFeesUSD
  • add compute methods and caching for new fields

How to test

query {
  filteredPairs(
    filters:{
    }
    pagination:{
      first:200
    }
    sorting: {
      sortField:TRADES_COUNT
      sortOrder:DESC
    }
  ) {
    edges {
      cursor
      node {
        address
        firstToken {
          identifier
        }
        secondToken {
          identifier
        }
        feesUSD24h
        previous24hFeesUSD
        volumeUSD24h
        previous24hVolumeUSD
        lockedValueUSD
       	previous24hLockedValueUSD
      }
    }
    pageInfo {
      startCursor
      endCursor
    }
    pageData {
      count
      limit
      offset
    }
  }
}

@bogdan-rosianu bogdan-rosianu self-requested a review June 18, 2024 07:35
@cfaur09
Copy link

cfaur09 commented Jun 18, 2024

Tested 🟢

@mad2sm0key mad2sm0key merged commit 11dd10b into development Jun 18, 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