# Portfolio

> Read your balance, positions, fills, settlements and account history.

Source: https://docs.stxapp.io/sdks/typescript/portfolio/

These calls read your own account. The fields are described in the [API reference](/api/rest/). To keep these figures current without polling, use the [live account view](/sdks/typescript/websockets#live-account-view).

```ts
import { STX } from "@stxapp/stx-typescript";

const client = new STX();

const balance = await client.balance();
console.log(balance.available_balance);

for (const p of await client.positions()) {
  console.log(p.market_id, p.position);
}

for await (const fill of client.iterFills({ marketIds: [marketId] })) {
  console.log(fill.trade_id, fill.action, fill.filled, "@", fill.price);
}

const settlements = await client.settlements({ limit: 50 });
```

| Method | Filters |
|---|---|
| `balance()` | none |
| `positions()` | `marketIds` |
| `fills()` | `marketIds`, `orderIds`, `status` |
| `settlements()` | `marketIds`, `type` |
| `accountMarketStats()` | `marketIds`, `eventIds`, `sports`, `competitions`, `fromTime`, `toTime`, `excludeZeroSettlements` |
| `deposits()`, `withdrawals()`, `adjustments()`, `fees()`, `loyalty()` | `limit`, `cursor` |

Every list method returns one page and has an `iter*` twin (`iterFills`, `iterSettlements`, `iterDeposits`, ...) that walks all pages. See [pagination](/sdks/typescript/markets#pagination).
