# Binance API: APIError(code=-1111): Precision is over the maximum defined for this asset. || Python

We Are Going To Discuss About Binance API: APIError(code=-1111): Precision is over the maximum defined for this asset. || Python. So lets Start this Python Article.

## Binance API: APIError(code=-1111): Precision is over the maximum defined for this asset. || Python

1. How to solve Binance API: APIError(code=-1111): Precision is over the maximum defined for this asset. || Python

Based on your code and a bit of familiarity with trading crypto I am assuming that the 'balance' you are calculating is your USDT balance and not your ADA balance via `i_o = float(bal[11]["free"])` which would mean that you are placing a buy order for an amount of ADA equal to your current USDT balance (rounded) — are you sure that's what you want to be doing?
To more directly answer your question as to why you are getting that error, I can only deduce that you must be calculating the price at which you would like to buy using a function that includes division and that your resultant `v_min` is ending up being something like 1.32578935987532098325 and not 1.2.
Therefore, you would like to also round it, for your convenience:
`price = float(round(v_min,8)) ,`

2. Binance API: APIError(code=-1111): Precision is over the maximum defined for this asset. || Python

Based on your code and a bit of familiarity with trading crypto I am assuming that the 'balance' you are calculating is your USDT balance and not your ADA balance via `i_o = float(bal[11]["free"])` which would mean that you are placing a buy order for an amount of ADA equal to your current USDT balance (rounded) — are you sure that's what you want to be doing?
To more directly answer your question as to why you are getting that error, I can only deduce that you must be calculating the price at which you would like to buy using a function that includes division and that your resultant `v_min` is ending up being something like 1.32578935987532098325 and not 1.2.
Therefore, you would like to also round it, for your convenience:
`price = float(round(v_min,8)) ,`

## Solution 1

Based on your code and a bit of familiarity with trading crypto I am assuming that the ‘balance’ you are calculating is your USDT balance and not your ADA balance via `i_o = float(bal[11]["free"])` which would mean that you are placing a buy order for an amount of ADA equal to your current USDT balance (rounded) — are you sure that’s what you want to be doing?

To more directly answer your question as to why you are getting that error, I can only deduce that you must be calculating the price at which you would like to buy using a function that includes division and that your resultant `v_min` is ending up being something like 1.32578935987532098325 and not 1.2.

Therefore, you would like to also round it, for your convenience:

`price = float(round(v_min,8)) ,`

Original Author Cfomodz Of This Content

## Solution 2

Solution:

I rounded the variable that specifies the price for each buy and sell order, aswell as `i_o` (“USDT” balance), by 2.

Original Author Cfomodz Of This Content

## Solution 3

``````tradingPairs = ['BTCUSDT','ETHUSDT','BNBUSDT']

#Loop though cryptos

for i in range(0,len(tradingPairs)):

info = client.futures_exchange_info()

if info['symbols'][0]['pair'] == tradingPairs[i]:

print("Price Pre ",info['symbols'][0]['pricePrecision'])

pricePrecision = info['symbols'][0]['pricePrecision']
quantityS = 5.2
quantityB = "{:0.0{}f}".format(quantityS, pricePrecision)
``````

Original Author Tshepo Phiri Of This Content

## Solution 4

Code for getting precision data using python Binance API:

``````from binance.client import Client
client = Client()
info = client.futures_exchange_info()

requestedFutures = ['BTCUSDT', 'ETHUSDT', 'BNBUSDT', 'SOLUSDT', 'DYDXUSDT']
print(
{si['symbol']:si['quantityPrecision'] for si in info['symbols'] if si['symbol'] in requestedFutures}
)
``````

Original Author mde Of This Content

## Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.