Skip to main content

WEBSOCKET API Account Info - Get full balance

WEBSOCKET API Account Info - Get full balance

Written by Albert
Updated over a week ago

Connection

URL:

/frontoffice/ws/v3/account?access_token={YOUR_ACCESS_TOKEN}

arguments array

The connection parameters.

In the first element, provide the accountId as a string.

invocationId string

The invocation identifier.

Must be unique and increase by 1 for each sent message.

target string

The stream name.

Specify "FullBalance".

type int

The operation type.

Set to 4 to indicate a subscription to the stream.

Example:

{
"arguments": [
"67d0456f8c7b1108e4cf5d46"
],
"invocationId": "0",
"target": "FullBalance",
"type": 4
}

Message

type string

The operation type.

2 indicates the streaming is in progress.

invocationId string

The invocation identifier. Same as in the request.

item array of objects

The array of balance objects.

item.assetId string

The asset identifier.

item.available decimal string

The available asset balance.

This value is calculated as Total balance – Locked balance.

item.total decimal string

The overall amount of the asset, including locked funds.

item.locked decimal string

The asset amount locked on the account for execution of all placed Limit orders.

Example:

{
"type": 2,
"invocationId": "0",
"item": [
{
"assetId": "eur",
"available": "497838.8",
"total": "497838.8",
"locked": "0"
}
]
}

Did this answer your question?