API Docs V2
Welcome to the EdgeX API V2 documentation. This section provides comprehensive documentation for all V2 REST API endpoints and WebSocket connections.
Overview
EdgeX API V2 offers a complete set of endpoints for interacting with the EdgeX perpetual trading platform, including:
Note: This GitBook documents the V2 platform API surface. SDK coverage may differ from the full platform endpoint set.
Public APIs: Market data, metadata, and funding rates (no authentication required)
Private APIs: Account management, order operations, asset management, and transfers (authentication required)
WebSocket APIs: Real-time market data and account updates
What's New in V2
Enhanced parameter validation and error handling
New leverage management endpoints
Client order ID cancellation support
POST method for complex order history queries
Improved WebSocket message documentation
Better support for position-based order queries
API Categories
Access public market data without authentication:
Metadata API - Server time, coin list, contract list, global configuration
Quote API - Market depth, K-line data, 24h ticker, market status
Funding Rate API - Current and historical funding rates
Manage accounts and execute trades (authentication required):
Account API - Account assets, positions, collateral, leverage settings
Order API - Create, cancel, and query orders
Asset API - Deposits, withdrawals, cross-chain transfers
Transfer API - Inter-account fund transfers
Real-time data streaming:
Public WebSocket - Market data subscriptions (ticker, depth, trades, K-line)
Private WebSocket - Account updates, order updates, position changes
Authentication
Private API endpoints and private WebSocket connections require authentication. EdgeX uses a signature-based authentication mechanism.
Authentication Guide - HTTP header authentication for REST APIs
L2 Signature Guide - EIP-712 Layer 2 signature requirements for trading operations
SDKs
Use the official SDKs for V2 API integration:
EdgeX Golang SDK - Go client for V2 REST, signing, and WebSocket flows
EdgeX Python SDK - Python client for V2 REST, signing, asset, and bridge flows
Access Domains
Use the following production access domains when integrating with EdgeX:
HTTP REST production domain:
https://edgex-prod-v2.edgex.exchangeAsset API production domain:
https://spot.edgex.exchangeWebSocket production domain:
wss://edgex-quote-prod-v2.edgex.exchange
All examples in this documentation use placeholders to keep endpoint examples consistent:
Replace
<api-domain>withedgex-prod-v2.edgex.exchangefor all REST APIs except Asset APIReplace Asset API requests with
spot.edgex.exchangeReplace
<ws-domain>withedgex-quote-prod-v2.edgex.exchangeInternal, non-production, and test-only domains are not part of the public documentation
API Conventions
Request Format
HTTP REST base URL:
https://<api-domain>for all REST APIs except Asset APIAsset API base URL:
https://spot.edgex.exchangeWebSocket base URL:
wss://<ws-domain>Content-Type:
application/jsonCharacter Encoding: UTF-8
Response Format
All API responses follow this structure:
Response Fields:
code: Result code (SUCCESSor error code)data: Response payload (structure varies by endpoint)msg: Error message (null on success)errorParam: Error parameter details (null on success)requestTime: Request timestamp (milliseconds)responseTime: Response timestamp (milliseconds)traceId: Request trace ID for debugging
Common HTTP Status Codes
200 OK: Request successful400 Bad Request: Invalid request parameters401 Unauthorized: Authentication failed403 Forbidden: Access denied429 Too Many Requests: Rate limit exceeded500 Internal Server Error: Server error
Pagination
Paginated endpoints return data in this format:
dataList: Array of result itemsnextPageOffsetData: Offset token for next page (empty string indicates last page)
Timestamps
All timestamps are in milliseconds (Unix epoch time)
Server time can be obtained via
/api/v2/public/meta/getServerTime
Number Precision
All numeric values are returned as strings to preserve precision
Always use string comparison for numeric fields in critical operations
Rate Limits
To ensure service stability, API requests are subject to rate limiting:
Public API: Higher rate limits
Private API: Rate limits based on API key tier
WebSocket: Connection and subscription limits apply
Exceeding rate limits will result in HTTP 429 responses.
Error Handling
Error Response Structure
Common Error Codes
INVALID_PARAMETER: Invalid request parameterACCOUNT_NOT_FOUND: Account does not existINSUFFICIENT_BALANCE: Insufficient account balanceORDER_NOT_FOUND: Order does not existSIGNATURE_ERROR: Signature verification failedRATE_LIMIT_EXCEEDED: Rate limit exceeded
Support
For API support and questions:
Check the specific endpoint documentation for detailed parameter descriptions
Review error messages and
errorParamfor troubleshootingUse
traceIdwhen reporting issues
Version History
V2 (Current): Enhanced features, improved validation, new endpoints
V1 (Legacy): Previous API version (see V1 Documentation)
Last Updated: 2026-06-11 API Version: V2
Last updated