# WEEX Developer Documentation

Welcome to the official WEEX API documentation.

This portal is the central reference for developers building applications, services, and trading systems that integrate with WEEX. It covers Spot, Futures, and Copy Trading, as well as business APIs for Brokers and Partners.

Whether you are writing a simple script, a production backend, or a trading and analytics system, start here to understand the available capabilities, choose an integration path, and review the requirements for each interface.

## How to use this documentation

This documentation has two main areas:

- **Documentation**: Product introductions, integration preparation, API types, domains, signing, security requirements, and changelogs.
- **API Reference**: Endpoint definitions, request parameters, response schemas, code examples, and Spot and Futures WebSocket streams.

[Agent Native](/agent-native/overview) also provides a machine-readable index and complete documentation for AI coding assistants and agents to load API context.

For a first integration, begin with the guides for your product. If you already know the product or endpoint you need, go directly to the [API Reference](/catalog).

## Choose a starting point

| Integration goal | Recommended starting point |
| --- | --- |
| First WEEX API integration | [Spot Quick Start](/products/spot/QuickStart) for keys, permissions, and request signing |
| Market data, Spot orders, and accounts | [Spot introduction](/products/spot/introduction/APIBriefIntroduction) and [Spot REST API](/catalog/core-trading-spot/api/rest-api/configapi) |
| Futures market data, trading, and positions | [Futures introduction](/products/futures/intro) and [Futures REST API](/catalog/core-trading-futures/api/rest-api/market-api) |
| Lead trader and follower orders, copy settings, and positions | [Copy Trading introduction](/products/copy/intro) and [Copy Trading REST API](/catalog/advanced-trading-copy-trading/api/rest-api/trader) |
| Broker operations, users, and sub-accounts | [Broker introduction](/products/broker/intro) and [Broker REST API](/catalog/vip-institutional-broker/api/rest-api/api) |
| Rebates, invited users, and subordinate partner performance | [Partner introduction](/products/partner/intro) and [Partner REST API](/catalog/vip-institutional-partner/api/rest-api/rebate-endpoints) |
| Integrate API access on behalf of authorized users | [Broker OAuth integration guide](/products/broker/oAuth) |
| Load documentation into AI tools | [Agent Native overview](/agent-native/overview) |

## Start here

A recommended onboarding path is:

1. Choose a product and review its introduction and API requirements. Confirm the capabilities and account eligibility your integration needs.
2. Review the [API types](/products/spot/QuickStart/InterfaceType). Public market data endpoints do not require authentication. For private endpoints, follow [Integration Preparation](/products/spot/QuickStart/IntegrationPreparation) to create an API Key and configure permissions.
3. Confirm the product domain, then review [Signing](/products/spot/QuickStart/Signature) and [Request Interaction](/products/spot/QuickStart/RequestInteraction) to implement request construction and timestamp validation.
4. Validate public endpoints first, then private endpoints, error handling, and rate limits using an account and environment suitable for your integration. Trading requests affect the account, so keep validation within a controlled scope.
5. For live updates, review the product's WebSocket connection, subscription, and heartbeat requirements. Before deployment, check permissions, retry behavior, and changelogs.

Key permissions and onboarding requirements vary by product. For example, Copy Trading distinguishes ordinary API Keys from lead trader API Keys, while Broker OAuth requires platform registration. Follow the relevant product guide.

## What you can build with WEEX APIs

Using the interfaces available for each product, you can:

- Access real-time and historical market data for charts, strategy research, and analytics.
- Place and cancel orders, and query orders and trade records programmatically.
- Query balances, account bills, and Futures positions for monitoring and reporting.
- Subscribe to WebSocket market data and private account events to reduce polling and process updates promptly.
- Query lead trader and follower data, and manage copy settings and positions.
- Build rebate reporting, user management, and performance dashboards for Brokers and Partners.
- Obtain user credentials for subsequent API calls through the OAuth user authorization flow.

The available operations, permissions, and parameters are defined in the relevant endpoint documentation.

## API types

- **REST API**: HTTP request/response interfaces for market data, orders, account operations, and Broker, Partner, and Copy Trading workflows.
- **WebSocket Streams**: Persistent connections that push market data and private account events. Spot and Futures provide public and private channels, each with connection and subscription requirements.

