# Работа с GameStores API

### Метод GetBalance()

```url
https://api.yrsproject.ru/public/service/gamestores/GetBalance/{steam_id}/{secret_key}/{store_id}?type={type}&amount={amount}&message={message}
```

{% tabs %}
{% tab title="Request" %}

| Параметры    | Описание                                                                                    |
| ------------ | ------------------------------------------------------------------------------------------- |
| steam\_id    | ID формата 64 от аккаунта Steam, начинается на 7656...                                      |
| secret\_key  | Секретный ключ от магазина GameStores                                                       |
| store\_id    | ID магазина в системе GameStores                                                            |
| type         | <p><strong>plus</strong> - добавляет баланс<br><strong>minus</strong> - убавляет баланс</p> |
| amount       | Денежные средства                                                                           |
| message      | Сообщение, которое у кажется в истории профиля при изменеии баланса                         |
| {% endtab %} |                                                                                             |

{% tab title="Response" %}

```json
{
  "status": "success",
  "response": {
    "message": "Баланс пользователя изменён",
    "data": {
      "balance": 2616.4
    }
  }
}
```

| Параметры     | Описание                              |
| ------------- | ------------------------------------- |
| message       | Сообщение от сервиса                  |
| balance       | Новый баланс после выполнения запроса |
| {% endtab %}  |                                       |
| {% endtabs %} |                                       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.yrsproject.ru/documentation/methods/gamestores_api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
