History
Returns the transaction history for a given wallet address.
Endpoint
GET https://swapper.finance/api/history/v1
Content-Type: application/json
All query parameters are passed as a JSON payload in the data
query parameter, URL-encoded.
Request
Required Parameters
Name
Type
Description
integratorId
string
Your registered integrator ID
walletAddress
string
EVM wallet address to retrieve history for
Optional Parameters
Name
Type
Description
Response
Array of HistoryEntry
objects sorted by date
(descending).
Field
Type
Description
txHash
string | null
Transaction hash (if available).
date
string (ISO 8601)
UTC timestamp of the transaction. Example: 2025-01-01T12:00:00.000Z
tokenAddress
string
ERC-20 token contract address (lowercased).
tokenAmount
string | null
Amount of tokens involved in the transaction.
priceUsd
string
USD value of the transaction.
status
string
Status of the transaction. (Success
, Pending
or Error
)
Example Request
;(async () => {
const payload = {
integratorId: "xxx",
walletAddress: "0x0..."
};
const encoded = encodeURIComponent(JSON.stringify(payload));
const url = `https://swapper.finance/api/history/v1?data=${encoded}`;
const res = await fetch(url, {
method: "GET",
headers: { "Content-Type": "application/json" },
});
const tokens = await res.json();
console.log("Fetched history:", tokens);
})();
Example Response
[
{
"chainId": "1",
"txHash": "0x0...",
"date": "2025-01-10T00:00:00.000Z",
"action": "SELL",
"tokenAddress": "0x0...",
"tokenAmount": "37853336658481234",
"priceUsd": "59.49",
"status": "Success"
},
...
]
Last updated