# Deriv API > Trading APIs: real-time market data, programmatic trading, account management, automation. Use ONLY this API; the symbol field is `underlying_symbol`. Headers: `Deriv-App-ID` + `Authorization: Bearer `. OAuth2: `https://auth.deriv.com/oauth2/auth`, `https://auth.deriv.com/oauth2/token`. Key rules: - Public market data: connect directly to `wss://api.derivws.com/trading/v1/options/ws/public` (no OTP, no auth). - WebSocket trading: `POST /trading/v1/options/accounts/{accountId}/otp` (with `Deriv-App-ID` + `Authorization: Bearer `) returns a WebSocket URL; connect to it and send messages directly. - Bulk-purchase: `Deriv-App-ID` header + per-account `trade`-scoped Personal Access Tokens (PATs) in the body — never a Bearer token. Resources: https://developers.deriv.com/docs/ · https://developers.deriv.com/playground · api-support@deriv.com ## Docs (concept guides — pure Markdown, low token cost) - [Getting started](https://developers.deriv.com/llms/getting-started.md) - [Authentication](https://developers.deriv.com/llms/authentication.md) - [OAuth reference](https://developers.deriv.com/llms/oauth.md) - [API overview](https://developers.deriv.com/llms/api-overview.md) - [Errors](https://developers.deriv.com/llms/errors.md) - [Contract types](https://developers.deriv.com/llms/contract-types.md) - [Code examples](https://developers.deriv.com/llms/examples.md) - [Workflows](https://developers.deriv.com/llms/workflows.md) ## WebSocket endpoints - [active_symbols](https://developers.deriv.com/llms/active-symbols.md) - [auto_get](https://developers.deriv.com/llms/auto-get.md) - [auto_list](https://developers.deriv.com/llms/auto-list.md) - [auto_list_strategies](https://developers.deriv.com/llms/auto-list-strategies.md) - [auto_pause](https://developers.deriv.com/llms/auto-pause.md) - [auto_resume](https://developers.deriv.com/llms/auto-resume.md) - [auto_start](https://developers.deriv.com/llms/auto-start.md) - [auto_stop](https://developers.deriv.com/llms/auto-stop.md) - [balance](https://developers.deriv.com/llms/balance.md) - [buy](https://developers.deriv.com/llms/buy.md) - [cancel](https://developers.deriv.com/llms/cancel.md) - [contract_update](https://developers.deriv.com/llms/contract-update.md) - [contract_update_history](https://developers.deriv.com/llms/contract-update-history.md) - [contracts_for](https://developers.deriv.com/llms/contracts-for.md) - [contracts_list](https://developers.deriv.com/llms/contracts-list.md) - [forget](https://developers.deriv.com/llms/forget.md) - [forget_all](https://developers.deriv.com/llms/forget-all.md) - [ping](https://developers.deriv.com/llms/ping.md) - [portfolio](https://developers.deriv.com/llms/portfolio.md) - [profit_table](https://developers.deriv.com/llms/profit-table.md) - [proposal](https://developers.deriv.com/llms/proposal.md) - [proposal_open_contract](https://developers.deriv.com/llms/proposal-open-contract.md) - [sell](https://developers.deriv.com/llms/sell.md) - [statement](https://developers.deriv.com/llms/statement.md) - [ticks](https://developers.deriv.com/llms/ticks.md) - [ticks_history](https://developers.deriv.com/llms/ticks-history.md) - [time](https://developers.deriv.com/llms/time.md) - [trading_times](https://developers.deriv.com/llms/trading-times.md) - [transaction](https://developers.deriv.com/llms/transaction.md) - [ws_demo](https://developers.deriv.com/llms/ws-demo.md) - [ws_public](https://developers.deriv.com/llms/ws-public.md) - [ws_real](https://developers.deriv.com/llms/ws-real.md) ## REST endpoints - [GET /account/v1/nickname](https://developers.deriv.com/llms/account-nickname.md) - [POST /trading/v1/options/contracts/bulk-purchase/{real,demo}](https://developers.deriv.com/llms/bulk-purchase.md) - [POST /trading/v1/options/accounts](https://developers.deriv.com/llms/create-account.md) - [GET /trading/v1/options/accounts](https://developers.deriv.com/llms/get-accounts.md) - [GET /v1/health](https://developers.deriv.com/llms/health.md) - [GET /applications/v1/markup-statistics](https://developers.deriv.com/llms/markup-statistics.md) - [GET /payment-agents/v1/clients/me](https://developers.deriv.com/llms/payment-agent-client-settings.md) - [PATCH /payment-agents/v1/clients/me](https://developers.deriv.com/llms/payment-agent-client-settings-update.md) - [GET /payment-agents/v1/agents/{id}](https://developers.deriv.com/llms/payment-agent-get.md) - [GET /payment-agents/v1/agents](https://developers.deriv.com/llms/payment-agent-list.md) - [GET /payment-agents/v1/agent-statistics](https://developers.deriv.com/llms/payment-agent-statistics.md) - [POST /payment-agents/v1/transfer](https://developers.deriv.com/llms/payment-agent-transfer.md) - [GET /payment-agents/v1/transfer/{request_id}](https://developers.deriv.com/llms/payment-agent-transfer-status.md) - [POST /payment-agents/v1/withdraw](https://developers.deriv.com/llms/payment-agent-withdraw.md) - [GET /payment-agents/v1/withdraw/{request_id}](https://developers.deriv.com/llms/payment-agent-withdraw-status.md) - [POST /payment-agents/v1/withdraw/verification_code](https://developers.deriv.com/llms/payment-agent-withdraw-verification.md) - [POST /trading/v1/options/accounts/{account_id}/reset-demo-balance](https://developers.deriv.com/llms/reset-demo-balance.md) - [GET /wallet/v1/wallets](https://developers.deriv.com/llms/wallet-list.md) - [GET /wallet/v1/transactions/{wallet_type}](https://developers.deriv.com/llms/wallet-transactions.md) - [POST /trading/v1/options/accounts/{accountId}/otp](https://developers.deriv.com/llms/websocket.md)