Open laisee opened 8 months ago
Enter order qty for 100, see health is "100%"
This is a "known" limitation of the system. If the order were to blow up your account, the system is incapable of calculating the margin available. cc @kernelbee
Also, the margin balance is not being recalculated - depending on the order quantity entered.
@laisee can you give me more details on what that means ? I am not too sure what that means, thanks
here are some screen shots taken from prod web UI
ADA Perpetual with order qty 10 - health @ 98%, margin is non-zero
ADA Perpetual with order qty 100 - health @ 97%, margin is non-zero
ADA Perpetual with order qty 1000 - health @ 83%, margin is non-zero
ADA Perpetual with order qty 10000 - health now back @ 98% margin value at zero
reduce order quantity to 1000 and health / margin both recalculated to previous values
Thanks @laisee so no issue on the web app.
Only issue here is that system limitation around calculating margin and account health when the result would liquidate the account.
This is a known bug
If the order size will cause liquidation should it not show new account health as 0? As a trader I'd prefer to see visible clues and even a warning that my trade is beyond account limits. Another option is to use a slider with 25/50.75/100 percentage of available account collateral that can be applied to a trade.
On Wed, 14 Feb 2024 at 15:44, Klughertz Jonathan @.***> wrote:
Thanks @laisee https://github.com/laisee so no issue on the web app.
Only issue here is that system limitation around calculating margin and account health when the result would liquidate the account.
This is a known bug
— Reply to this email directly, view it on GitHub https://github.com/Power-Trade/api-docs/issues/18#issuecomment-1943230190, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBV2ULXUZSADLA2ZPHYXDYTRTMRAVCNFSM6AAAAABDFZGUMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBTGIZTAMJZGA . You are receiving this because you were mentioned.Message ID: @.***>
I agree with you, unfortunately it is an API limitation that prevents us from doing that (instead of telling us that the account would blow up, it tells us nothing, making it undistinguishable from a "no margin usage for the trade" scenario). Hopefully a fix will be available soon
Understand - can change this issue to "Improvement in Account Health calculation & display". Then leave it open till API allows improvement. How does that sound?
sounds good thanks
@laisee this has been improved:
In case there is not enough margin you get this message:
We are still unable to compute exactly how much margin you would need when you don't have enough but at least you get notified that the order would not go through.
For cases where there are enough funds to cover margin, correct number is displayed:
Re-tested, found some improvements but still issues which can leave traders potentially losing funds without enough guidance. See example below where projected account health gaps after entering 346+ contracts and any number above that shows same "91%" projected health.
Issues:
Enter LONG AVAX Perp trade with 34 contracts -> new health is 82%
Enter LONG AVAX Perp trade with 300 contracts -> new health is 16%
Enter LONG AVAX Perp trade with 343 contracts -> new health is 05%
Enter LONG AVAX Perp trade with 348 contracts -> new health is 91%
Enter LONG AVAX Perp trade with 3488 contracts -> new health is 91%
On Web site I can enter an AVAX perpetual trade order. When I change the order quantity shows different values for Account Health after trade execution.
Enter order qty for 10, see health is "88%"
Enter order qty for 100, see health is "100%"
Enter order qty for 80, see health is "11%"
Enter order qty for 90, see health is "0%"
Also, the margin balance is not being recalculated - depending on the order quantity entered.