WSSfutures.kraken.com/ws/v1balances
This feed returns balance information for holding wallets, single collateral wallets and multi-collateral wallets.
Request
subscribe or unsubscribeThe requested subscription feed. Value:
balancesThe user API key.
The message that is received from a challenge request.
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
One of:
subscribed, subscribed_failed, unsubscribed, unsubscribed_failedThe result.The requested subscription feed. Value:
balancesThe user API key.
The message that is received from a challenge request.
The signed challenge message with user API secret.
{
"event": "subscribed",
"feed": "balances"
}
Balances Snapshot
The subscribed feed.
The user account.
The unix timestamp of the balance state in milliseconds.
The subscription message sequence number.
A map from currency names to balance quantity.
Show properties
Show properties
The name of the account.
The wallet currency pair.
The wallet settlement unit.
The current balance with haircuts and any unrealized margin from open positions in settlement units.
The current balance in settlement units.
The maintenance margin for open positions.
The initial margin for open positions and open orders.
The current portfolio value minus initial margin.
The total unrealized funding for open positions.
The total profit and loss for open positions.
The cash value of the single collateral wallet in USD.
A map from single collateral wallet names to collateral wallet structure.
Show properties
Show properties
The name of the account.
The wallet currency pair.
The wallet settlement unit.
The current balance with haircuts and any unrealized margin from open positions in settlement units.
The current balance in settlement units.
The maintenance margin for open positions.
The initial margin for open positions and open orders.
The current portfolio value minus initial margin.
The total unrealized funding for open positions.
The total profit and loss for open positions.
The cash value of the single collateral wallet in USD.
The multi-collateral wallet structure.
Show properties
Show properties
The current USD balance of the account.
The current collateral value with unrealized margin from any open positions.
The current USD balance with haircuts.
The total initial margin for open positions and open orders.
The total initial margin for open positions.
The total maintenance margin for open positions.
The total profit and loss for open positions.
The total unrealized funding for open positions.
The total unrealized funding and pnl.
The total unrealized in USD.
The current collateral value and unrealized margin.
The margin equity minus initial margin.
Sum of all position sizes in USD.
True if the user has unified balances enabled, false if not.
A map from collateral wallet names to collateral wallet structure.
Show properties
Show properties
The currency quantity.
The USD value of the currency balance.
The current USD balance with haircuts.
The total available margin valued in the wallet currency.
The rate of reduction in the value of a collateral asset that may be used as margin.
The conversion spread is used to calculate conversion fee for multi-collateral wallets.
A map from collateral wallet names to collateral wallet structure.
Show properties
Show properties
Initial margin for any position plus open orders.
Initial margin for any position.
Maintenance margin for any position.
Total profit and loss for any position.
Unrealized funding for any position.
Unrealized funding plus pnl.
Total unrealized as USD.
The current margin information for cross position(s).
Show properties
Show properties
Initial margin for all positions plus open orders.
Initial margin for all positions.
Maintenance margin for all positions.
Total profit and loss for all positions.
Unrealized funding for all positions.
Unrealized funding plus pnl.
Total unrealized as USD.
Total USD balance minus initial margin of isolated positions.
USD balance, but with haircuts applied.
USD balance plus total unrealized.
Collateral value plus total unrealized.
Margin equity minus initial margin of cross and isolated positions.
Ratio of position size to margin equity.
Sum of all cross position sizes in USD.
A breakdown of the portfolio margin calculation components.
Cash value sum total of the single collateral wallets in USD.
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
The subscribed feed.
The user account.
The unix timestamp of the balance state in milliseconds.
The subscription message sequence number.
A map from currency names to balance quantity.
Show properties
Show properties
The name of the account.
The wallet currency pair.
The wallet settlement unit.
The current balance with haircuts and any unrealized margin from open positions in settlement units.
The current balance in settlement units.
The maintenance margin for open positions.
The initial margin for open positions and open orders.
The current portfolio value minus initial margin.
The total unrealized funding for open positions.
The total profit and loss for open positions.
A map from single collateral wallet names to collateral wallet structure.
Show properties
Show properties
The name of the account.
The wallet currency pair.
The wallet settlement unit.
The current balance with haircuts and any unrealized margin from open positions in settlement units.
The current balance in settlement units.
The maintenance margin for open positions.
The initial margin for open positions and open orders.
The current portfolio value minus initial margin.
The total unrealized funding for open positions.
The total profit and loss for open positions.
The multi-collateral wallet structure.
Show properties
Show properties
The current USD balance of the account.
The current collateral value with unrealized margin from any open positions.
The current USD balance with haircuts.
The total initial margin for open positions and open orders.
The total initial margin for open positions.
The total maintenance margin for open positions.
The total profit and loss for open positions.
The total unrealized funding for open positions.
The total unrealized funding and pnl.
The total unrealized in USD.
The current collateral value and unrealized margin.
The margin equity minus initial margin.
Sum of all position sizes in USD.
True if the user has unified balances enabled, false if not.
A map from collateral wallet names to collateral wallet structure.
Show properties
Show properties
The currency quantity.
The USD value of the currency balance.
The current USD balance with haircuts.
The total available margin valued in the wallet currency.
The rate of reduction in the value of a collateral asset that may be used as margin.
The conversion spread is used to calculate conversion fee for multi-collateral wallets.
A map from collateral wallet names to collateral wallet structure.
Show properties
Show properties
Initial margin for any position plus open orders.
Initial margin for any position.
Maintenance margin for any position.
Total profit and loss for any position.
Unrealized funding for any position.
Unrealized funding plus pnl.
Total unrealized as USD.
The current margin information for cross position(s).
Show properties
Show properties
Initial margin for all positions plus open orders.
Initial margin for all positions.
Maintenance margin for all positions.
Total profit and loss for all positions.
Unrealized funding for all positions.
Unrealized funding plus pnl.
Total unrealized as USD.
Total USD balance minus initial margin of isolated positions.
USD balance, but with haircuts applied.
USD balance plus total unrealized.
Collateral value plus total unrealized.
Margin equity minus initial margin of cross and isolated positions.
Ratio of position size to margin equity.
Sum of all cross position sizes in USD.
{
"feed": "balances",
"account": "7a641082-55c7-4411-a85f-930ec2e09617",
"holding": {
"USD": 5000.0
},
"futures": {},
"timestamp": 1640995200000,
"seq": 83
}
{
"feed": "balances",
"account": "7a641082-55c7-4411-a85f-930ec2e09617",
"flex_futures": {
"currencies": {
"USD": { "quantity": 5000.0, "value": 5000.0, "collateral_value": 5000.0, "available": 5000.0, "haircut": 0.0, "conversion_spread": 0.0 }
},
"balance_value": 5000.0,
"portfolio_value": 5000.0,
"collateral_value": 5000.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": 5000.0,
"available_margin": 5000.0,
"isolated": {},
"cross": {
"balance": 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,
"total_unrealized": 0.0,
"total_unrealized_as_margin": 0.0,
"margin_equity": 0.0,
"available_margin": 0.0,
"effective_leverage": 0.0
}
},
"timestamp": 1640995200000,
"seq": 1
}
{
"feed": "balances",
"account": "7a641082-55c7-4411-a85f-930ec2e09617",
"holding": {},
"futures": {
"F-XBT:USD": {
"name": "F-XBT:USD",
"pair": "XBT/USD",
"unit": "XBT",
"portfolio_value": 0.1219368845,
"balance": 0.1219368845,
"maintenance_margin": 0.0,
"initial_margin": 0.0,
"available": 0.1219368845,
"unrealized_funding": 0.0,
"pnl": 0.0
}
},
"timestamp": 1640995200000,
"seq": 2
}
Response Error
Value:
errorOne of:
Invalid feed, Json ErrorAn error message.{
"event": "error",
"message": "Invalid feed"
}