> For the complete documentation index, see [llms.txt](https://docs.tokenbot.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokenbot.com/home/api-docs/graphql-api/queries.md).

# Queries

## Auth & User

### `me`

Get the authenticated user's profile.

```graphql
query {
  me {
    success
    data {
      id
      email
      email_verified
      is_active
      provider
      referral_code
      created_at
      onboardingStatus { completed currentStep }
    }
  }
}
```

## Organizations

### `organizations`

```graphql
query {
  organizations(limit: 10, offset: 0) {
    id
    name
    description
    owner_id
    subscription_tier
    max_users
    max_strategies
    max_copiers
  }
}
```

### `organization`

```graphql
query {
  organization(id: "org_123") {
    id
    name
    settings {
      allow_user_registration
      require_email_verification
      two_factor_required
    }
  }
}
```

## Exchange Accounts

### `exchangeAccounts` / `get_exchange_accounts`

```graphql
query {
  exchangeAccounts(limit: 10) {
    id
    exchange_name
    account_name
    trading_type
    is_active
    balance
    last_sync_at
  }
}
```

### `exchangeAccount`

```graphql
query {
  exchangeAccount(id: "exc_123") {
    id
    exchange_name
    permissions
    perpetual_capabilities
  }
}
```

## Strategies

### `get_strategies`

```graphql
query {
  get_strategies {
    success
    data {
      id
      name
      exchange
      status
      is_active
      copiers { id name }
      totalTrades
      currentBalanceUSD
      balanceChange24h
    }
  }
}
```

## Copiers

### `get_copiers`

```graphql
query {
  get_copiers {
    success
    data {
      id
      name
      exchange
      status
      is_active
      strategy { id name }
      totalTrades
      currentBalanceUSD
    }
  }
}
```

## Trades

### `trades`

```graphql
query {
  trades(limit: 20, offset: 0) {
    id
    side
    type
    price
    amount
    fee
    status
    created_at
  }
}
```

### `tradesByStrategy`

```graphql
query {
  tradesByStrategy(strategy_id: "str_123", limit: 10) {
    id
    side
    price
    amount
    status
  }
}
```

### `trade`

```graphql
query {
  trade(id: "trd_123") {
    id
    side
    type
    price
    amount
    status
  }
}
```

## Trade Pairs

### `tradePairs`

```graphql
query {
  tradePairs(exchange: "binance", limit: 50) {
    id
  }
}
```

## Notifications

### `notifications`

```graphql
query {
  notifications(limit: 20, unread_only: true) {
    id
  }
}
```

### `unreadNotificationCount`

```graphql
query {
  unreadNotificationCount
}
```

## Settings

### `userSettings`

```graphql
query {
  userSettings {
    key
    value
  }
}
```

## Rewards

### `userRewards`

```graphql
query {
  userRewards(limit: 10) {
    id
  }
}
```

### `rewardTypes`

```graphql
query {
  rewardTypes { id }
}
```

## Withdrawals

### `withdrawals`

```graphql
query {
  withdrawals(limit: 10) {
    id
  }
}
```

## Passkeys

### `userPasskeys`

```graphql
query {
  userPasskeys {
    success
    data {
      id
      device_name
      device_type
      created_at
      last_used_at
    }
  }
}
```

## Onboarding

### `getOnboardingStatus`

```graphql
query {
  getOnboardingStatus {
    success
    data {
      completed
      currentStep
      checklist {
        exchangeConnected
        strategyAdded
        copierAdded
        messagingLinked
      }
    }
  }
}
```

## Supported Exchanges

### `get_supported_exchanges`

```graphql
query {
  get_supported_exchanges {
    success
    data { id name }
  }
}
```

## Admin Queries

### `adminGetDashboard`

System overview stats (admin only).

### `adminGetUsers`

```graphql
query {
  adminGetUsers(page: 1, limit: 20, search: "john") {
    id
    email
    is_active
    is_system_admin
  }
}
```

### `adminGetUser`

Detailed user info (admin only).

### `adminGetApiKeys`

List API keys with optional filters (admin only).

### `adminGetAuditLogs`

Query audit logs with filters (admin only).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tokenbot.com/home/api-docs/graphql-api/queries.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
