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

[ MEX-662 ] Trading activity for Tokens and Pairs #1550

Merged

Conversation

EmanuelMiron
Copy link

@EmanuelMiron EmanuelMiron commented Jan 24, 2025

Reasoning

  • Fetching Swap Transactions from the REST API didn't catch all required transactions correctly

Proposed Changes

  • New Endpoint for retrieving Trading Activity for both Tokens and Pairs
  • Using Events Index to catch all transactions

How to test

Replace "erd1qqqqqqqqqqqqqpgq5jnjpsukhl295ry3wjrd3gtff0amrgux2jpsz3reum" with any other pair address or token Identifier

tradingActivity(series: "erd1qqqqqqqqqqqqqpgq5jnjpsukhl295ry3wjrd3gtff0amrgux2jpsz3reum") {
    hash,
    timestamp,
    action,
    inputToken {
      amount,
      tokenIdentifier,
      tokenNonce
    },
    outputToken {
      amount,
      tokenIdentifier,
      tokenNonce
    }
  }

cfaur09
cfaur09 previously approved these changes Jan 27, 2025
Copy link

@cfaur09 cfaur09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 🟢

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 23.45679% with 62 lines in your changes missing coverage. Please review.

Project coverage is 52.92%. Comparing base (e29ea3d) to head (9af8f25).
Report is 64 commits behind head on development.

Files with missing lines Patch % Lines
...es/analytics/services/analytics.compute.service.ts 14.28% 41 Missing and 7 partials ⚠️
...vices/elastic-search/services/es.events.service.ts 0.00% 12 Missing ⚠️
...modules/analytics/models/trading.activity.model.ts 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1550      +/-   ##
===============================================
- Coverage        53.82%   52.92%   -0.91%     
===============================================
  Files              263      269       +6     
  Lines            10331    10653     +322     
  Branches           797      824      +27     
===============================================
+ Hits              5561     5638      +77     
- Misses            4056     4276     +220     
- Partials           714      739      +25     
Flag Coverage Δ
unittests 52.92% <23.45%> (-0.91%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@claudiulataretu claudiulataretu merged commit 6a59c0b into development Jan 30, 2025
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.

4 participants