> For the complete documentation index, see [llms.txt](https://earnbit.gitbook.io/earnbit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://earnbit.gitbook.io/earnbit/developers/exchange-api-documentation.md).

# Exchange API Documentation

## HTTP API

### Public endpoints

Public endpoints are ideal for retrieving general data and are accessible without the need for an API key. These endpoints use the `GET` method for requests. Each public endpoint can also be used as a `POST` request with [authentication](/earnbit/developers/exchange-api-documentation/private-endpoints-or-http/authentication-and-api-keys.md) (similar to [private endpoints](/earnbit/developers/exchange-api-documentation/private-endpoints-or-http.md)) to allow you to access more data.

{% content-ref url="/pages/sYbe5XonYezaLdwH7WHY" %}
[Public endpoints | HTTP](/earnbit/developers/exchange-api-documentation/public-endpoints-or-http.md)
{% endcontent-ref %}

### Private endpoints

Private endpoints offer full access to data and features. To use these endpoints, an[ API key](/earnbit/developers/exchange-api-documentation/private-endpoints-or-http/authentication-and-api-keys.md) is required, which you can generate directly from your EarnBIT Exchange profile.

{% content-ref url="/pages/0ZvFoPS8qDPFyQHIIPtt" %}
[Private endpoints | HTTP](/earnbit/developers/exchange-api-documentation/private-endpoints-or-http.md)
{% endcontent-ref %}

## WEBSOKET API

### Basic structure

This section describes the basic structure of WS requests and responses.

{% content-ref url="/pages/iyWTXKP8B5TiskeJ10x9" %}
[Basic structure | WEBSOKET](/earnbit/developers/exchange-api-documentation/basic-structure-or-websoket.md)
{% endcontent-ref %}

### Public methods

Methods to access public data like market history, order book, etc. After establishing the WebSocket connection, the user does not need to be authorized to use these methods.

{% content-ref url="/pages/IRKqu94NGix4A2A9nVUA" %}
[Public methods | WEBSOKET](/earnbit/developers/exchange-api-documentation/public-methods-or-websoket.md)
{% endcontent-ref %}

### Private methods

Methods to access private data related to balances, orders, etc. After establishing the WebSocket connection, the user has to be [authorized](/earnbit/developers/exchange-api-documentation/private-methods-or-websoket/authorization.md) to use these methods.

{% content-ref url="/pages/S9XMwKHKlYGAYpE69M4o" %}
[Private methods | WEBSOKET](/earnbit/developers/exchange-api-documentation/private-methods-or-websoket.md)
{% endcontent-ref %}
