question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Precision is over the maximum defined for this asset.

See original GitHub issue

Hello

I’m tring in the Binance Future’s testnet and I got an error precision every time… I don’t understand how to fix it.

    let price = await GetLastPrice();    
    let stepSize = global.filters[pair].stepSize; //pair = BTCUSDT
    let precision = stepSize.toString().split(".")[1].length || 0;
    let amount = (positionSizeInUsdt / price); //positionSizeInUsdt = 10000
    amount = binance.roundStep(amount, stepSize);
    console.log("Buy MARKET " + pair + " quantity: " + amount.toFixed(precision)+ " - stepSize: " + stepSize + " - precision: " + precision + " at: " + price);
    let buyOrder = await binance.futuresMarketBuy(pair, amount.toFixed(precision), {newOrderRespType: 'RESULT'});
    console.log(buyOrder);

And I got this error:

Buy MARKET BTCUSDT quantity: 0.268118 - stepSize: 0.00000100 - precision: 8 at: 37296.94000000 [Object: null prototype] { code: -1111, msg: ‘Precision is over the maximum defined for this asset.’ }

What is wrong with my code?

Thanks!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
hronniecommented, Mar 20, 2021

I also struggled with this problem and I figured out that for futures the precision is smaller than for spot trading. E.g. for BTCUSDT it’s 3 but you can check in the application for the specific pair (just try to buy in futures and below the scroll it will show the amount where you can figure out the precision).

0reactions
vdtuancommented, Mar 16, 2022

Hi I am facing a very strange bug today, can anyone help me? I am calling this function futuresMarketSell to maker a sell order for BTCUSDT, qty: 0.00091 but I got this error: Precision is over the maximum defined for this asset not sure what is wrong here!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Binance API: APIError(code=-1111): Precision is over the ...
Code for getting precision data using python Binance API: ... By the above method, you will be able to sell 99% of your...
Read more >
APIError(code=-1111): Precision is over the maximum defined ...
First you need to get the quantity precision of the asset you want to trade. Lots of people mention step size and price...
Read more >
Precision is over the maximum defined for this asset : r/binance
I'm paper trading futures on the Binance demo environment. I get a weird error saying the precision is over the maximum sometimes.
Read more >
Understanding Binance Trade Filters for Dummies - Medium
BinanceAPIException: APIError(code=-1111): Precision is over the maximum defined for this asset. This means that the quantify we are submitting ( ...
Read more >
GET /eapi/v1/time - Change Log – Binance API Documentation
maxPrice defines the maximum price / stopPrice allowed; disabled on maxPrice == 0. ... Precision is over the maximum defined for this asset....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found