profile (alt)

Get the balance of the profile

GEThttps://onlinesim.io/stubs/handler_api.php?action=getBalance

Returns the money available for new orders: the balance minus the funds reserved for open operations, in the currency of the profile, with two decimals. It can be negative.

The Onlinesim balance is cached for 60 seconds, so a fresh purchase or top-up may show up with a delay.

Security

Parameters

query1
NameTypeDescription
action*string

Method name: getBalance

Enum:getBalance

Responses

200ACCESS_BALANCE:<available balance> or a common error
Content-Typetext/plain
Schema
schemaoneOf
One Of
[0]string
Pattern:^ACCESS_BALANCE:-?\d+\.\d{2}$
[1]string
Error answered as text by every action (also by the JSON ones):
  • BAD_KEY — the API key is wrong or missing
  • BANNED — the account is blocked
  • BAD_ACTION — unknown action or an error without its own code (for example a temporary error or too many concurrent requests); check the request and repeat it later
  • Too many requests. Please wait a moment before trying again. — the converter's limit of getNumber, getRentNumber, setStatus and setRentStatus (3 requests per second, 150 per 30 seconds)
Enum:BAD_KEYBANNEDBAD_ACTIONToo many requests. Please wait a moment before trying again.

Examples

balance

Available balance

ACCESS_BALANCE:530.82
badKey

Wrong or missing API key

BAD_KEY

Code Samples

Generating examples...