Get Transactions
Retrieve your transaction history including deposits and withdrawals.
GET/api/1/b2b/transactions
Query Parameters
| Parameter | Type | Description |
|---|
page | integer | Page number (default: 1) |
page_size | integer | Results per page (default: 20, max: 100) |
Request
curl -X GET "https://api.sproutfi.xyz/api/1/b2b/transactions?page=1&page_size=20" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"code": 0,
"msg": "success",
"data": {
"transactions": [
{
"id": 1,
"wallet_id": 1,
"tx_type": "deposit",
"amount": "5000.00",
"tx_hash": "0x1234...abcd",
"from_address": "0xYourExternalWallet",
"to_address": "0xYourSproutWallet",
"status": "confirmed",
"confirmed_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:28:00Z"
},
{
"id": 2,
"wallet_id": 1,
"tx_type": "withdraw",
"amount": "1000.00",
"tx_hash": "0x5678...efgh",
"from_address": "0xYourSproutWallet",
"to_address": "0xYourExternalWallet",
"status": "confirmed",
"confirmed_at": "2024-01-20T14:00:00Z",
"created_at": "2024-01-20T13:55:00Z"
}
],
"total": 2,
"page": 1,
"page_size": 20
}
}
Transaction Types
| Type | Description |
|---|
deposit | USDC deposited to your wallet |
withdraw | USDC withdrawn from your wallet |
Transaction Statuses
| Status | Description |
|---|
pending | Transaction submitted, awaiting confirmation |
confirmed | Transaction confirmed on chain |
failed | Transaction failed |
Response Fields
| Parameter | Type | Description |
|---|
id | number | Transaction ID |
wallet_id | number | Wallet ID |
tx_type | string | Transaction type (deposit/withdraw) |
amount | string | Transaction amount in USDC |
tx_hash | string | On-chain transaction hash |
from_address | string | Source address |
to_address | string | Destination address |
status | string | Transaction status |
confirmed_at | string | Confirmation timestamp (ISO 8601) |
created_at | string | Creation timestamp (ISO 8601) |