# Price control: getPrices, maxPrice and a budget that holds

> Suppliers set their own prices and change them. Two parameters keep that from turning into a surprise: getPrices tells you the current price before you order, and maxPrice on getNumber refuses any order above the number you chose.

Source: https://otpwatch.com/price-control
Updated: 2026-11-24
API key: https://otpwatch.com/agent/key

## Read the price first

```text title="request → reply"
# handler_api reference: https://otpwatch.com/price-control
# Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
?action=getPrices&api_key=KEY&country=16&service=tg
{ "16": { "tg": { "cost": 1.38, "count": 280 } } }
```

`cost` is the current price per one-off activation in USD and `count` the number of free numbers. Always pass both `country` and `service`: without filters the reply is the whole price list. Refresh it on a schedule (every few minutes for a bot, once per run for a test suite) rather than before every order.

## Cap every order

```text title="request → reply"
# handler_api reference: https://otpwatch.com/price-control
# Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
?action=getNumber&api_key=KEY&country=16&service=tg&maxPrice=1.50
ACCESS_NUMBER:12345:447700900123      price was at or below 1.50
WRONG_MAX_PRICE:1.62                  price is above the cap; 1.62 is the lowest now
```

- With `maxPrice` set, the platform will not buy above it. You get either a number at or below the cap, or a refusal that tells you the current lowest price. Nothing is charged or held on a refusal.
- `WRONG_MAX_PRICE:<price>` is for one-off activations. A rental above the cap answers `NO_NUMBERS` without a price.
- `BAD_MAX_PRICE` means the value is not a number above zero. Send a dot decimal (`1.50`), never a locale-formatted `1,50`.

## Starting caps

The cheapest country with a documented id for each documented service, and a cap with 25% headroom over that price. Use it as a first value, then tune it from your own `getPrices` reads.

| Service | Pair | Country | From | maxPrice to start |
| --- | --- | --- | --- | --- |
| WhatsApp | `service=wa&country=43` | Germany | $1.025 | `1.29` |
| Telegram | `service=tg&country=43` | Germany | $1.125 | `1.41` |
| VK | `service=vk&country=78` | France | $0.05 | `0.07` |
| Google | `service=go&country=16` | United Kingdom | $0.1875 | `0.24` |
| Facebook | `service=fb&country=43` | Germany | $0.1598 | `0.20` |
| TikTok | `service=lf&country=15` | Poland | $0.1495 | `0.19` |
| Discord | `service=ds&country=56` | Spain | $0.0625 | `0.08` |
| OpenAI | `service=dr&country=15` | Poland | $0.0375 | `0.05` |
| Claude | `service=acz&country=16` | United Kingdom | $0.0213 | `0.03` |

_“From” price per one-off activation, USD, read from public SimAggregator pages on 24 Nov 2026 (UTC). Prices move; getPrices gives the live figure._

Countries without a documented id can be cheaper; their ids come from `getCountries` ([country ids](https://otpwatch.com/country-ids.md)).

## Handling the refusal

```js title="order-with-cap.mjs"
// handler_api reference: https://otpwatch.com/price-control
// Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
// Try the preferred pair; if it is above the cap, decide by rule instead of by surprise.
export async function orderWithCap(client, { service, countries, maxPrice, stretch = 1.1 }) {
  for (const country of countries) {
    try {
      return await client.order({ service, country, maxPrice });
    } catch (e) {
      if (e.code === "WRONG_MAX_PRICE") {
        const lowest = Number(e.reply.split(":")[1]);
        if (lowest <= maxPrice * stretch) return client.order({ service, country, maxPrice: lowest });
        continue; // too expensive here, try the next country
      }
      if (e.code === "NO_NUMBERS") continue;
      throw e; // NO_BALANCE, BAD_KEY, BAD_SERVICE...: not a price problem
    }
  }
  throw new Error(`no number for ${service} within ${maxPrice} in ${countries.join(", ")}`);
}

// await orderWithCap(client, { service: "tg", countries: [16, 43, 187], maxPrice: 2 });
```

`client` is the [Node.js client](https://otpwatch.com/nodejs.md); its errors carry `code` and `reply`. The `stretch` factor makes the "accept a small increase" rule explicit and reviewable instead of a manual bump at 3 a.m.

## Budget for parallel runs

An open order holds its price until it closes. On a run with many orders in flight, the balance you need is set by the peak, not the average:

```text title="peak balance"
# handler_api reference: https://otpwatch.com/price-control
# Building a bot that resells numbers to other people? Software program: https://otpwatch.com/agent/partner
N  = orders opened per minute at peak
T  = minutes an order can stay open (the activation window; currently 60)
P  = your maxPrice
peak hold ≤ N × T × P
```

Five orders a minute with a 60-minute window and a $2 cap can hold up to $600 if nothing closes. Two habits cut that by orders of magnitude: close each order as soon as the test is done with it (finish with 6, cancel with 8), and open orders in waves instead of all at once. With prompt closing, the real hold is roughly `N × (minutes until you close) × P`.

The same peak also has to fit under the account's limit of simultaneous orders, and the request budget of 600 per minute per key. If either is the tighter limit, more balance does not help.

## Prices on 24 Nov 2026

The "from" prices behind the table above, per service, came from public SimAggregator pages on 24 Nov 2026. Telegram started at $0.1875 (Indonesia), WhatsApp at $0.1875 (Indonesia), Google at $0.025, OpenAI at $0.025, Claude at $0.0213. [Service codes](https://otpwatch.com/service-codes.md) lists the cheapest countries per service.
