Home › Guides › Binance API

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSBinance APIThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on binance api. Education only, with example numbers labelled.
WHY BOTS FAIL

Binance API

Short answer

An exchange API is a set of web addresses and message formats that let a program do what you would do by hand: read prices, check a balance, place and cancel orders.

An exchange API is the doorway a bot uses to read prices and send orders. This page explains the general shape of it, the parts that break bots, and the arithmetic you can check yourself.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: practise without real money

A practice environment lets a bot send orders without real funds. Read what it can and cannot show you.

Read about testnetsFree, no account
Reading time6 minutes
Worked exampleExact arithmetic
Tools linked0 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Requests per day for a bot that asks for the same data on a timer (arithmetic)86400Every 1sone request17280Every 5sone request5760Every 15sone request1440Every 60sone request288Every 300sone requestOne request each time the timer fires, 86,400 seconds in a day. Calculated by us on 31 Oct 2026, exact. The venue sets its own limits:read its current page.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • An exchange API is a set of web addresses and message formats that let a program do what you would do by hand: read prices, check a balance, place and cancel orders.
  • Venues usually offer two kinds of interface: request and reply calls, and a stream that pushes live data. A bot often uses both. The exact addresses, limits and fields change, so read the current documentation of the venue.
  • Reading public prices needs no key. Anything private, such as a balance or an order, needs an API key and a signature made with a secret that must never be shared.
  • A bot that asks for data on a timer makes 86,400 divided by the interval requests a day: 86400 at one second, 1440 at one minute (calculated by us on 31 Oct 2026, exact).
  • This page explains how something works and does not recommend it. We have not tested it for this page. Check the current terms.

What an exchange API is

An exchange has a website where you click to trade. Behind it sits a program that answers messages. An API (application programming interface) lets your own program send those same messages. A request such as "what is the latest price" or "place this order" goes out, and a reply comes back in a data format, most often JSON, a plain text layout of names and values.

The Binance API is the interface of one large crypto exchange. The general shape is the same at most exchanges: a public part for market data, a private part for your account, and usually a testing environment. Which markets, order types and fields exist is a matter for the documentation of the venue, and it can change without notice. We have not read it for this page, so nothing here describes a specific field or limit.

The three kinds of call

  • Public data. Prices, order books and recent trades. No key is needed because anyone can see them.
  • Private reads. Your balance, open orders and past fills. These need a key and a signature.
  • Private actions. Placing, changing and cancelling orders, and on some venues moving money. These need a key with the matching permission switched on.

Keys, secrets and signatures

An API key is a pair of strings. The key identifies you. The secret proves a message came from you. For each private request the bot builds the message, makes a signature from it and the secret using a method the documentation names, and sends the signature with the request. The secret itself is never sent. Anyone who holds the secret can act as you, so the rules are simple.

  • Give each key only the permissions the bot needs. A bot that only reads needs no trading permission, and a trading bot does not need permission to withdraw.
  • Keep the secret out of the code, out of screenshots, out of chat and out of any repository. Load it from a setting on your own machine.
  • Check whether the venue lets you limit a key to certain network addresses, and use that if it does.
  • Make a new key for each bot, so one leak can be cancelled without stopping the rest.

Worked example: rounding an order

Every market has rules about the size of an order. There is usually a smallest step for the quantity, a smallest step for the price, and a minimum order value. A bot that sends 0.0456 when the step is 0.001 will be rejected. The fix is to round down to the step before sending. The numbers below are made up: a quantity step of 0.001, a price step of 0.01 and a minimum order value of 10. The real values differ by market and change, and the venue publishes them in its market information.

Intended quantityIntended priceRounded quantityRounded priceOrder valueResult
0.04560100.3760.045100.374.52rejected
0.1000099.9990.10099.9910.00rejected
0.00990100.5000.009100.500.90rejected
1.2345687.6541.23487.65108.16passes

Calculated by us on 31 Oct 2026, exact for the made-up filters. The third row shows the usual trap: a small order that rounds to a value under the minimum is rejected, and a bot that does not handle the rejection may retry forever or stop. Rounding down also means the order is a little smaller than intended, as the figure shows. That is the safe direction, since rounding up could spend more than the bot meant to.

What rounding to a step size does to a made-up order (value kept, in percent)98.7%Order 1value kept100.0%Order 2value kept90.9%Order 3value kept100.0%Order 4value keptMade-up step 0.001 and price tick 0.01, rounding down. Calculated by us on 31 Oct 2026, exact for these inputs.
Rounding down to the step keeps most of the order value, and a small order loses the most in relative terms.

Worked example: how many requests a loop makes

A simple bot asks for the price on a timer. Dividing the seconds in a day by the interval gives the number of requests: 86400 at every 1 seconds, 17280 at every 5 seconds, 5760 at every 15 seconds, 1440 at every 60 seconds, 288 at every 300 seconds. Venues limit how fast an account or an address may send requests, and breaking the limit can lead to refused requests or a temporary block. The limits are numbers that change, so read the current page of the venue and compare it with your loop. A stream of live data usually replaces a fast timer and uses far fewer requests.

How a bot using an API breaks

  • Clock drift. Signed requests usually carry a time stamp, and a computer clock that is out of step can make every request fail.
  • A reply that never came. If a network error hides whether an order was placed, the bot can send it twice. Use the way the venue lets you tag an order with your own id, if it has one, and check open orders before retrying.
  • Silent changes. The venue can add a field, retire an address or change a rule. A bot that is not watched stops working or, worse, keeps working on wrong data.
  • Partial fills. An order can fill in pieces. A bot that assumes all or nothing ends up with a position it does not know about. See slippage.
  • Leaked keys. The most costly failure. See the safety rules above.

How to check your own setup

  1. Test on a practice environment first if the venue offers one. See Binance testnet and paper trading.
  2. Print every request and reply to a log file with the secret removed.
  3. Round every quantity and price to the steps of the market and check the minimum value before sending.
  4. Count your requests per day and compare with the current limits of the venue.
  5. Start with a very small size and compare each real fill with what the bot expected.
This page explains how something works and does not recommend it. We have not tested it for this page. Check the current terms, fees and rules of the venue. Crypto-assets can be financial products and can lose all the money put into them.

What this page does not tell you

It does not give any address, field name, limit, fee or supported market, because those change and we did not read the documentation for this page. It does not say a bot using an API will make money. For the wider picture of building a bot see Python trading bot and crypto trading bot.

FAQ

Frequently Asked Questions

What is the Binance API?

It is the way a program talks to that exchange: public calls for market data and private, signed calls for your account and orders. The details are in the current documentation of the venue.

Do I need an API key to read prices?

Public market data usually needs no key. A balance, an order or anything private does, and the venue sets which calls are public. Check its documentation.

What permissions should a bot key have?

The smallest set the bot needs. A bot that only reads needs no trading permission, and a trading bot should not be given permission to withdraw.

Why was my order rejected?

Common causes are a quantity or price that does not match the step of the market, an order value under the minimum, or a signature or time stamp problem. The reply usually carries a code that the documentation explains.

How often can a bot send requests?

The venue limits it, and the numbers change. Read its current page, then count the requests your loop makes in a day.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It explains how an exchange API works in general terms. It does not recommend any venue, tool or trade.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss