B2B Partner API

Get Transactions

Retrieve your transaction history including deposits and withdrawals.

GET/api/1/b2b/transactions

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
page_sizeintegerResults 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

TypeDescription
depositUSDC deposited to your wallet
withdrawUSDC withdrawn from your wallet

Transaction Statuses

StatusDescription
pendingTransaction submitted, awaiting confirmation
confirmedTransaction confirmed on chain
failedTransaction failed

Response Fields

ParameterTypeDescription
idnumberTransaction ID
wallet_idnumberWallet ID
tx_typestringTransaction type (deposit/withdraw)
amountstringTransaction amount in USDC
tx_hashstringOn-chain transaction hash
from_addressstringSource address
to_addressstringDestination address
statusstringTransaction status
confirmed_atstringConfirmation timestamp (ISO 8601)
created_atstringCreation timestamp (ISO 8601)