Horizon Platform Community “Fractions not allowed”
Thread Posts Reply To This Post
Viewing 9 posts - 1 through 9 (of 9 total)
  • oly

    16th September 2014 at 8:23 am

    Why would an asset not allow buy/sell orders with prices with any amount past the decimal point?

    On trying to enter any digits after the decimal point, a message pops up saying, “Fractions not allowed”

    I assume this is set when the asset is created? But I see no setting that would affect that.
    Can anyone help?

    Pharesim
    Keymaster

    Horizon: 123.50 HZ
    16th September 2014 at 9:07 am

    Right, it’s set when the asset is issued. You can also see the decimal numbers on the asset site, below the name and next to the total amount

    oly
    oly
    Participant

    Horizon: 97.50 HZ
    16th September 2014 at 3:59 pm

    Right, but I don’t mean a fraction in the quantity of tokens, I mean a fraction in the price of the order.

    If I try to place an order for for 300 or for 2.43784091 HEROs I can do it, but only for a whole number of NHZ. I can place an order at 1 NHZ, but not at 1.5 NHZ for example.

    Any ideas?

    Pharesim
    Keymaster

    Horizon: 123.50 HZ
    17th September 2014 at 11:54 am

    This depends on the number of decimal places of the asset. You can use 8-(number of asset decimals) decimal places for your orders.

    oly
    oly
    Participant

    Horizon: 97.50 HZ
    17th September 2014 at 3:55 pm

    Yes, that’s the problem here – the asset has 8 decimal places; but if I try to enter a price with a decimal in it, I get the “fractions not allowed” message. This is with asset # 15124613574385976326

    Is something set up wrong on the asset to cause this, or have I found a bug?

    Pharesim
    Keymaster

    Horizon: 123.50 HZ
    17th September 2014 at 4:32 pm

    It’s not a bug, it’s a feature.

    By only allowing this amount of decimals a trade is always accurate, without the need for rounding up/down to 8 decimals.

    oly
    oly
    Participant

    Horizon: 97.50 HZ
    17th September 2014 at 5:03 pm

    So does that mean that because the asset has 8 places, the price can’t have any?

    Or to put it more generally, does it mean the product of Quantity x Price can have a max of 8 decimal places?

    Because I thought that NHZ has 8, and the assets have as many as are defined on issuance.

    Pharesim
    Keymaster

    Horizon: 123.50 HZ
    17th September 2014 at 5:23 pm

    Right, the total of an order may only have 8 decimal places, because it’s not possible to pay amounts with more without having to round up/down.

    oly
    oly
    Participant

    Horizon: 97.50 HZ
    17th September 2014 at 10:14 pm

    Good to know. That actually makes sense, it’s just not what I’m used to.

    Thanks!

Viewing 9 posts - 1 through 9 (of 9 total)