Accounts subscription
Subscribe to a stream of accounts
Query Parameters
- ACCOUNT_TYPE_UNSPECIFIED: Default value
- ACCOUNT_TYPE_INSURANCE: Insurance pool accounts contain insurance pool funds for a market
- ACCOUNT_TYPE_SETTLEMENT: Settlement accounts exist only during settlement or mark-to-market
- ACCOUNT_TYPE_MARGIN: Margin accounts contain funds set aside for the margin needed to support a party's open positions. Each party will have a margin account for each market they have traded in. Required initial margin is allocated to each market from user's general account. Collateral in the margin account can't be withdrawn or used as margin on another market until it is released back to the general account. Vega protocol uses an internal accounting system to segregate funds held as margin from other funds to ensure they are never lost or 'double spent'
- ACCOUNT_TYPE_GENERAL: General accounts contain the collateral for a party that is not otherwise allocated. A party will have multiple general accounts, one for each asset they want to trade with
- ACCOUNT_TYPE_FEES_INFRASTRUCTURE: Infrastructure accounts contain fees earned by providing infrastructure on Vega
- ACCOUNT_TYPE_FEES_LIQUIDITY: Liquidity accounts contain fees earned by providing liquidity on Vega markets
- ACCOUNT_TYPE_FEES_MAKER: This account is created to hold fees earned by placing orders that sit on the book and are then matched with an incoming order to create a trade - These fees reward parties who provide the best priced liquidity that actually allows trading to take place
- ACCOUNT_TYPE_BOND: This account is created to maintain liquidity providers funds commitments
- ACCOUNT_TYPE_EXTERNAL: External account represents an external source (deposit/withdrawal)
- ACCOUNT_TYPE_GLOBAL_INSURANCE: Global insurance account for the asset
- ACCOUNT_TYPE_GLOBAL_REWARD: Global reward account for the asset
- ACCOUNT_TYPE_PENDING_TRANSFERS: Per asset account used to store pending transfers (if any)
- ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES: Per asset reward account for fees paid to makers
- ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES: Per asset reward account for fees received by makers
- ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES: Per asset reward account for fees received by liquidity providers
- ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS: Per asset reward account for market proposers when the market goes above some trading threshold
Market ID to filter accounts by. If empty, no markets will be filtered.
Party ID to filter accounts by. If empty, no parties will be filtered.
Asset ID to filter accounts by. If empty, no assets will be filtered.
Possible values: [ACCOUNT_TYPE_UNSPECIFIED
, ACCOUNT_TYPE_INSURANCE
, ACCOUNT_TYPE_SETTLEMENT
, ACCOUNT_TYPE_MARGIN
, ACCOUNT_TYPE_GENERAL
, ACCOUNT_TYPE_FEES_INFRASTRUCTURE
, ACCOUNT_TYPE_FEES_LIQUIDITY
, ACCOUNT_TYPE_FEES_MAKER
, ACCOUNT_TYPE_BOND
, ACCOUNT_TYPE_EXTERNAL
, ACCOUNT_TYPE_GLOBAL_INSURANCE
, ACCOUNT_TYPE_GLOBAL_REWARD
, ACCOUNT_TYPE_PENDING_TRANSFERS
, ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES
, ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES
, ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES
, ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS
]
Default value: ACCOUNT_TYPE_UNSPECIFIED
Account type to subscribe to, required field.
Margin account funds will vary as margin requirements on positions change
General accounts are where funds are initially deposited or withdrawn from, it is also the account where funds are taken to fulfil fees and initial margin requirements
- 200
- 500
- default
A successful response.(streaming responses)
Schema
error object
details object[]
result object
snapshot object
'Initial image' snapshot containing current account balances.
accounts object[]
List of account balances.
Possible values: [ACCOUNT_TYPE_UNSPECIFIED
, ACCOUNT_TYPE_INSURANCE
, ACCOUNT_TYPE_SETTLEMENT
, ACCOUNT_TYPE_MARGIN
, ACCOUNT_TYPE_GENERAL
, ACCOUNT_TYPE_FEES_INFRASTRUCTURE
, ACCOUNT_TYPE_FEES_LIQUIDITY
, ACCOUNT_TYPE_FEES_MAKER
, ACCOUNT_TYPE_BOND
, ACCOUNT_TYPE_EXTERNAL
, ACCOUNT_TYPE_GLOBAL_INSURANCE
, ACCOUNT_TYPE_GLOBAL_REWARD
, ACCOUNT_TYPE_PENDING_TRANSFERS
, ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES
, ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES
, ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES
, ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS
]
updates object
List of account updates in the last block.
accounts object[]
List of account balances.
Possible values: [ACCOUNT_TYPE_UNSPECIFIED
, ACCOUNT_TYPE_INSURANCE
, ACCOUNT_TYPE_SETTLEMENT
, ACCOUNT_TYPE_MARGIN
, ACCOUNT_TYPE_GENERAL
, ACCOUNT_TYPE_FEES_INFRASTRUCTURE
, ACCOUNT_TYPE_FEES_LIQUIDITY
, ACCOUNT_TYPE_FEES_MAKER
, ACCOUNT_TYPE_BOND
, ACCOUNT_TYPE_EXTERNAL
, ACCOUNT_TYPE_GLOBAL_INSURANCE
, ACCOUNT_TYPE_GLOBAL_REWARD
, ACCOUNT_TYPE_PENDING_TRANSFERS
, ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES
, ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES
, ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES
, ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS
]
{
"error": {
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
},
"result": {
"snapshot": {
"accounts": [
{
"asset": "string",
"balance": "string",
"marketId": "string",
"owner": "string",
"type": "ACCOUNT_TYPE_UNSPECIFIED"
}
],
"lastPage": true
},
"updates": {
"accounts": [
{
"asset": "string",
"balance": "string",
"marketId": "string",
"owner": "string",
"type": "ACCOUNT_TYPE_UNSPECIFIED"
}
]
}
}
}
An internal server error
Schema
details object[]
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
Schema
details object[]
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}