# 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>

## 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:

```json
{
  "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:

```json
{
  "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         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.1dex.com/developer/restful-api-reference/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
