---
title: "GET /general/swap"
method: GET
path: "/general/swap"
tags: ["Swap-history"]
---

# GET /general/swap

`GET /general/swap`

## Query parameters

- `track_id` integer
- `type` 'autoConvert' | 'manualSwap' | 'swapByApi'
- `from_currency` string
- `to_currency` string
- `from_date` integer
- `to_date` integer
- `sort_by` 'create_date' | 'amount'
- `sort_type` 'asc' | 'desc'
- `size` integer
- `page` integer

## Headers

- `general_api_key` string, required
- `Content-Type` string, required

## Response `200`

Successful operation

- object
  - `data` object
    - `list` object[]
      - `track_id` string — Unique identifier for the transaction, typically represented as a string.
      - `from_currency` string — The currency being exchanged from.
      - `to_currency` string — The currency being exchanged to.
      - `from_amount` number — The amount of the "from_currency" being swapped, represented with high precision.
      - `to_amount` number — The amount of the "to_currency" received after the swap, represented with high precision.
      - `rate` number — The exchange rate between the "from_currency" and "to_currency" at the time of the transaction.
      - `date` integer — Timestamp (UNIX epoch) representing when the swap occurred, typically in seconds.
    - `meta` object
      - `page` integer — The current page number of the result set.
      - `last_page` integer — The total number of pages available based on the number of records and page size.
      - `total` integer — The total number of payments available for the specified criteria.
  - `message` string — A message containing additional information about the result of the request.
  - `error` object, nullable — An object that provides details about any errors that occurred.
    - `type` string — Type of the error
    - `key` string — Key related to the error
    - `message` string — Error message
  - `status` integer — The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors).
  - `version` string — The version of the API being used.

## Other responses

- `400` — Bad request

---

[API](https://skmtc.dev/oxapay/apis/payments.md) · [All operations](https://skmtc.dev/oxapay/apis/payments/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/oxapay/payments/revisions/19b6abc20c8d/schema)
