> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesadepagos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Queries

> Balances and transaction history.

The Queries module provides balances and transaction history for operational reconciliation.

## Payout Balances

```http theme={null}
GET /v2/transactions/payouts/balance
```

### Response

```json theme={null}
[
  {
    "type": "withdrawal_ach",
    "balance": 1000,
    "fiat": "BOB",
    "lastCredit": "2026-05-12T12:00:00.000Z",
    "lastDebit": "2026-05-12T12:00:00.000Z"
  }
]
```

If the balance provider is temporarily unavailable, the API preserves this contract and returns Payout ACH and Payout QR balances as `0` until service is restored.

## Transaction History

```http theme={null}
GET /v2/transactions/history
```

### Query Parameters

| Parameter           | Required | Description         |
| ------------------- | -------- | ------------------- |
| `type`              | No       | Transaction type.   |
| `transactionStatus` | No       | Transaction status. |
| `page`              | No       | Requested page.     |
| `limit`             | No       | Records per page.   |
| `fromDate`          | No       | Start date.         |
| `toDate`            | No       | End date.           |
| `search`            | No       | Search text.        |

### Response

```json theme={null}
{
  "transactions": [
    {
      "amountFiat": 69.6,
      "amountCrypto": 10,
      "assetCode": "USDC",
      "fiatCode": "BOB",
      "exchangeRate": 6.96,
      "transactionId": "550e8400-e29b-41d4-a716-446655440000",
      "type": "deposit_express",
      "status": "completed_transaction",
      "createdAt": "2026-05-12T12:00:00.000Z",
      "updatedAt": "2026-05-12T12:00:00.000Z",
      "externalReference": "ORDER-1001"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1
  }
}
```
