Skip to main content
GET
/
wallet
/
{wallet_id}
/
transactions
Get transactions
curl --request GET \
  --url https://api.onswitch.xyz/wallet/{wallet_id}/transactions \
  --header 'x-service-key: <api-key>'
import requests

url = "https://api.onswitch.xyz/wallet/{wallet_id}/transactions"

headers = {"x-service-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-service-key': '<api-key>'}};

fetch('https://api.onswitch.xyz/wallet/{wallet_id}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onswitch.xyz/wallet/{wallet_id}/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-service-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.onswitch.xyz/wallet/{wallet_id}/transactions"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-service-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.onswitch.xyz/wallet/{wallet_id}/transactions")
.header("x-service-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.onswitch.xyz/wallet/{wallet_id}/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-service-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "Wallet transactions fetched successfully",
  "timestamp": "2026-04-18T14:22:08.631Z",
  "data": [
    {
      "reference": "2a96f96e-f29e-49de-913d-17c4ea23a517",
      "amount": 5,
      "asset": "base:usdc",
      "type": "send",
      "status": "successful",
      "date": "2026-04-18T09:43:11.000Z",
      "transaction_hash": "0xd078bb42505b9e80dc40d9e93753c83a8019e8bfc8990e352bfce0379beb2354",
      "explorer_url": "https://blockscan.com/tx/0xd078bb42505b9e80dc40d9e93753c83a8019e8bfc8990e352bfce0379beb2354",
      "sender": "0xef6e423ad6ad3855c38417ef4d6a459126009d74",
      "receiver": "0x968a31b0b3bc698e75cd030cd2a69b7395b190da"
    },
    {
      "reference": "4e55e9f4-55ea-4df4-9cea-4e1f7b9cf759",
      "amount": 0.181067,
      "asset": "polygon:usdc",
      "type": "fee",
      "status": "successful",
      "date": "2026-04-18T09:43:10.000Z",
      "transaction_hash": "0xfa93cefb230af021499c3529ea50e934f44964d2261b8f1c15220a7f764713f3",
      "explorer_url": "https://blockscan.com/tx/0xfa93cefb230af021499c3529ea50e934f44964d2261b8f1c15220a7f764713f3",
      "sender": "0xef6e423ad6ad3855c38417ef4d6a459126009d74",
      "receiver": "0xbeb44c790dbe563aff6e649d42ebc44cbde92dc0"
    },
    {
      "reference": "53cc6c5b-e323-4f0f-acad-c4e39259176e",
      "amount": 15,
      "asset": "polygon:usdc",
      "type": "receive",
      "status": "successful",
      "date": "2026-04-18T09:15:56.000Z",
      "transaction_hash": "0xbeab691e6a9dee2d52d4d656676a712257fd075740e7278065d2f6458d5070da",
      "explorer_url": "https://blockscan.com/tx/0xbeab691e6a9dee2d52d4d656676a712257fd075740e7278065d2f6458d5070da",
      "sender": "0xa85c29b94f8a22a7268facee89ef4eca051be2ce",
      "receiver": "0xef6e423ad6ad3855c38417ef4d6a459126009d74"
    }
  ]
}
{
"success": false,
"message": "amount must be greater than 0 for the selected corridor",
"timestamp": "2026-04-18T14:22:08.631Z",
"data": null
}

Authorizations

x-service-key
string
header
required

Service key for API authentication

Path Parameters

wallet_id
string
required

Wallet ID (24-character hex)

Pattern: ^[a-f0-9]{24}$

Query Parameters

page
integer
default:1

Page number (1-based)

Required range: x >= 1
limit
integer
default:100

Number of items per page (max 100)

Required range: 1 <= x <= 100

Response

Transactions retrieved successfully

success
boolean
required
message
string
required
timestamp
string<date-time>
required
data
object[]
required