> 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/bot-api/general-info/authentication.md).

# Authentication

[API Key Guide](https://www.pionex.com/docs/api-docs/references/api-key-guide)

Private endpoints require HMAC SHA256 signature authentication.

**Required headers:**

* `PIONEX-KEY`: Your API Key
* `PIONEX-SIGNATURE`: HMAC SHA256 hex signature

**Required query parameter:**

* `timestamp`: Current time in milliseconds (valid within +/-20 seconds)

#### API Key Permissions

Each API Key can be configured with **Bot reading**, **Bot trading**, and/or **Enable trading** permissions. Make sure your API Key has the appropriate permission enabled before calling the following endpoints.

**Endpoints requiring `Bot reading` permission:**

* `GET /api/v1/bot/orders` — Get bot order list
* `GET /api/v1/bot/orders/futuresGrid/order` — Get futures grid order
* `GET /api/v1/bot/orders/spotGrid/order` — Get spot grid order
* `GET /api/v1/bot/orders/spotGrid/aiStrategy` — Get spot grid AI strategy
* `POST /api/v1/bot/orders/futuresGrid/checkParams` — Check futures grid parameters
* `POST /api/v1/bot/orders/futuresGrid/adjustParamsCheck` — Check futures grid adjust parameters (dry-run)
* `POST /api/v1/bot/orders/futuresGrid/reduceCheck` — Check futures grid reduce (dry-run)
* `POST /api/v1/bot/orders/spotGrid/checkParams` — Check spot grid parameters
* `POST /api/v1/bot/orders/smartCopy/checkParams` — Check smart copy parameters
* `GET /api/v1/bot/orders/smartCopy/order` — Get smart copy order
* `GET /api/v1/bot/signal/userSignal` — List user custom signals
* `GET /api/v1/bot/signal/userSignal/detail` — Get user custom signal detail

**Endpoints requiring `Enable trading` permission:**

* `POST /api/v1/bot/signal/listener` — Push custom trading signal

**Endpoints requiring `Bot trading` permission:**

* `POST /api/v1/bot/signal/userSignal` — Create user custom signal
* `POST /api/v1/bot/signal/userSignal/edit` — Edit user custom signal
* `DELETE /api/v1/bot/signal/userSignal/delete` — Delete user custom signal
* `POST /api/v1/bot/orders/futuresGrid/create` — Create futures grid order
* `POST /api/v1/bot/orders/futuresGrid/adjustParams` — Adjust futures grid (add investment / modify range)
* `POST /api/v1/bot/orders/futuresGrid/reduce` — Reduce futures grid position
* `POST /api/v1/bot/orders/futuresGrid/cancel` — Cancel futures grid order
* `POST /api/v1/bot/orders/futuresGrid/pauseCheck` — Check futures grid pause (dry-run)
* `POST /api/v1/bot/orders/futuresGrid/pause` — Pause futures grid order
* `POST /api/v1/bot/orders/futuresGrid/resumeCheck` — Check futures grid resume (dry-run)
* `POST /api/v1/bot/orders/futuresGrid/resume` — Resume futures grid order
* `POST /api/v1/bot/orders/futuresGrid/addMarginCheck` — Check futures grid add margin (dry-run)
* `POST /api/v1/bot/orders/futuresGrid/addMargin` — Add margin to futures grid order
* `POST /api/v1/bot/orders/futuresGrid/reduceMarginCheck` — Check futures grid reduce margin (dry-run)
* `POST /api/v1/bot/orders/futuresGrid/reduceMargin` — Reduce margin of futures grid order
* `POST /api/v1/bot/orders/futuresGrid/updateTriggerProfitLoss` — Set / update / clear take-profit & stop-loss of a running futures grid order
* `POST /api/v1/bot/orders/spotGrid/create` — Create spot grid order
* `POST /api/v1/bot/orders/spotGrid/adjustParams` — Adjust spot grid parameters
* `POST /api/v1/bot/orders/spotGrid/investIn` — Add investment to spot grid
* `POST /api/v1/bot/orders/spotGrid/cancel` — Cancel spot grid order
* `POST /api/v1/bot/orders/spotGrid/profit` — Extract profit from spot grid
* `POST /api/v1/bot/orders/smartCopy/create` — Create smart copy order
* `POST /api/v1/bot/orders/smartCopy/cancel` — Cancel smart copy order
