# API Documentation

The API provides functionality such as getting wallet balances, managing buy/sell orders, requesting withdrawals as well as market data such as recent trades, order book and ticker.

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

## Generate your API Key

> **To get your API key, You need 2FA enabled in your account.**

1. Visit the security tab and then click on `API Key`
2. Then click on `Generate Api Key`
3. Name your API key and click `Generate`
4. Enter your 2FA OTP
5. Then copy your `API Key` and `API Secret`<mark style="color:red;">(You can only view it once)</mark>

{% hint style="warning" %}
**Do not share your API key with others!**
{% endhint %}

![](/files/qiIm9JoSLlD5LEAW5I31)


---

# 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.bytex.ca/api-documentation.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.
