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

# Get Statement

> Retrieves wallet statement data for generating account statements.

Retrieve a wallet statement summary including opening/closing balances, totals, and a sanitized transaction list for a given period.

## Query Parameters

| Parameter     | Type   | Required | Description                                                 |
| ------------- | ------ | -------- | ----------------------------------------------------------- |
| `currency`    | string | Yes      | Wallet currency (e.g. `NGN`, `USD`)                         |
| `startDate`   | string | No       | Start of period (`YYYY-MM-DD`). Defaults to 30 days ago.    |
| `endDate`     | string | No       | End of period (`YYYY-MM-DD`, inclusive). Defaults to today. |
| `accountType` | string | No       | `wallet` (default) or `loan`                                |

## Example Request

```bash theme={null}
curl -X GET "https://api.rolla.xyz/api/v1/external/wallet/statement?currency=NGN&startDate=2026-01-01&endDate=2026-01-31&accountType=wallet" \
  -H "X-API-Key: your_api_key_here"
```

## Example Response

```json theme={null}
{
  "success": true,
  "message": "Statement data retrieved successfully",
  "data": {
    "businessName": "Acme Corp Ltd",
    "currency": "NGN",
    "openingBalance": 500000,
    "closingBalance": 1000000,
    "totalCredits": 750000,
    "totalDebits": 250000,
    "transactions": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "transaction_type": "deposit",
        "status": "completed",
        "description": "Wallet funding",
        "external_reference": "ref_abc123",
        "fee_amount": 0,
        "source_amount": 750000,
        "destination_amount": 750000,
        "source_currency": "NGN",
        "destination_currency": "NGN",
        "created_at": "2026-01-10T09:15:00.000Z",
        "updated_at": "2026-01-10T09:15:30.000Z"
      }
    ]
  }
}
```

<Tip>
  Use this endpoint to generate periodic account statements for your records or for compliance reporting.
</Tip>

<Info>
  `accountType` accepts two values: `wallet` (default, for your main wallet) and `loan` (for loan accounts).
</Info>


## OpenAPI

````yaml GET /wallet/statement
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /wallet/statement:
    get:
      summary: Get Statement
      description: Retrieves wallet statement data for generating account statements.
      operationId: getStatement
      parameters:
        - name: currency
          in: query
          required: true
          schema:
            type: string
            enum:
              - NGN
              - USD
              - XAF
            example: NGN
          description: Currency of the wallet to generate the statement for
        - name: startDate
          in: query
          required: false
          schema:
            type: string
            format: date
            example: '2026-01-01'
          description: Start date in YYYY-MM-DD format. Defaults to 1 month ago.
        - name: endDate
          in: query
          required: false
          schema:
            type: string
            format: date
            example: '2026-02-26'
          description: End date in YYYY-MM-DD format. Defaults to today.
        - name: accountType
          in: query
          required: false
          schema:
            type: string
          description: Filter by account type
      responses:
        '200':
          description: Statement data retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Statement data retrieved successfully
                  data:
                    type: object
                    properties:
                      businessName:
                        type: string
                        description: Business name
                        example: Acme Corp Ltd
                      currency:
                        type: string
                        example: NGN
                      openingBalance:
                        type: number
                        description: Balance at start of period
                        example: 500000
                      closingBalance:
                        type: number
                        description: Balance at end of period
                        example: 1000000
                      totalCredits:
                        type: number
                        description: Total deposits during period
                        example: 750000
                      totalDebits:
                        type: number
                        description: Total withdrawals during period
                        example: 250000
                      transactions:
                        type: array
                        items:
                          $ref: '#/components/schemas/Transaction'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Transaction identifier
        transaction_type:
          type: string
          enum:
            - deposit
            - withdrawal
            - swap
          description: Transaction type
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
            - rejected
            - sent
            - processing
          description: Transaction status
        description:
          type: string
          description: Transaction description
        external_reference:
          type: string
          nullable: true
          description: External reference ID
        fee_amount:
          type: number
          description: >-
            Fee charged for this transaction. On a `fee` transaction this is `0`
            — the fee value is carried as that row's
            source_amount/destination_amount, so totalling fee_amount across
            transactions does not double-count it.
        fee_transaction_id:
          type: string
          format: uuid
          description: >-
            Where the fee is charged to a different account rather than deducted
            from this transaction, the id of the separate transaction it was
            booked as. Omitted when no such transaction exists.
        fee_reference:
          type: string
          description: >-
            Reference of that fee transaction, in the form `FEE-XXXXXXXX`.
            Omitted when no separate fee transaction exists.
          example: FEE-9J76UADV
        related_transaction_id:
          type: string
          format: uuid
          description: >-
            On a `fee` transaction, the id of the transaction the fee was
            charged for — the reverse of fee_transaction_id. Omitted on
            transactions that are not fees.
        related_reference:
          type: string
          description: >-
            Reference of that originating transaction. Omitted on transactions
            that are not fees.
        source_amount:
          type: number
          description: >-
            Amount debited from the source wallet. Normally amount + fee for a
            payout, but equal to the amount when the fee is charged to a
            separate account. Never derive the fee from this — read fee_amount.
        destination_amount:
          type: number
          description: Amount credited to the destination wallet
        source_currency:
          type: string
          description: Currency of the source wallet
        destination_currency:
          type: string
          description: Currency of the destination wallet
        created_at:
          type: string
          format: date-time
          description: Transaction creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````