frontend-monorepo
frontend-monorepo copied to clipboard
Allow toggle of size between base and quote asset
The Chore
Make the ETH in the deal ticket size clickable
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 thequoteAmount
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
- [ ] The order must still have a