> For the complete documentation index, see [llms.txt](https://docs.reya.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2.md).

# Reya DEX REST API v2

**Base URL**: `https://api.reya.xyz/v2`

## Overview

The Reya DEX REST API v2 provides programmatic access to the Reya Perpetual Exchange, enabling traders to interact with the platform algorithmically. This API is designed for developers and professional traders who want to build automated trading systems, integrate with existing platforms, or develop custom interfaces for the Reya DEX ecosystem.

## Key Features

* **Market Data**: Access comprehensive market information, including asset definitions, market summaries, and real-time price data
* **Order Management**: Create, cancel, and monitor orders with support for various order types (limit, trigger)
* **Position Tracking**: Monitor your current positions and historical executions
* **Wallet Integration**: Manage wallet configurations and access wallet-specific data
* **Price Data**: Access historical price data with customizable time intervals through candle endpoints

## API Structure

The API is organized into several logical sections:

* **Reference Data**: Discover markets and assets definitions, trading fees
* **Market Data**: Access real-time and historical market data, including prices, candles and order execution
* **Wallet Data**: Get information about the wallet's accounts, positions and orders
* **Order Entry**: Create and cancel orders

## Signatures

For private endpoints that access user-specific data or perform actions on behalf of a user, authentication is required through wallet signatures. This ensures that only authorized users can create and update orders.

## Rate Limits

To ensure fair usage and optimal performance, the API implements rate limiting. For more information, see the [Rate Limits ](/technical-docs/reya-dex-rest-api-v2/rate-limits.md)documentation.

For real-time data needs, consider using our [WebSocket Market Data API](https://github.com/Reya-Labs/reya-docs/blob/main/developers/websocket-api-reference.md) for streaming updates. To place and cancel orders over a persistent connection, see the [WebSocket Order Entry API](https://github.com/Reya-Labs/reya-docs/blob/main/developers/ws-exec-api-reference.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.reya.xyz/technical-docs/reya-dex-rest-api-v2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
