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

# Get List of Transactions

> Documents the GET /wallet/transactions endpoint listing a user's onramp transactions, covering required transaction_type, paging, sorting, headers, and response fields.

Retrieve a user's onramp transactions — status, amount, and associated metadata.

## Endpoint

**URL**: `https://api.saber.money/api/v2/wallet/transactions?transaction_type=ONRAMP_AND_WITHDRAW`<br />**Method**: `GET`

> **Note**: `transaction_type` is **required**. If it is missing or empty, the API returns HTTP `400` with body `{"success": false, "errors": [{"code": null, "text": "Missing transaction_type"}]}`.

***

## Query Parameters

| Parameter          | Required | Type                                     | Default | Description                                                                                                                                                                                 |
| ------------------ | -------- | ---------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `transaction_type` | Yes      | string (CSV, e.g. `ONRAMP_AND_WITHDRAW`) | —       | Transaction type(s) to fetch. If absent/empty, returns HTTP `400` `Missing transaction_type`.                                                                                               |
| `limit`            | No       | integer                                  | `10`    | Max number of records to return.                                                                                                                                                            |
| `offset`           | No       | integer (epoch millis)                   | now     | Created-at paging offset; returns records created before this timestamp.                                                                                                                    |
| `sort`             | No       | string (`asc` or `desc`)                 | `desc`  | Sort order by created-at. An invalid value returns HTTP `404` with body `{"success": false, "errors": [{"code": null, "text": "Invalid sort order. Provide either of 'asc' or 'desc' "}]}`. |
| `filterFrom`       | No       | integer (epoch millis)                   | —       | Lower bound (inclusive) on created-at.                                                                                                                                                      |
| `filterTo`         | No       | integer (epoch millis)                   | —       | Upper bound (inclusive) on created-at.                                                                                                                                                      |

***

## Headers

| Header         | Description                                                               |
| -------------- | ------------------------------------------------------------------------- |
| `X-Timestamp`  | A UNIX timestamp for the request. Used for generating a secure signature. |
| `X-Client-Id`  | Your unique client ID is provided by Saber Money.                         |
| `X-Request-Id` | A unique identifier for the request (optional but recommended).           |
| `X-User-Id`    | The unique ID of the user whose transactions are being fetched.           |
| `X-Secret-Key` | Your API secret key for authenticating the request.                       |

***

## Response Fields

Every field below is **always present** in each transaction object returned by this list endpoint. For `ONRAMP_AND_WITHDRAW` (`EXTERNAL_BUY`) items the backend only populates the base fields, so the remaining fields are currently serialized with empty / zero values. Clients should not rely on those zeroed fields carrying real data here; populated values are available from the transaction details endpoint.

| Field                   | Type   | Description                                                                                                                                                                                                                                                          |
| ----------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                    | string | Unique identifier (UUID) of the transaction.                                                                                                                                                                                                                         |
| `transaction_type`      | string | Transaction type. For this endpoint always `EXTERNAL_BUY`.                                                                                                                                                                                                           |
| `status`                | string | Current status of the transaction. One of: `CREATED`, `ONRAMP_INITIATED`, `ONRAMP_COMPLETED`, `ONRAMP_INCONSISTENT`, `PROCESSING`, `REFUND_INITIATED`, `REFUND_COMPLETED`, `REFUND_FAILED`, `COMPLETED`, `FAILED`.                                                   |
| `amount`                | number | Total amount involved (omitted when zero).                                                                                                                                                                                                                           |
| `failure_code`          | string | Free-form error code string for failed transactions (e.g., `FIAT_PAYMENT_TIMED_OUT`, `PAYMENT_TIMED_OUT`, `FIAT_PAYMENT_FAILED`); only present when applicable.                                                                                                      |
| `failure_desc`          | string | Free-form human-readable description of the failure; only present when applicable.                                                                                                                                                                                   |
| `created_at`            | number | Creation timestamp (epoch ms).                                                                                                                                                                                                                                       |
| `updated_at`            | number | Last-updated timestamp (epoch ms).                                                                                                                                                                                                                                   |
| `uuid`                  | string | Always present (currently returned empty).                                                                                                                                                                                                                           |
| `symbol`                | string | Crypto symbol. Always present (currently returned empty).                                                                                                                                                                                                            |
| `user_id`               | string | User identifier. Always present (currently returned empty).                                                                                                                                                                                                          |
| `usd_value`             | number | Always present (currently returned `0`).                                                                                                                                                                                                                             |
| `tag`                   | string | Always present (currently returned empty).                                                                                                                                                                                                                           |
| `source_address`        | string | Always present (currently returned empty).                                                                                                                                                                                                                           |
| `fiat_amount`           | number | Always returned as `0` on this list endpoint. The actual fiat amount is available only from the transaction details endpoint.                                                                                                                                        |
| `crypto_amount`         | number | Always returned as `0` on this list endpoint. The actual crypto amount is available only from the transaction details endpoint.                                                                                                                                      |
| `fiat_symbol`           | string | Always present (currently returned empty).                                                                                                                                                                                                                           |
| `crypto_wallet_address` | string | Always present (currently returned empty).                                                                                                                                                                                                                           |
| `base_price`            | number | Always present (currently returned `0`).                                                                                                                                                                                                                             |
| `final_price`           | number | Always present (currently returned `0`).                                                                                                                                                                                                                             |
| `total_fee`             | number | Always returned as `0` on this list endpoint. Fee data is available only from the transaction details endpoint.                                                                                                                                                      |
| `fee_currency`          | string | Always present (currently returned empty).                                                                                                                                                                                                                           |
| `fee_breakup`           | object | Always present. Object with keys `platform_fee`, `network_fee`, `client_fee`, `discount`, `tax_on_fee`, `tds` (all numbers). All values are returned as `0` on this list endpoint; the actual fee breakdown is available only from the transaction details endpoint. |

