这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ZIMkaRU
Copy link
Member

@ZIMkaRU ZIMkaRU commented Mar 30, 2023

This PR adds the Weighted Averages report to the web version. The main part of logic moves to the bfx-report and the behavior is the same as in the previous PR #246


The idea is: to move the main logic to the bfx-report and extend WeightedAveragesReport service and override _getTrades method to fetch data from DB instead of the bfx-api-v2


Breaking changes

Response example, it returns nextPage: false to have the same response as in hosted ver:

{
  "jsonrpc": "2.0",
  "result": {
    "nextPage": false, // for framework mode, it should be always `false`
    "res": [
      {
        "symbol": "tUSTUSD",
        "buyingWeightedPrice": 1.12345,
        "buyingAmount": 12345,
        "sellingWeightedPrice": 1.12345,
        "sellingAmount": -12345,
        "cumulativeWeightedPrice": 1.12345,
        "cumulativeAmount": 12345
      }
    ]
  },
  "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