Type/to search
Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
Built-in Variables and Constants
Conventions
Exchanges

Returned by exchange.GetAccount(): the available and frozen amounts of the quote and base currencies, plus equity and unrealized profit and loss on futures.

Attributes

NameTypeDescription

Info

object

Raw data returned by the exchange API. This property does not exist in backtesting mode.

Balance

number

Available amount of quote currency. In spot trading, if the trading pair is BTC_USDT, Balance represents the current available USDT amount. In USDT-margined contracts, Balance represents the available margin (USDT, quoteCurrency) amount.

FrozenBalance

number

Asset value frozen when orders are pending.

Stocks

number

Available amount of base currency. In spot trading, if the trading pair is BTC_USDT, Stocks represents the current available BTC amount. In coin-margined contracts, Stocks represents the available margin (coin, baseCurrency) amount.

FrozenStocks

number

Asset value frozen when orders are pending.

Equity

number

Only supported by futures exchange objects. The Equity field represents the total equity of the futures account margin under the current contract settings. If the exchange API does not provide relevant data, this field value is 0.

UPnL

number

Only supported by futures exchange objects. The UPnL field represents the total unrealized profit and loss of all open positions in the futures account margin under the current contract settings.

See Also

Remarks

The exchange.GetAccount() function returns an Account structure. The data in the returned structure depends on the currently set trading pair and contract code.