Optional fields that appear only when set: `txn_hash`, `address`, `network`, `fees`, `compliance`, `source_id`, `payment_method`.

***

## Sample API Call

```bash theme={null}
curl --location 'https://api.saber.money/api/v2/wallet/transactions?transaction_type=ONRAMP_AND_WITHDRAW' \
--header 'X-Timestamp: 1705491300' \
--header 'X-Client-Id: CLIENT_ID_HERE' \
--header 'X-Request-Id: CC' \
--header 'X-User-Id: USER_ID_HERE' \
--header 'X-Secret-Key: SECRET_KEY_HERE'
```

***

## Sample Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "7f6d5dba-37ea-4cb3-92a8-4c3230bd2162",
      "transaction_type": "EXTERNAL_BUY",
      "status": "ONRAMP_COMPLETED",
      "amount": 1.084745,
      "created_at": 1726956980000,
      "updated_at": 1726957204000,
      "uuid": "",
      "symbol": "",
      "user_id": "",
      "usd_value": 0,
      "tag": "",
      "source_address": "",
      "fiat_amount": 0,
      "crypto_amount": 0,
      "fiat_symbol": "",
      "crypto_wallet_address": "",
      "base_price": 0,
      "final_price": 0,
      "total_fee": 0,
      "fee_currency": "",
      "fee_breakup": {
        "platform_fee": 0,
        "network_fee": 0,
        "client_fee": 0,
        "discount": 0,
        "tax_on_fee": 0,
        "tds": 0
      }
    },
    {
      "id": "e255a814-ddac-465b-a061-eaf760f56ded",
      "transaction_type": "EXTERNAL_BUY",
      "status": "FAILED",
      "amount": 1.084745,
      "failure_code": "FIAT_PAYMENT_TIMED_OUT",
      "failure_desc": "Payment not received within time limit",
      "created_at": 1726956825000,
      "updated_at": 1727043307000,
      "uuid": "",
      "symbol": "",
      "user_id": "",
      "usd_value": 0,
      "tag": "",
      "source_address": "",
      "fiat_amount": 0,
      "crypto_amount": 0,
      "fiat_symbol": "",
      "crypto_wallet_address": "",
      "base_price": 0,
      "final_price": 0,
      "total_fee": 0,
      "fee_currency": "",
      "fee_breakup": {
        "platform_fee": 0,
        "network_fee": 0,
        "client_fee": 0,
        "discount": 0,
        "tax_on_fee": 0,
        "tds": 0
      }
    }
  ]
}
```

***

## Use Cases

1. **Transaction Tracking**: Retrieve all transactions for a user to monitor their history and status.
2. **Error Analysis**: Use `failure_code` and `failure_desc` to analyze and debug failed transactions.
3. **Financial Reporting**: Aggregate transaction IDs, statuses and amounts for tracking; fetch the transaction details endpoint when fee or fiat/crypto amount breakdowns are needed for reconciliation.

***

### Notes

Combine with Saber's webhook system for real-time updates rather than polling.

**API Reference:** [Fetch List of Buy Transactions](https://saber-money.readme.io/reference/fetchlistofbuytransactions)


## Related topics

- [List Transactions (v1)](/api-reference/offramp/list-transactions-v1.md)
- [Get List of Crypto Withdraw Transactions (v1)](/api-reference/wallet-operations/get-list-of-crypto-withdraw-transactions-v1.md)
- [Get List of Internal Transfers (All) (v1)](/api-reference/wallet-operations/get-list-of-internal-transfers-all-v1.md)
- [Get List of Internal Transfers (Single Asset) (v1)](/api-reference/wallet-operations/get-list-of-internal-transfers-single-asset-v1.md)
- [Get Transaction Details (v1)](/api-reference/offramp/get-transaction-details-v1.md)
