Overview

1Dex API V1 provides a set of RESTful API interfaces for accessing the core functionalities of the exchange, including market data, user account information, trading operations, and more. These interfaces follow a unified request and response format for easy integration by developers.

Basic Information

  • Base Path: /api/v1

  • Supported Protocols: HTTPS

  • Content Type: application/json

  • Mainnet Host: https://api-v1.1dex.com

  • Testnet Host: https://api-v1-test.1dex.com

Authentication

Some APIs require authentication to access. Authentication uses an API key approach:

Authorization: <API_KEY>

Add the API key to the HTTP request header for authentication.

Response Structure

All API responses use a unified JSON format:

{
  "code": 0,         // Response status code, 0 means success, non-zero means error
  "message": "",     // Error message, empty when successful
  "data": {},        // Response data, structure varies by endpoint
  "meta": {}         // Metadata, such as pagination information
}

Response Status Codes

Status Code
Description

0

Request successful

400

Request parameter error

401

Unauthorized

403

No permission

500

Internal server error

List Query Response

For endpoints that return list data, the meta field will contain total count information:

{
  "code": 0,
  "message": "",
  "data": [{}, {}],
  "meta": {
    "total": 100
  }
}

Error Codes

Error Code
Description

400

Request parameter error

401

Unauthorized or authentication failed

403

No operation permission

404

Resource not found

429

Too many requests

500

Internal server error

Order Status Codes

Status Code
Description

0

Unfilled

1

Partially filled

2

Fully filled

3

Canceled

4

Rejected

Last updated