Type/to search
Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
HttpQuery-options
HttpQuery-return
LogStatus-table
LogStatus-btnTypeOne
LogStatus-btnTypeTwo
Status Bar Components
grid
tabs
kpi
stat
progress
gauge
sparkline
chart
heatmap
calendar
histogram
pie
timeline
markdown
alert
badge
Chart-options
Chart-return
KLineChart-options
KLineChart-return
SetData-data
EventLoop-return
exchange.Go-return
DBExec-return
Dial-return
Thread.join-return
Built-in Variables and Constants
Conventions
Exchanges

Lists label and value pairs, for details such as balances, frozen funds, leverage or liquidation price.

Examples

Two columns show available and frozen funds and the update time.

javascript
function main() { var account = exchange.GetAccount() if (!account) return var f2 = {precision: 2} LogStatus({type: "stat", title: "Account", cols: 2, items: [ {label: "Available", value: account.Balance, unit: "USDT", format: f2}, {label: "Frozen", value: account.FrozenBalance, unit: "USDT", format: f2}, {label: "Updated", value: _D()} ]}) }
python
def main(): account = exchange.GetAccount() if not account: return f2 = {"precision": 2} LogStatus({"type": "stat", "title": "Account", "cols": 2, "items": [ {"label": "Available", "value": account["Balance"], "unit": "USDT", "format": f2}, {"label": "Frozen", "value": account["FrozenBalance"], "unit": "USDT", "format": f2}, {"label": "Updated", "value": _D()} ]})
rust
fn main() { let Ok(a) = exchange.GetAccount() else { return }; let item = |label: &str, v: f64| format!( r#"{{"label": "{}", "value": {}, "unit": "USDT", "format": {{"precision": 2}}}}"#, label, v ); let items = [ item("Available", a.Balance), item("Frozen", a.FrozenBalance), format!(r#"{{"label": "Updated", "value": "{}"}}"#, _D(None)), ]; LogStatus!(format!( r#"{{"type": "stat", "title": "Account", "cols": 2, "items": [{}]}}"#, items.join(",") )); }

Attributes

NameTypeDescription

type

string

Required. Always stat.

items

object array

Required. Entries without label or value are skipped.

items[].label

string

Required. Label.

items[].value

number / string

Required. Number or text.

items[].unit

string

Unit.

items[].color

string

Color: up, down, primary, warning or muted; see Status Bar Components.

items[].format

object

Number format {precision, compact, percent}; see Status Bar Components.

items[].hint

string

Note after the value.

cols

number

Number of side-by-side columns, 1–4. Default 1.

title

string

Title shown at the top left of the component.

id

string

Stable identifier. Set it when the number or order of components changes, so refreshes do not rebuild the component.

span

number

Number of columns it spans in the enclosing grid. Default 1.

See Also