frontend-monorepo icon indicating copy to clipboard operation
frontend-monorepo copied to clipboard

Allow toggle of size between base and quote asset

Open JonRay15 opened this issue 10 months ago • 0 comments

The Chore

Make the ETH in the deal ticket size clickable

image

When clicked it should give you the option to toggle between the base and quote unit in the metadata for how you set the size of your purchase.

ie. instead of saying "I want 1 BTC", you would be saying "I want 72k USDT worth of BTC".

Acceptance Criteria

  • [ ] When the ETH unit is clicked it should open a dropdown to select between base and qute units
  • [ ] This should be possible on all market types
  • [ ] If using base unit the order submission behaviour is unchanged
  • [ ] If using quote unit
    • [ ] The order must still have a size submitted on it in normal terms
    • [ ] Therefore estimate the size by traversing the book to see how much BTC can be bought / sold for the quoteAmount given
    • [ ] Use this estimate to also send to the positionEstimate API to get the liquidation estimates etc
    • [ ] If the order has a TP / SL the size of the TP / SL should use the same amount
    • [ ] If you are in quote unit mode replace the notional beneath the field with teh size (ie. show the inverse)
    • [ ] The size slider needs to still work with this new mode

Additional details / background info

JonRay15 avatar Apr 08 '24 15:04 JonRay15