# Signature Authentication

When calling `TRADE` or `USER_DATA` endpoints, a signature must be included in the request header:

* **Header field:** `X-CH-SIGN`
* **Algorithm:** `HMAC SHA256`
* **Key:** Your API Secret (linked to your API Key)

### **Signature Construction**

The signature is generated using the following concatenated string:

```sql
sqlCopyEdittimestamp + method + requestPath + body
```

* `timestamp`: Same value as the `X-CH-TS` header
* `method`: HTTP method in **uppercase** (`GET`, `POST`, etc.)
* `requestPath`: API endpoint path (e.g., `/sapi/v1/order`)
* `body`: Raw string of the request body (for **POST** requests only; leave empty for GET)

The resulting string is hashed using HMAC SHA256 with your **API Secret** as the key.

> ⚠️ The signature value is **not case sensitive**.


---

# 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.coinlocally.com/introduction/signature-authentication.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.
