> ## Documentation Index
> Fetch the complete documentation index at: https://dexbuilder.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Account Activity

> Query Event Contracts positions, trades, and related activity for the currently authenticated account.

The Broker API returns positions and trades for the user identified by `X-User-Wallet-Address`. These private endpoints require a Broker API Key. See [Broker API Key and signing](https://dexbuilder.mintlify.site/en/api-reference/common/broker-authentication.md).

Production Base URL:

```text theme={null}
https://api.dexbuilder.com
```

## List Positions

```bash cURL theme={null}
curl -G "https://api.dexbuilder.com/api/v4/broker/event_contracts/positions" \
  -H "KEY: ${BROKER_API_KEY}" \
  -H "SIGN: ${SIGN}" \
  -H "Timestamp: ${TIMESTAMP}" \
  -H "X-User-Wallet-Address: ${USER_WALLET}" \
  --data-urlencode "event_id=<event_id>" \
  --data-urlencode "condition_id=<condition_id>" \
  --data-urlencode "settlement_status=OPEN" \
  --data-urlencode "limit=20"
```

Common response fields include `position_id`, `event_id`, `token_id`, `outcome`, `size`, `available_size`, `locked_size`, `avg_open_price`, `position_value`, `settlement_status`, `won`, and `updated_at`.

## List Settled Positions

```bash cURL theme={null}
curl -G "https://api.dexbuilder.com/api/v4/broker/event_contracts/positions/settled" \
  -H "KEY: ${BROKER_API_KEY}" \
  -H "SIGN: ${SIGN}" \
  -H "Timestamp: ${TIMESTAMP}" \
  -H "X-User-Wallet-Address: ${USER_WALLET}"
```

This endpoint returns settled Event Contracts positions.

## List User Trades

```bash cURL theme={null}
curl -G "https://api.dexbuilder.com/api/v4/broker/event_contracts/usertrades" \
  -H "KEY: ${BROKER_API_KEY}" \
  -H "SIGN: ${SIGN}" \
  -H "Timestamp: ${TIMESTAMP}" \
  -H "X-User-Wallet-Address: ${USER_WALLET}" \
  --data-urlencode "condition_id=<condition_id>" \
  --data-urlencode "token_id=<token_id>" \
  --data-urlencode "limit=20"
```

User trade records typically include `trade_id`, `order_id`, `condition_id`, `token_id`, `price`, `size`, `side`, `role`, and `fee_rate`.

> [!NOTE]
>
> Account endpoints query data for the currently authenticated user. They should not be interpreted as public on-chain query endpoints for arbitrary wallet addresses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.