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

0 Members and 1 Guest are viewing this topic.

Offline jackingyang

  • Full Member
  • ***
  • Posts: 52
    • View Profile
  • BitShares: bts0207
Assert Exception: min_to_receive.amount > 0:
« 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

Offline pc

  • Hero Member
  • *****
  • Posts: 1419
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: Assert Exception: min_to_receive.amount > 0:
« Reply #1 on: January 29, 2019, 01:28:33 pm »
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 btspp

Re: Assert Exception: min_to_receive.amount > 0:
« Reply #2 on: January 29, 2019, 01:38:45 pm »
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:http://btspp.io
Witness:btspp-witness

Offline litepresence

Re: Assert Exception: min_to_receive.amount > 0:
« Reply #3 on: February 14, 2019, 08:53:42 pm »
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 jackingyang

  • Full Member
  • ***
  • Posts: 52
    • View Profile
  • BitShares: bts0207
Re: Assert Exception: min_to_receive.amount > 0:
« Reply #4 on: February 15, 2019, 01:28:24 pm »
Fix it