For the complete documentation index, see llms.txt. This page is also available as Markdown.

Queries

The GraphQL schema is CLI-first and canonical: the active query fields use snake_case get_* names. The camelCase, organization, passkey, onboarding, and metrics queries from the old web-dashboard era are still present in the executable schema but are @deprecated (dashboard sunset) and slated for removal in v2.0 — they are listed at the bottom of this page.

Explore the live schema and every field with GraphiQL at https://gql-api.tokenbot.com/graphql.

Most get_* queries return a success / data / error envelope.

Auth & User

me

Get the authenticated user's profile.

query {
  me {
    success
    data {
      id
      email
      email_verified
      is_active
      provider
      referral_code
      created_at
    }
  }
}

Exchange Accounts

get_exchange_accounts

List the caller's connected exchange accounts.

get_exchange_account

Strategies

get_strategies

Copiers

get_copiers

Trades

get_trades

Accepts optional filters, pagination, sortBy (default EXECUTED_AT), and sortOrder (default DESC).

get_trade

search_trades

Full-text search across trades.

Analytics

Aggregation queries backed by the trade partition store. Date ranges default to MONTH, grouping to DAY.

Query
Args
Returns

get_trade_analytics

dateRange, groupBy, filters

TradeAnalyticsResponse!

get_trade_summary

dateRange, strategyId, exchangeAccountId

TradeSummaryResponse!

get_strategy_performance

dateRange, strategyIds

[StrategyPerformance!]!

get_exchange_performance

dateRange, exchangeAccountIds

[ExchangePerformance!]!

get_pnl_over_time

dateRange, groupBy, strategyId

[DailyPnL!]!

get_trade_correlation

strategyIds!, dateRange

JSON

Trade Pairs

get_trade_pairs

Supported Exchanges

get_supported_exchanges

Reward Types

get_reward_types

User Settings

get_user_setting

Withdrawals

get_withdraws / get_withdraw

API Keys & CLI Identity

Query
Args
Returns

validate_api_key

key_hash: String!

ValidateApiKeyResponse!

list_api_keys

—

ApiKeyListResponse!

cli_challenge

—

CliChallenge!

cli_identity_by_pubkey

public_key: String!

CliIdentity

cli_challenge and register_cli_identity (mutation) back the tokenbot init registration flow; cli_identity_by_pubkey resolves a signed-request public key to its account.

Admin

Admin queries require a system-admin identity (is_system_admin, or an active admin organization role). They are authorized per-resolver via requireAdmin.

adminGetDashboard

System overview stats.

adminGetUsers

adminGetUser

Detailed user info (user_id: String!).

adminGetAuditLogs

Query the admin audit log (admin_id, target_user_id, action, start_date, end_date, page, limit).

tokenbot-admin CLI surface (admin_extended)

These four queries (plus the adminUpdateUser / adminBanUser / adminBulkUserAction mutations) are the operations the internal tokenbot-admin CLI drives:

Query
Args
Returns

adminGetActivityLog

page, limit

ActivityLogResponse!

adminGetStrategies

page, limit

[Strategy!]!

adminGetCopiers

page, limit

[Copier!]!

adminGetLinks

—

[AdminStrategyCopierLink!]!


Deprecated (dashboard-era) queries

These remain resolvable for backward compatibility but are @deprecated (web dashboard sunset, no active consumer) and will be removed in v2.0. Do not build new integrations on them:

  • Organizations: get_organizations, get_organization, get_user_organizations, get_organization_members

  • Passkeys: userPasskeys, checkWebAuthnSupport

  • Onboarding: getOnboardingStatus, shouldShowOnboarding

  • Rewards / Notifications: get_user_reward, get_notification

  • System / Metrics: systemVersion, adminGetApiKeys, adminGetSystemHealth, adminGetMetricsSummary, adminGetMetricsTimeSeries, adminGetSecurityAlerts, adminGetUsageTrends, adminGetMetricsBufferStats

Last updated

Was this helpful?