# Balance history

## Request

```bash
curl -X POST https://api.bitsby.app/billing/history \
  -H "Authorization: Token MSvL2ltaDZdWVjmZURURMVWhqSJLT2NURjhL2Fla1Z1T1IxQTltKs1T3Ay" \
  -F "offset=0" \
  -F "limit=10"
```

## Request parameters

| Parameter | Data type | Description                           | Example | Required? | Default |
| --------- | --------- | ------------------------------------- | ------- | --------- | ------- |
| `offset`  | Integer   | Index of the first record to return   | 0       | no        | 0       |
| `limit`   | Integer   | Number of records you want to receive | 50      | no        | 10      |

## Response example

```json
{
    "result": "success",
    "data": [
        {
            "datetime": "2024-11-30 18:02:41",
            "event": "other",
            "projectId": null,
            "target": "internal",
            "amount": 5,
            "comment": "welcome bonus 5"
        },
        {
            "datetime": "2025-08-15 02:00:01",
            "event": "commission",
            "projectId": "9deea1e2-0c08-41a3-bdc2-a34eada3892d",
            "target": "internal",
            "amount": -0.15,
            "comment": "Commission 14.08.2025 (Sample project)"
        }
    ]
}
```

## Response parameters

| Parameter   | Description                                                                                             |
| ----------- | ------------------------------------------------------------------------------------------------------- |
| `datetime`  | Event date and time                                                                                     |
| `event`     | Event type. Allowed values: deposit, withdrawal, transfer, commission, aml, other                       |
| `projectId` | ID of the project the operation belongs to. For account-level operations—top-ups and bonuses—it is null |
| `target`    | The balance that was changed. Allowed values: internal, partner                                         |
| `amount`    | The amount the balance was changed by                                                                   |
| `comment`   | Event comment                                                                                           |