Start with the [Spot WebSocket introduction](/products/spot/streams/websocket-intro) or [Futures WebSocket introduction](/products/futures/streams/websocket-intro), then review the [Spot streams](/catalog/core-trading-spot/api/ws-streams/public) or [Futures streams](/catalog/core-trading-futures/api/ws-streams/public).

## Authentication and security

Public market data and configuration endpoints do not require authentication. Private trading and account endpoints require an API Key and request signing according to the product's requirements.

Spot and Futures signing guides describe HMAC-SHA256, Base64 encoding, and the construction of the signing payload from the timestamp, request path, query parameters, and body. Ensure the signed content matches the actual request, and keep local time synchronized with server time.

- Protect your API Key, Secret Key, and Passphrase. Avoid exposing credentials in frontend code, logs, or public repositories.
- Grant only the read and trading permissions your integration needs, and configure IP binding as described in the onboarding guide.
- Broker OAuth has separate client signing requirements. Review both the [OAuth integration guide](/products/broker/oAuth) and [Signing rules](/products/broker/sign).

## Rate limits and reliability

Request weights, rate limits, and WebSocket connection limits vary by product and endpoint. Review the relevant limits before integration, such as [Spot Access Restrictions](/products/spot/QuickStart/AccessRestrictions).

Production systems should account for:

- Scheduling requests by endpoint weight and monitoring rate limit information in responses.
- Pausing requests and applying backoff when throttled, rather than retrying continuously.
- Checking order state before retrying trading requests to avoid duplicate operations.
- Handling subscriptions, heartbeats, reconnections, and data recovery according to the WebSocket documentation.
- Recording API errors and monitoring connection health to diagnose request and service issues.

## Domains and environments

For REST domains, see [Spot API Domain](/products/spot/QuickStart/APIDomain) and [Futures API Domain](/products/futures/QuickStart/APIDomain). WebSocket addresses are listed in each product's connection guide.

REST and WebSocket domains are configured separately for each product. Confirm the target address and its environment before connecting; the REST and WebSocket addresses listed in this documentation are production endpoints. Use the addresses documented for your product, and recheck credentials, permissions, and account requirements when changing environments.

## Agent Native

WEEX provides static documentation files for AI coding assistants, LLM tools, and agents to discover and load API documentation:

- **llms.txt**: A lightweight index of document titles, descriptions, and links. <a href="/llms.txt" target="_blank" rel="noopener noreferrer">Open the English documentation index</a>.
- **llms-full.txt**: Complete documentation collected into a single file for context loading. <a href="/llms-full.txt" target="_blank" rel="noopener noreferrer">Open the complete English documentation</a>.

See the [Agent Native overview](/agent-native/overview) for usage and examples.

## Examples and documented interfaces

[Request Interaction](/products/spot/QuickStart/RequestInteraction) provides signing and request construction examples. Individual API reference entries include parameters, response schemas, and request examples. Check your implementation against the relevant endpoint details.

Use the interfaces, channels, and parameters documented in this portal. Undocumented behavior may change and should not be a dependency of production integrations.

## Product-specific updates

API changes, new features, and compatibility updates are recorded in product changelogs:

- [Spot changelog](/products/spot/changelog)
- [Futures changelog](/products/futures/changelog)
- [Copy Trading changelog](/products/copy/changelog)
- [Broker changelog](/products/broker/changelog)
- [Partner changelog](/products/partner/changelog)

Before deploying or upgrading an integration, review the latest documentation for the products you use and follow [update announcements](/products/spot/introduction/UpdateFollow).

## Getting help

For integration issues, first check endpoint parameters, permissions, signing, and rate limits, then review the product examples and changelog.

- Join the official [English Telegram group](https://t.me/+Y72JdNeHcUw3NWQ1) for integration or domain access questions.
- Visit the [WEEX Help Center](https://weexsupport.zendesk.com/hc/en-us) for announcements and help articles.
- Follow [WEEX Official on X](https://x.com/WEEX_Official) for official updates.

This documentation evolves with WEEX products and APIs. Recheck the relevant product requirements before changing production integrations.
