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-2600] Add Pair field for trades count in the past 24 hours #1480

Conversation

mad2sm0key
Copy link
Contributor

Reasoning

  • front end requires information regarding pair swaps performed in the last 24 hours

Proposed Changes

  • add tradesCount24h field to Pair model + resolver method
  • refactor compute method for 'tradesCount' to use ESTransactions service
  • add bulk get method and dataloader for the new field
  • add new field to pair cache warmer
  • add sorting and filtering by tradesCount24h to filteredPairs query

How to test

  • Running the query below should return only the pairs with more than 30 trades performed in the last 24 hours
query  {
  filteredPairs(
    filters: {
      minTradesCount24h: 30
    }, 
    pagination: { first: 20 }, 
    sorting: {
    	sortField:TRADES_COUNT_24, 
    	sortOrder:DESC
    }
  ) {
    edges {
      cursor
      node {
        address
        firstToken { identifier }
        secondToken { identifier }
        tradesCount
        tradesCount24h
      }
    }
  }
}

@mad2sm0key mad2sm0key merged commit 2c5beee into development Sep 19, 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.

3 participants