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.
Filter spesific exchange by it`s trackId.
Filter exchanges based on type.
Specify the currency symbol for filtering exchanges in a specific fromCurrency.
Specify the currency symbol for filtering exchanges in a specific toCurrency.
The start of the date window to query for exchanges in unix format.
The start of the date window to query for exchanges in unix format.
Sort the received list by a parameter.
create_datePossible values: Display the list in ascending or descending order.
descPossible values: Number of records to be displayed on one page.
10The page number of the results you want to retrieve.
1Your General API Key for authentication and authorization.
application/jsonSuccessful operation
Bad request
import requests
url = 'https://api.oxapay.com/v1/general/swap/'
params = {
'size': 20,
'page': 1
}
headers = {
'general_api_key': 'YOUR_GENERAL_API_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, params=params, headers=headers)
result = response.json()
print(result){
"data": {
"list": [
{
"track_id": "393831199",
"from_currency": "USDT",
"to_currency": "BTC",
"from_amount": 10,
"to_amount": 0.0001054,
"rate": 94876.66034156,
"date": 1736508792
},
{
"track_id": "315890329",
"from_currency": "USDT",
"to_currency": "BTC",
"from_amount": 1,
"to_amount": 0.00001052,
"rate": 95057.03422053,
"date": 1736503906
}
],
"meta": {
"page": 1,
"last_page": 1,
"total": 10
}
},
"message": "Operation completed successfully!",
"error": {},
"status": 200,
"version": "1.0.0"
}Last updated