In these codes I made with python, when I want to buy with usdt, I get an error, where do you think I should fix it?
APIError(code=-1111): Precision is over the maximum defined for this asset.
pip install python-binance
from binance.client import Client
from binance.exceptions import BinanceAPIException, BinanceOrderException
symbolName = input("Enter here coin name ")
symbol = str(symbolName) + “/USDT”
symbol = symbolName+“USDT”
usdt_amount = 5.1
api_key = “”
api_secret = “”
client = Client(api_key, api_secret)
def market_buy(symbol, usdt_amount):
try:
market_buy = client.futures_create_order(
symbol = symbol,
side = Client.SIDE_BUY,
type = Client.ORDER_TYPE_MARKET,
quantity = usdt_amount)
print(str(market_buy))
except BinanceAPIException as e:
print(e)
except BinanceOrderException as e:
print(e)
market_buy(symbol, usdt_amount)