---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.2
alternate:
  - https://yandex.ru/dev/direct/doc/dg-v4/en/reference/GetBalance.md
  - https://yandex.ru/dev/direct/doc/dg-v4/ru/reference/GetBalance.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/dg-v4/en/llms.txt

# GetBalance
Notifies you of the campaign balance and the total amount transferred to the campaign over the course of its existence.

{% note alert %}

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions 4 and 5, see the [Migration guide](https://yandex.com/dev/direct/doc/migration/concepts/methods.md).

{% endnote %}


For a method, there is a version of [GetBalance (Live)](https://yandex.ru/dev/direct/doc/dg-v4/en/live/GetBalance.md).


## Input data {#input}

The input data structure in JSON is shown below.

```javascript
{
   "method": "GetBalance",
   "param": [
      (int)
      ...
   ]
}
```

The `param` parameter contains an array of IDs for campaigns that you need to get information for.


## Output data {#output}

The output data structure in JSON is shown below.

```javascript
{
   "data": [
      {  /* CampaignBalanceInfo */
         "CampaignID": (int),
         "Sum": (float),
         "Rest": (float)
      }
      ...
   ]
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >CampaignBalanceInfo object</sub>**
||
||
`CampaignID`
|
The campaign ID.
||
||
`Sum`
|
If the advertiser has the shared account enabled, this is the total amount of funds spent over the campaign's existence.

If the shared account is disabled, this is the amount of funds added to the campaign over the campaign's existence.
||
||
`Rest`
|
The current balance of the shared account + the amount refunded to the campaign (if the advertiser has the shared account enabled) or the current campaign balance (if the shared account is disabled).


{% note info %}

The amount of money returned for clicks that the system determines to be fraudulent or mistaken; this amount can be spent only within the same campaign.

{% endnote %}
||
|#

