AugurProject / augur-app

Augur Desktop Electron Application
MIT License
222 stars 22 forks source link

[Feature Request] Allow pre-filling of order quantity to close entire position #425

Open ndorf opened 5 years ago

ndorf commented 5 years ago

Is your feature request related to a problem? Please describe. It's somewhat related to #424, wherein imprecisely displayed share positions make it difficult to fully close one's entire position even manually, but ultimately orthogonal.

Describe the solution you'd like Most trading platforms support some way of easily prefilling a sell order with one's entire current position. In the Augur UI, I think it'd be best to either simply allow clicking on the "Position" row, or, alternatively, have a per-row "Close" button there (similar to the "Cancel" button in the "Open Order" row).

Specifically, it would simply set the order entry form's type to "Sell" for long positions or "Buy" for short ones, set the currently selected outcome to be the one associated with the position, populate the order's quantity with the position's quantity, and leave the limit price field unchanged or blank.

Describe alternatives you've considered Examples from other trading interfaces I've used recently include:

  1. pro.coinbase.com presents a "max" button associated with the order quantity field. Perfectly reasonable, but more complicated: it would also have to work for opening new positions, in which case 1) the limit price would already have be filled in, since it's required to know the quantity of any new shares, 2) the quantity would also depend on the current gas price and 3) it wouldn't be exact anyway, since you never know the final gas cost. In my opinion it is simpler to handle closing existing positions only.

  2. kraken.com shows "available amount" near the order quantity field, which populates the field with itself when clicked. In my opinion, this is kind of redundant since the position quantity is already shown on the same screen (albeit not correctly per #424), but might be easier to implement since there'd be no need to automatically change the currently selected outcome.

  3. fidelity.com has "Sell All Shares" as a third order type alongside "Buy" and "Sell" which more or less works with their UI but doesn't seem to make much sense for Augur's.

adrake33 commented 5 years ago

@sharkcrayon @matt-bullock What are your thoughts on how we should handle this in the UI? We should make it clearer exactly how many shares the user has, but we may want to do this by allowing the user to hover over the shares and see the more precise amount. Would also be good to have some way for the user to buy/sell all shares to close their position.

adrake33 commented 5 years ago

I talked to @Chwy5 about this. We both like the idea, but it is not very high priority right now. We'll probably need to think through this more thoroughly, too, particularly when reversing a position, because there are both shares and ETH involved. Moving this to the backlog for now.

bthaile commented 5 years ago

User just wants to pre populate the form by clicking on a value in their position.

I can see that this could be difficult because of synthetic positions. I think just giving them ability to populate quantity by clicking on their existing position and make sure to switch the buy | sell would go far.

adrake33 commented 5 years ago

That sounds good. As Joey mentioned in Discord, we can allow the user to click on the quantity of shares they own. If positive, put the focus on the sell window with the full precision amount. If negative, put the focus on the buy window with abs(position) as the amount.

Chwy5 commented 5 years ago

This is fine for now.....but at some point I want to add were we have tabs the say 25%, 50%, 75%, 100%...which allow the user to quickly submit a portion of their total available trading balance.....Just wasnt going to add it for the initial trading pg. launch

bthaile commented 5 years ago

I like that format to allow the user to put a percentage of total ETH toward a trade. It would be easier now that we all user to input total order value. We could do this in the short term if there is a design for it.

adrake33 commented 5 years ago

At some point, we'll definitely need a design for implementing the percentages like chwy mentioned, so maybe we should just get the design finalized and then begin work on this, rather than implementing it in phases.

@Chwy5 can you and @matt-bullock discuss this more and have Matt provide some mocks of how this should look?

joeykrug commented 5 years ago

"That sounds good. As Joey mentioned in Discord, we can allow the user to click on the quantity of shares they own. If positive, put the focus on the sell window with the full precision amount. If negative, put the focus on the buy window with abs(position) as the amount." Use positions quantity for this and make it clickable --- straightforward to do imo

pgebheim commented 5 years ago

@Chwy5 -- I'd like to get this handled in the next sprint (starting next week) if its still something that hasn't been considered.

Chwy5 commented 5 years ago

So there are 2 ways to do this @joeykrug we need to pick which one: 1st) We add 4 little buttons to the order ticket (see screenshot) which would allow the user to do 25%, 50%, 75%, or 100% of their specific outcome quantity.... 8-11b 2) We can just make the quantity clickable in the positions section of the trading pg, and this would filter in the full amount to the order ticket.

pgebheim commented 5 years ago

I think we should probably do both of those.

bthaile commented 5 years ago

I agree with both, especially if we have 0x “fast” trading

joeykrug commented 5 years ago

I like option 2 or both

Chwy5 commented 5 years ago

Cool lets do both.... @matt-bullock need design for the 4 buttons above added to the order ticket

bthaile commented 5 years ago

moving this out of sprint, sprint is for blocking features, high pri items