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

Conversation

@ZIMkaRU
Copy link
Member

@ZIMkaRU ZIMkaRU commented Oct 11, 2024

This PR improves fetching opened positions for the balance report


we use the positions snapshot endpoint (it's daily snapshots) for getting opened positions and then calc p/l using 1D candles
but for the ending point of the balance chart, it does not give accurate results (if it's the middle of the day) and if we try to compare it with Active Positions section we can see slightly different results
so as a solution, we can try to fetch opened positions for the ending point of the balance chart from API (as we do for Active Positions section). But if API request is not successful then fetch the positions snapshot from DB

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.

lgtm!

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.

2 participants