Add weighted averages report to web ver #289
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
Weighted Averagesreport to the web version. The main part of logic moves from thebfx-reports-frameworkand the behavior is the same as in the previous PR bitfinexcom/bfx-reports-framework#246Breaking changes
Response example in case trades number is more than 2k (if trades number is less than 2k ->
nextPage: false):{ "jsonrpc": "2.0", "result": { "nextPage": 1542191602000, // trades number is less than 2k -> `nextPage: false` "res": [ { "symbol": "tUSTUSD", "buyingWeightedPrice": 1.12345, "buyingAmount": 12345, "sellingWeightedPrice": 1.12345, "sellingAmount": -12345, "cumulativeWeightedPrice": 1.12345, "cumulativeAmount": 12345 } ] }, "id": null }Basic changes:
getWeightedAveragesReportmethod to the main servicegetWeightedAveragesReportCsvmethod to the main service