You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some possibilites to get the number of decimal places a market has.
But how do i get the amount of decimal places that are allowed to trade with.
As an example SOL/USD. SOL has 9 decimal places but its just allowe to trade with 1.
So if you try to create an order to buy 0.12345678 SOL, it will be automatically converted to an order to buy just 0.1 SOL.
You get no error or something and you notice it only if you check your order after creating it.
And why is only 1 decimal place allowed? Thats realy strange. On kraken, where my bots currently runnig, are 8 places the maximum.
For me, this is again crucial.
On other Markets it looks the same.
The text was updated successfully, but these errors were encountered:
Ok, i found why serum is not using more decimal precision.
Because its just not possible. Or it would create terrible results.
Some Parts of the orderCreation stuff works with the datatype number. And Number is a float value.
It begins with placeOrder in market.ts and goes down until priceNumberToLots or baseSizeNumberToLots, where it gets converted.
Right now I don't understand serum well enough, so I don't know how much it affects the network.
But i think this is a big Problem.
We all know the Problems of float precisions.
There are some great Librarys out there to deal with this issue, like math.js
There are some possibilites to get the number of decimal places a market has.
But how do i get the amount of decimal places that are allowed to trade with.
As an example SOL/USD. SOL has 9 decimal places but its just allowe to trade with 1.
So if you try to create an order to buy 0.12345678 SOL, it will be automatically converted to an order to buy just 0.1 SOL.
You get no error or something and you notice it only if you check your order after creating it.
And why is only 1 decimal place allowed? Thats realy strange. On kraken, where my bots currently runnig, are 8 places the maximum.
For me, this is again crucial.
On other Markets it looks the same.
The text was updated successfully, but these errors were encountered: