Skip to content
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 minimum price precision for orders #1343

Open
erkarl opened this issue Nov 29, 2019 · 0 comments
Open

Add minimum price precision for orders #1343

erkarl opened this issue Nov 29, 2019 · 0 comments
Labels

Comments

@erkarl
Copy link
Collaborator

@erkarl erkarl commented Nov 29, 2019

At the moment it's possible to create orders with many decimal places.

➜  xud git:(feat/change-orderbook-default-precision) ./bin/xucli buy 0.00000001 LTC/BTC 0.00000000000000000000000000000000000000001
no matches found
remaining 0.00000001 LTC entered the order book as c736a520-12b1-11ea-979c-9b01abcb2b70
➜  xud git:(feat/change-orderbook-default-precision) ./bin/xucli orderbook

Trading pair: LTC/BTC
┌───────────────────────────────────────┬───────────────────────────────────────┐
│ Buy                                   │ Sell                                  │
├───────────────────┬───────────────────┼───────────────────┬───────────────────┤
│ Quantity          │ Price             │ Price             │ Quantity          │
└───────────────────┴───────────────────┴───────────────────┴───────────────────┘
➜  xud git:(feat/change-orderbook-default-precision) ./bin/xucli listorders

Trading pair: LTC/BTC
┌────────────────────────────────────────────────────┬────────────────────────────────────────────────────┐
│ Buy                                                │ Sell                                               │
├───────────────────┬───────────────────┬────────────┼───────────────────┬───────────────────┬────────────┤
│ Quantity          │ Price             │ Own Order  │ Quantity          │ Price             │ Own Order  │
├───────────────────┼───────────────────┼────────────┼───────────────────┼───────────────────┼────────────┤
│ 0.00000001        │ 1e-41             │ X          │                   │                   │            │
└───────────────────┴───────────────────┴────────────┴───────────────────┴───────────────────┴────────────┘
➜  xud git:(feat/change-orderbook-default-precision) ./bin/xucli orderbook --precision 80

Trading pair: LTC/BTC
┌───────────────────────────────────────┬───────────────────────────────────────┐
│ Buy                                   │ Sell                                  │
├───────────────────┬───────────────────┼───────────────────┬───────────────────┤
│ Quantity          │ Price             │ Price             │ Quantity          │
├───────────────────┼───────────────────┼───────────────────┼───────────────────┤
│ 0.00000001        │ 1e-41             │                   │                   │
└───────────────────┴───────────────────┴───────────────────┴───────────────────┘
@erkarl erkarl added the question/tbd label Nov 29, 2019
@kilrau kilrau added the P3 label Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.