Swap History
This endpoint allows you to retrieve a list of swap transactions based on your General API Key. You can filter the results by various criteria, including time range, currency, and swap type (e.g., auto_convert, manual_swap, or swap_by_api). Pagination support lets you fetch the results in smaller, manageable sets for better control and efficiency.
GET
https://api.oxapay.com/v1/general/swap
Authentication
You must include the General API Key in the request header to authenticate your access to the API.
general_api_key*
string
Your General API Key for authentication and authorization.
Request Params
track_id
integer
Filter spesific exchange by it`s trackId.
type
string
Filter exchanges based on type (autoConvert or manualSwap or swapByApi).
from_currency
string
to_currency
string
from_date
integer
The start of the date window to query for exchanges in unix format.
to_date
integer
The start of the date window to query for exchanges in unix format.
sort_by
string
Sort the received list by a parameter. Set to 'create_date' by default. Possible values: 'create_date', 'amount' [default 'create_date'].
sort_type
string
Display the list in ascending or descending order. Possible values: 'asc', 'desc' [default 'desc'].
size
integer
Number of records to be displayed on one page. Possible values: from 1 to 200 - default 10.
page
integer
The page number of the results you want to retrieve. Possible values: from 1 to the total number of pages - default 1.
API Request Sample Codes
These example code snippets demonstrate how to request the "Swap History" endpoint using different programming languages. You can customize the data parameters according to your specific requirements.
API Response Example
The response example above is provided to help you understand the format and structure of the response. If you have any further questions or need assistance, please feel free to contact to your account manager.
Last updated