Swipelux

Get the balance of a customer

Retrieve the balance of a customer

GET
/v1/customers/{id}/balances

Authorization

X-API-Key<token>

In: header

Path Parameters

idRequiredstring

The customer ID

Response Body

The balance has been retrieved successfully

customerIdRequiredstring

Customer ID from the request

totalBalanceRequiredobject

Total balance across all wallets

walletsRequiredarray<object>

Array of wallets owned by the customer

export interface Response {
  /**
   * Customer ID from the request
   */
  customerId: string;
  /**
   * Total balance across all wallets
   */
  totalBalance: {
    /**
     * Total balance amount
     */
    amount: string;
    /**
     * Base currency (e.g., USD)
     */
    currency: string;
  };
  /**
   * Array of wallets owned by the customer
   */
  wallets: {
    /**
     * Unique wallet identifier
     */
    walletId: string;
    /**
     * Network the wallet is on
     */
    network: string;
    /**
     * Wallet address on the network
     */
    address: string;
    /**
     * Token balances in this wallet
     */
    balances: {
      /**
       * Currency/token symbol
       */
      currency: string;
      /**
       * Balance amount
       */
      amount: string;
    }[];
  }[];
}
 
curl -X GET "https://wallet.swipelux.com/v1/customers/string/balances" \
  -H "X-API-Key: <token>"
{
  "customerId": "string",
  "totalBalance": {
    "amount": "string",
    "currency": "string"
  },
  "wallets": [
    {
      "walletId": "string",
      "network": "string",
      "address": "string",
      "balances": [
        {
          "currency": "string",
          "amount": "string"
        }
      ]
    }
  ]
}