> For the complete documentation index, see [llms.txt](https://www.pionex.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pionex.com/docs/api-docs/trade-api/general-info/basic-info.md).

# Basic Info

**Base URL:** `https://api.pionex.com`

**Request Format:**

* For private requests, the `timestamp` parameter (in milliseconds) must be included in the query string. The timestamp is valid within a range of ±20 seconds.
* Private requests require `PIONEX-KEY` (API Key) and `PIONEX-SIGNATURE` headers.
* GET requests: additional parameters are passed in the query string.
* POST/DELETE requests: parameters are passed in the request body as JSON (`application/json`).
* Zero-valued number parameters are disregarded.

**Signature Construction:**

* GET: `METHOD + PATH_URL + QUERY + TIMESTAMP`
* POST/DELETE: `METHOD + PATH_URL + QUERY + TIMESTAMP + body`

**Response Format:**

All responses are JSON objects containing:

* `result` (boolean): success indicator
* `timestamp` (number): response timestamp in milliseconds
* On success: `data` object with business information
* On failure: `code` (string) and `message` (string) with error details

Success example:

```json
{"result": true, "data": {"orderId": 123456789}, "timestamp": 1566691672311}
```

Failure example:

```json
{"result": false, "code": "TRADE_INVAILD_SYMBOL", "message": "Invalid symbol", "timestamp": 1566691672311}
```

**Error Codes:**

| Code                 | Description                |
| -------------------- | -------------------------- |
| APIKEY\_LOST         | API Key is missing         |
| SIGNATURE\_LOST      | Signature is missing       |
| IP\_NOT\_WHITELISTED | IP is not in the whitelist |
| INVALID\_APIKEY      | Invalid API Key            |
| INVALID\_SIGNATURE   | Invalid signature          |
| APIKEY\_EXPIRED      | API Key has expired        |
| INVALID\_TIMESTAMP   | Invalid timestamp          |
| PERMISSION\_DENIED   | Permission denied          |
