User data & service

Service giving information about user, accounts and balances.

Data.

The UserDTO class.

UserDTO represents user information retrieved from the exchange.

Field

Description

id

User ID (usually username).

accounts

The accounts owned by the user.

timestamp

The moment at which the account information was retrieved.

The AccountDTO class.

AccountDTO represents an account owned by a user.

Field

Description

id

A unique identifier for this account.

name

A descriptive name for this account.

features

Account features (FUNDING, TRADING, MARGIN_TRADING, MARGIN_FUNDING).

balances

Represents the different balances for each currency owned by the account.

The BalanceDTO class.

BalanceDTO represents a balance in a currency for an account.

Field

Description

currency

Currency.

total

Returns the total amount of the currency in this balance.

available

Returns the amount of the currency in this balance that is available to trade.

frozen

Returns the frozen amount of the currency in this balance that is locked in a trading.

loaned

Returns the loaned amount of the total currency in this balance that will be returned.

borrowed

Returns the borrowed amount of the available currency in this balance that must be repaid.

withdrawing

Returns the amount of the currency in this balance that is locked in withdrawal.

depositing

Returns the amount of the currency in this balance that is locked in deposit.

Service.

User service.

User service and its XChange implementation

Method

Description

getUser()

Retrieve user information from the exchange (user, accounts, and balances).

This service uses org.knowm.xchange.service.account.UserService.