-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add price to TradeOrder #134
Comments
nACK: price is not a "constant from the Daemon point of view". It means that a price at time t can be different than the price at time t+1. That's why we must call the price preview just before making the swap (in order to be sure we'll trade at the right price) |
Since we are sending the payload |
@tiero do u mean return the price in Note that it means make a ACK but not sure to see a huge gain (in tdex-app for instance, it seems to me that the gain for this breaking change is: remove 1 line of code (am I wrong @Janaka-Steph?) but add a risk for useless requests to daemon 🤔 |
Afaik with bestPrice we already compute price for each order |
Right. But I think in case of only bestPrice is used, better to do not use |
Currently we call
discoverer.discover({ asset, amount: sats })
to get the best order, then we have to call MarketPrice to get the price preview. InsteadTradeOrder
could include the price.@tiero @louisinger
The text was updated successfully, but these errors were encountered: