Author Topic: Assert Exception: min_to_receive.amount > 0:  (Read 2700 times)

0 Members and 1 Guest are viewing this topic.

Offline jackingyang

  • Full Member
  • ***
  • Posts: 81
    • View Profile
  • BitShares: bts0207

Offline 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.

Offline btspp

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:contact@btsplusplus.com
Website:http://btspp.io
Witness:btspp-witness

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
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 http://bitcoin.quisquis.de

Offline jackingyang

  • Full Member
  • ***
  • Posts: 81
    • View Profile
  • BitShares: bts0207
There is an exception When call Market.sell()
Assert Exception: min_to_receive.amount > 0:

I will sell 0.0002 usd