Message380636
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 |
|
Date |
User |
Action |
Args |
2020-11-10 07:11:02 | DongwonTTuna | set | recipients:
+ DongwonTTuna |
2020-11-10 07:11:01 | DongwonTTuna | set | messageid: <1604992261.99.0.682298337507.issue42303@roundup.psfhosted.org> |
2020-11-10 07:11:01 | DongwonTTuna | link | issue42303 messages |
2020-11-10 07:11:01 | DongwonTTuna | create | |
|