# Account (/docs/tools/account)



All tools on this page need a **Read Data** API key (see
[Authentication](/docs/authentication)). They are read-only; none can place,
modify, or cancel orders or move funds. Fills/orders/wallet timestamps are
**microseconds** (`*_us`); paginated tools return a `meta.after` cursor.

## get\_positions [#get_positions]

Open position(s), lightweight. Returns `entry_price` and `size` only.

**Auth:** Read Data key

| Param                     | Type   | Required | Notes                                      |
| ------------------------- | ------ | -------- | ------------------------------------------ |
| `product_id`              | int    | no       | single product id                          |
| `underlying_asset_symbol` | string | no       | e.g. `BTC`; returns all positions under it |

Pass **exactly one** of the two. For `unrealized_pnl`, `margin`, `mark_price`,
`liquidation_price` and other analytics, use `get_margined_positions`.

```text
Do I have an open BTC position? Show entry price and size.
```

## get\_margined\_positions [#get_margined_positions]

All open margined positions with analytics. The tool to use for risk and P\&L.

**Auth:** Read Data key

| Param            | Type      | Required | Notes                                                        |
| ---------------- | --------- | -------- | ------------------------------------------------------------ |
| `contract_types` | string\[] | no       | subset of `perpetual_futures`, `call_options`, `put_options` |
| `product_ids`    | int\[]    | no       | max 10 product ids                                           |

`size` is signed (positive = long, negative = short). For notional exposure use
`abs(size) * contract_value * index_price&#x60;. Use &#x2A;*`index_price`**, not
`mark_price` (an option's mark is its premium). The tool also patches
`unrealized_pnl` for short options client-side, since the upstream API returns
the unsigned premium value.

```text
Across all my open positions, show unrealised PnL, margin used, and approximate
distance to liquidation. Rank by risk.
```

## get\_product\_leverage [#get_product_leverage]

The order leverage configured for a product on your account.

**Auth:** Read Data key

| Param        | Type | Required | Notes                            |
| ------------ | ---- | -------- | -------------------------------- |
| `product_id` | int  | yes      | product id to fetch leverage for |

```text
What leverage am I set to on BTCUSD?
```

## get\_wallet\_balances [#get_wallet_balances]

Balances across all assets.

**Auth:** Read Data key

No parameters.

Fields: `asset_symbol`, `balance`, `available_balance`, `position_margin`,
`strategy_blocked_amount`. `strategy_blocked_amount` is collateral reserved by an
active Algo Marketplace strategy; normal, not an anomaly.

```text
Show my wallet balances and how much is available vs locked in margin.
```

## get\_wallet\_transactions [#get_wallet_transactions]

Wallet transaction history. Paginated. Timestamps are **microseconds**. Without
`start_time_us`, only the last \~90 days are returned (the response carries a
`notice` field); pass it to reach older history.

**Auth:** Read Data key

| Param               | Type      | Required | Notes                                                               |
| ------------------- | --------- | -------- | ------------------------------------------------------------------- |
| `transaction_types` | string\[] | no       | e.g. `deposit`, `withdrawal`, `funding`, `settlement`, `commission` |
| `asset_ids`         | int\[]    | no       | filter by asset                                                     |
| `start_time_us`     | int       | no       | microseconds epoch                                                  |
| `end_time_us`       | int       | no       | microseconds epoch                                                  |
| `page_size`         | int       | no       | default 50, max 200                                                 |
| `after` / `before`  | string    | no       | pagination cursors                                                  |

```text
Group my wallet transactions for the last 30 days by type and show net change
per asset.
```

## get\_fills [#get_fills]

Your executed trades (fills). Paginated. Timestamps are **microseconds**. Without
`start_time_us`, only the last \~90 days are returned; pass it to reach older
fills.

**Auth:** Read Data key

| Param            | Type      | Required | Notes                   |
| ---------------- | --------- | -------- | ----------------------- |
| `product_ids`    | int\[]    | no       | filter by product       |
| `contract_types` | string\[] | no       | filter by contract type |
| `start_time_us`  | int       | no       | microseconds epoch      |
| `end_time_us`    | int       | no       | microseconds epoch      |
| `page_size`      | int       | no       | default 50, max 200     |
| `after`          | string    | no       | pagination cursor       |

```text
List my fills for the last 7 days grouped by symbol with realised PnL.
```

## bulk\_fills\_export [#bulk_fills_export]

Bulk-export your full fills history to a CSV file on disk: for tax, accounting,
or backtesting without dozens of paginated calls.

**Auth:** Read Data key

| Param            | Type      | Required | Notes                                                                            |
| ---------------- | --------- | -------- | -------------------------------------------------------------------------------- |
| `output_path`    | string    | yes      | must be inside the current working directory or your home directory; `~` expands |
| `product_ids`    | int\[]    | no       | filter by product                                                                |
| `contract_types` | string\[] | no       | filter by contract type                                                          |
| `start_time_us`  | int       | no       | microseconds epoch                                                               |
| `end_time_us`    | int       | no       | microseconds epoch                                                               |

Returns `{path, row_count, size_bytes}`. Without `start_time_us`, the export
covers only the last \~90 days; for a full tax-year export, pass an explicit start
(and usually end) time.

```text
Export all my fills from 1 Jan 2026 to today to ~/delta-fills-2026.csv.
```

## get\_order\_history [#get_order_history]

Closed / cancelled orders, filterable and paginated. Timestamps are
**microseconds**.

**Auth:** Read Data key

| Param            | Type      | Required | Notes                                                      |
| ---------------- | --------- | -------- | ---------------------------------------------------------- |
| `product_ids`    | int\[]    | no       | filter by product                                          |
| `contract_types` | string\[] | no       | filter by contract type                                    |
| `order_types`    | string\[] | no       | `market`, `limit`, `stop_market`, `stop_limit`, `all_stop` |
| `start_time_us`  | int       | no       | microseconds epoch                                         |
| `end_time_us`    | int       | no       | microseconds epoch                                         |
| `page_size`      | int       | no       | default 50, max 200                                        |
| `after`          | string    | no       | pagination cursor                                          |

```text
Show my cancelled and filled orders on ETHUSD over the last week.
```

## get\_open\_orders [#get_open_orders]

Current open / pending orders. Paginated.

**Auth:** Read Data key

| Param            | Type      | Required | Notes                       |
| ---------------- | --------- | -------- | --------------------------- |
| `states`         | string\[] | no       | subset of `open`, `pending` |
| `product_ids`    | int\[]    | no       | max 10 product ids          |
| `contract_types` | string\[] | no       | filter by contract type     |
| `page_size`      | int       | no       | default 50, max 200         |
| `after`          | string    | no       | pagination cursor           |

```text
What open orders do I have right now, and at what prices?
```

## get\_order\_by\_id [#get_order_by_id]

Fetch a single order by id or client order id.

**Auth:** Read Data key

| Param             | Type   | Required | Notes                        |
| ----------------- | ------ | -------- | ---------------------------- |
| `order_id`        | int    | no       | Delta-assigned order id      |
| `client_order_id` | string | no       | your client order id, if set |

Provide **exactly one**.

```text
Look up order 123456789 and show its status and fills.
```

## get\_trading\_preferences [#get_trading_preferences]

Your trading preferences: margin mode, notifications, and similar settings.

**Auth:** Read Data key

No parameters.

```text
What's my current margin mode and trading preferences?
```

## get\_trading\_stats [#get_trading_stats]

Account-level trading volume and statistics.

**Auth:** Read Data key

No parameters.

```text
Show my trading volume and stats for this account.
```
