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

Enhance fees report #234

Merged
merged 19 commits into from
Sep 19, 2022
Merged

Conversation

ZIMkaRU
Copy link
Member

@ZIMkaRU ZIMkaRU commented Sep 14, 2022

This PR enhances the fees report. Basic changes:

  • previous methods getFeesReport and getFeesReportCsv are marked as deprecated and after UI implementation and sending to production would be removed in the next PR
  • adds new methods getTotalFeesReport and getTotalFeesReportCsv
  • adds 228 category for margin funding fee
  • adds v30 DB migration
  • adds corresponding test coverage

Request example:

{
  "auth": {
    "token": "user-token"
  },
  "method": "getTotalFeesReport",
  "params": {
    "start": 1563020800000,
    "end": 1664582400000,
    "timeframe": "day",
    "isTradingFees": true,
    "isFundingFees": true,
    "symbol": ["UST", "USD", "BTC"]
  }
}

Response example:

{
  "jsonrpc": "2.0",
  "result": [
    {
      "mts": 1662595200000,
      "cumulative": 590.6062279728231,
      "USD": 1.8659249059136547
    },
    ...,
    {
      "mts": 1563235200000,
      "cumulative": 17.79918233,
      "USD": 17.79918233
    }
  ],
  "id": null
}

Depends on this PR:

Copy link
Contributor

@ezewer ezewer left a comment

Choose a reason for hiding this comment

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

Looks good to me!

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