Assert Exception: min_to_receive.amount > 0:

Started by jackingyang, January 29, 2019, 09:30:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


litepresence

on the backend there are no decimals in prices OR amounts

everything is integers in this format:

(amount_to_sell / 10^precision_of_asset1)
(min_to_receive / 10^precision_of_asset2)

each asset has a precision... if you get too close to its precision... ie trying to sell dust then this will get rounded to zero and rejected.

btspp

Quote from: jackingyang on January 29, 2019, 09:30:16 AM
There is an exception When call Market.sell()
Assert Exception: min_to_receive.amount > 0:

I will sell 0.0002 usd

【买入的】资产数量不能为0,卖出的usd价格太低,可以得到的BTSor其他?资产数量为0了,故报错。
Email:[email protected]
Website:[url="http://btspp.io"]http://btspp.io[/url]
Witness:btspp-witness

pc

It means your order gets rounded down to zero. What are you trying to sell this for?
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 [url="http://bitcoin.quisquis.de"]http://bitcoin.quisquis.de[/url]

jackingyang

There is an exception When call Market.sell()
Assert Exception: min_to_receive.amount > 0:

I will sell 0.0002 usd