Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

WSSfutures.kraken.com/ws/v1balances
This feed returns balance information for holding wallets, single collateral wallets and multi-collateral wallets.

Request

event
string
required
subscribe or unsubscribe
feed
string
required
The requested subscription feed. Value: balances
api_key
string
required
The user API key.
original_challenge
string
required
The message that is received from a challenge request.
signed_challenge
string
required
The signed challenge message with user API secret.
{
  "event": "subscribe",
  "feed": "balances",
  "api_key": "drUfSSmBbDpcIpwpqK0OBTcGLdAYZJU+NlPIsHaKspu/8feT2YSKl+Jw",
  "original_challenge": "c094497e-9b5f-40da-a122-3751c39b107f",
  "signed_challenge": "Ds0wtsHaXlAby/Vnoil59Q+yJIrJwZGUlgECD3+qEvFcTFfacJi2LrSRzAoqwBAeZk4pGXSmyyIW0uDymZ3olw=="
}

Response Success

event
string
One of: subscribed, subscribed_failed, unsubscribed, unsubscribed_failedThe result.
feed
string
The requested subscription feed. Value: balances
api_key
string
The user API key.
original_challenge
string
The message that is received from a challenge request.
signed_challenge
string
The signed challenge message with user API secret.
{
  "event": "subscribed",
  "feed": "balances"
}

Balances Snapshot

feed
string
The subscribed feed.
account
string
The user account.
timestamp
positive integer
The unix timestamp of the balance state in milliseconds.
seq
positive integer
The subscription message sequence number.
holding
map of floats
A map from currency names to balance quantity.
futures
map of structures
A map from single collateral wallet names to collateral wallet structure.
flex_futures
structure
The multi-collateral wallet structure.
futures_cash_value
float
Cash value sum total of the single collateral wallets in USD.
futures_upnl_cash_value
float
Cash value sum total with unrealized pnl of the single collateral wallets in USD.
{
  "feed": "balances_snapshot",
  "account": "4a012c31-df95-484a-9473-d51e4a0c4ae7",
  "holding": {
    "USDT": 4997.5012493753,
    "XBT": 0.1285407184,
    "ETH": 1.8714395862,
    "LTC": 47.6462740614,
    "GBP": 3733.488646461,
    "USDC": 5001.00020004,
    "USD": 5000.0,
    "BCH": 16.8924625832,
    "EUR": 4459.070194683,
    "XRP": 7065.5399485629
  },
  "futures": {
    "F-ETH:EUR": {
      "name": "F-ETH:EUR",
      "pair": "ETH/EUR",
      "unit": "EUR",
      "portfolio_value": 0.0,
      "balance": 0.0,
      "maintenance_margin": 0.0,
      "initial_margin": 0.0,
      "available": 0.0,
      "unrealized_funding": 0.0,
      "pnl": 0.0
    },
    "F-XBT:USD": {
      "name": "F-XBT:USD",
      "pair": "XBT/USD",
      "unit": "XBT",
      "portfolio_value": 0.0,
      "balance": 0.0,
      "maintenance_margin": 0.0,
      "initial_margin": 0.0,
      "available": 0.0,
      "unrealized_funding": 0.0,
      "pnl": 0.0
    }
  },
  "flex_futures": {
    "currencies": {
      "USDT": {
        "quantity": 0.0,
        "value": 0.0,
        "collateral_value": 0.0,
        "available": 0.0,
        "haircut": 0.0,
        "conversion_spread": 0.0
      },
      "USD": {
        "quantity": 0.0,
        "value": 0.0,
        "collateral_value": 0.0,
        "available": 0.0,
        "haircut": 0.0,
        "conversion_spread": 0.0
      }
    },
    "balance_value": 0.0,
    "portfolio_value": 0.0,
    "collateral_value": 0.0,
    "initial_margin": 0.0,
    "initial_margin_without_orders": 0.0,
    "maintenance_margin": 0.0,
    "pnl": 0.0,
    "unrealized_funding": 0.0,
    "total_unrealized": 0.0,
    "total_unrealized_as_margin": 0.0,
    "margin_equity": 0.0,
    "available_margin": 0.0,
    "isolated": {
      "PF_ETHUSD": {
        "initial_margin": 0.0,
        "initial_margin_without_orders": 0.0,
        "maintenance_margin": 0.0,
        "pnl": 0.0,
        "unrealized_funding": 0.0,
        "total_unrealized": 0.0,
        "total_unrealized_as_margin": 0.0
      }
    },
    "cross": {
      "balance_value": 9963.66,
      "portfolio_value": 9963.66,
      "collateral_value": 9963.66,
      "initial_margin": 0.0,
      "initial_margin_without_orders": 0.0,
      "maintenance_margin": 0.0,
      "pnl": 0.0,
      "unrealized_funding": 0.0,
      "total_unrealized": 0.0,
      "total_unrealized_as_margin": 0.0,
      "margin_equity": 9963.66,
      "available_margin": 9963.66,
      "effective_leverage": 0.0
    }
  },
  "timestamp": 1640995200000,
  "seq": 0
}

Balances Delta

feed
string
The subscribed feed.
account
string
The user account.
timestamp
positive integer
The unix timestamp of the balance state in milliseconds.
seq
positive integer
The subscription message sequence number.
holding
optional map of floats
A map from currency names to balance quantity.
futures
optional map of structures
A map from single collateral wallet names to collateral wallet structure.
flex_futures
optional structure
The multi-collateral wallet structure.
{
  "feed": "balances",
  "account": "7a641082-55c7-4411-a85f-930ec2e09617",
  "holding": {
    "USD": 5000.0
  },
  "futures": {},
  "timestamp": 1640995200000,
  "seq": 83
}

Response Error

event
string
Value: error
message
string
One of: Invalid feed, Json ErrorAn error message.
{
  "event": "error",
  "message": "Invalid feed"
}