This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author DongwonTTuna
Recipients DongwonTTuna
Date 2020-11-10.07:11:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604992261.99.0.682298337507.issue42303@roundup.psfhosted.org>
In-reply-to
Content
USED THE PYTHON-BINANCE MODULE FOR THIS
------------------------------------------------
from binance.client import Client
from binance.exceptions import *

client = Client(api_key='Your_Public_Apikey',
                api_secret='Your_Secret_Apikey')

def buy_limit_test(coin, amount):
    client.create_test_order(
        symbol=coin + 'USDT',
        side=Client.SIDE_BUY,
        type=Client.ORDER_TYPE_MARKET,
        quantity=amount)

try:
    buy_limit_test(coin='HOT', amount=-19298.0)
except BinanceAPIException as E:
    print(E.message.find("'quaaantity'; legal range is"))
    if E.message.find("'quantity'; legal range is"):
        print(E.message)
    else:
        print("yes")
------------------------------------------------




And the parameters.

------------------------------------------------

E.message.find("'quantity'; legal range is") = 38

E.message = "Illegal characters found in parameter 'quantity'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'."

------------------------------------------------

If I run with this

if E.message.find("'quaaaaaaaaaaaaaaaaaaaaaaaaanatity'; legal range is"):

It should be run with print("yes"), but It shows print(E.message).

But If I run with
if E.message.find("'quaaaaaaaaaaaaaaaaaaaaaaaaanatity'; legal range is") == True:

It's now run with print("yes") not the print(E.message).

I think it's a bug
History
Date User Action Args
2020-11-10 07:11:02DongwonTTunasetrecipients: + DongwonTTuna
2020-11-10 07:11:01DongwonTTunasetmessageid: <1604992261.99.0.682298337507.issue42303@roundup.psfhosted.org>
2020-11-10 07:11:01DongwonTTunalinkissue42303 messages
2020-11-10 07:11:01DongwonTTunacreate