# Account

Source: https://docs.tradeit.app/models/account

A brokerage account the user connected. [Get accounts](/api/get-accounts) returns accounts, and [account webhook events](/sdk/webhooks#account-added) send one as `data`.

## Fields [#fields]

**`id`** `number | string`

Trade It account ID. Pass it as `account_id` in holdings and trade requests.

**`created_at`** `string`

When the record was created.

**`updated_at`** `string` `optional`

When the record last changed.

**`connection_id`** `number | string`

The brokerage login the account belongs to. Accounts on one connection disconnect and reconnect together.

**`external_id`** `string`

The brokerage's account number. Not included in webhook events.

**`name`** `string` `optional`

Display name: the brokerage plus the account number's last four digits.

**`balance`** [Balance](#balance)

Total account value.

**`cash`** [Balance](#balance)

Cash balance.

**`buying_power`** [Balance](#balance)

Funds available to trade.

**`supported_assets`** `integer | null` `optional`

Asset types this account can trade, when narrower than its brokerage's. Same bitmask as the brokerage's `supported_assets`.

**`synced_at`** `string (format: date-time)` `optional`

When balances were last synced from the brokerage.

**`holdings_synced_at`** `string (format: date-time)` `optional`

When holdings were last synced from the brokerage.

**`trades_synced_at`** `string (format: date-time)` `optional`

When trade history was last synced from the brokerage.

## Brokerage details [#brokerage-details]

[Get accounts](/api/get-accounts) returns each account as `{ account, brokerage_metadata, connection }`. These are the fields beside `account`.

**`brokerage_metadata`** `object`

The brokerage holding the account and what it supports.

> **`id`** `number`
> 
> 
> Trade It brokerage ID.
> 
> 
> **`name`** `string`
> 
> 
> Brokerage name.
> 
> 
> **`fractional_support`** `boolean`
> 
> 
> Whether the brokerage supports fractional shares.
> 
> 
> **`minimum_order`** `number` `optional`
> 
> 
> Smallest order the brokerage accepts, in USD.
> 
> 
> **`options_support`** `boolean`
> 
> 
> Whether the brokerage supports options.
> 
> 
> **`take_profit_support`** `boolean` `optional`
> 
> 
> Whether the brokerage can attach a take-profit exit to an entry order.
> 
> 
> **`stop_loss_support`** `boolean` `optional`
> 
> 
> Whether the brokerage can attach a stop-loss exit to an entry order.
> 
> 
> **`oco_support`** `boolean` `optional`
> 
> 
> Whether take-profit &amp; stop-loss are supported on an OCO Sell order.

**`connection`** `object`

The account's brokerage connection. `id` matches the account's `connection_id`.

> **`id`** `number | string`
> 
> 
> The database ID. Use for lookups.
> 
> 
> **`status`** `enum` `optional`
> 
> 
> `0` pending, `1` connected, `10` disconnected.
> 
> 
> `0``1``10`

## Balance [#balance]

Money fields are Balance objects.

**`amount`** `number`

Amount in `currency`.

**`currency`** `string`

ISO 4217 currency code, such as `USD`.
