Auto-buying via API: key, limits, refunds
The only way of paying where a failed delivery returns the money to the balance on its own.
What the API gives out
The public API covers the same things you do by hand: the catalogue, the stock, the balance and the orders. There is no separate subdomain such as api.boomly.ac — the base is relative, requests go to /api on the same domain. The documentation describing the endpoints lies on the site in the API section, and the playground works there too.
| What is requested | Why a script needs it |
|---|---|
| Catalogue | get the list of positions with their marks, format and SKUs |
| Stock | check the available volume before placing an order |
| Balance | make sure there is something to pay the order with |
| Orders | place the purchase and collect the delivered data |
The playground is built as honestly as the format converter: the request goes straight from your browser, the key is not stored on the shop server. That lets you test a call before you start writing code.
The same API checks the stock before an order is placed. That is cheaper than placing a purchase and getting a failed delivery, even when the money comes back to the balance on its own: the time for a repeat order still comes out of the thirty-minute window.
It is more useful than it looks. The shape of the response is easier to see once with your own eyes than to reconstruct from the documentation: the parser is written for the real structure rather than for its description, and debugging starts from a working request instead of a guess.
Key, secret and signature
The buyer issues the key and the secret in the account panel — there is no need to ask support for them. The secret is used only to sign a request, and the signature is not always required: it is needed only for those keys where it is switched on. This is a deliberate fork — a simple scenario can start without a signature, and for a production auto-purchase it can be switched on.
- The key is issued in the account panel and revoked in the same place.
- The secret is needed only for the signature; if the signature is not switched on for the key, it takes no part in the request.
- The playground on the site lets you send a request with the key without storing it on the server.
The key is the same kind of credential as the accounts themselves: it opens the balance and the orders. Keeping it in a shared repository is not worth it, and if it has leaked, issuing a new one in the panel and revoking the old one is simpler than dealing with the consequences.
The connection order therefore comes out step by step: first a request from the playground, then the same request from your own code without a signature, and only then the signature switched on for the production key. Every step is checked separately, and the place of an error is visible at once.
The position SKU and the internal id
A position has two numbers in the catalogue response, and confusing them is expensive. The SKU is the public number of the product: the same one stands on the card on the site, it is quoted to support and a repeat purchase is made by it. The internal identifier is the service number of the record in the database.
The address of the card on the site is built from the SKU. If your script collects links to positions — to attach to a request or to keep for yourself — they have to be collected from the SKU. The internal number will lead to the same page, but already through a redirect, and it will stay as a needless link in your own database.
- The SKU is what you quote to support together with the order number.
- The SKU is permanent: restock alerts in the shop bot are subscribed by it.
- The internal number is useless in a conversation with support — it identifies a record, not a product.
The SKU is visible without the API as well: it stands on the position card and in the order, and it is exactly what support asks for. A purchase table assembled by SKUs reads the same way for a script and for the person who writes to the bot afterwards.
Hence the rule for monitoring: the key in your table has to be the SKU. The composition of the catalogue changes together with the stock — positions appear and leave — and the SKU stays the only stable way to refer to a particular product and compare yesterday's stock with today's.
Two limits and the actual ceiling
There are two restrictions and they are counted independently: 120 requests per minute per endpoint and 60 requests per minute per key. The second limit is stricter than the first, and it is the one that sets the actual ceiling: however many different endpoints you poll, sixty requests per minute in total pass from one key.
Hence the practical consequence for anyone writing stock monitoring: polling the catalogue more often than once a second is pointless — you will hit the key limit before you get fresher data. It is more sensible to poll less often and to subscribe to restocks of the SKUs you need in the shop bot, where the notification arrives by itself.
- 120 requests per minute — per one address.
- 60 requests per minute — per one key, and this is the actual ceiling of the scenario.
- The limits are counted independently, so the smaller of the two is always the binding one.
Parallelising the problem will not work either: spreading requests across several endpoints runs into the same key limit. The ceiling is raised not by the number of threads but by the design of the polling — a rare full pass over the catalogue plus a pinpoint check of the SKUs you actually need.
The auto-refund lives only here
This is the main difference between the API and the other ways of buying, and it is worth knowing before you choose a channel. Orders paid through the API from the balance are refunded to the balance automatically if the delivery fails. On the site and in the bot there is no auto-refund: the funds are simply not charged, and a failure is settled through support manually.
For a one-off purchase the difference is small. For a regular auto-purchase it is fundamental: a scenario where a script orders batches without a human has to survive a failed delivery without manual handling — and only the API provides that.
- The auto-refund fires on payment from the balance via the API, not on any payment.
- The balance is charged immediately, so the delivery goes without waiting for a transfer to be confirmed.
- The balance is topped up by the same methods that pay for an order: USDT in seven networks, CryptoBot or roubles via SBP.
The difference between the channels comes down to one question: who deals with the failure. On a purchase via the API the shop deals with it itself and returns the money to the balance; on the site and in the bot, support does it manually. For a flow of orders that is the difference between a script working at night and sorting things out in the morning.
Hand-over inside a script looks different from doing it by hand, but the rule is the same: right after the response, compare the number of delivered lines with the ordered volume, and the field composition with the contents mark of the position. The thirty minutes run the same way, whoever places the order.
The auto-refund does not replace hand-over. It closes the case where the delivery did not happen at all, not the case where the position arrived and does not match its description. The second one is still settled inside the thirty-minute window and through support — with the order number and the SKU.
Short answers
Related pages