# Specs

OpenAPI and AsyncAPI specs

## Get OpenAPI specification

> Returns the complete OpenAPI specification for this API in YAML format

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Specs","description":"OpenAPI and AsyncAPI specs"}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/openapi-spec.yaml":{"get":{"summary":"Get OpenAPI specification","description":"Returns the complete OpenAPI specification for this API in YAML format","operationId":"getOpenApiSpec","tags":["Specs"],"responses":{"200":{"description":"OpenAPI specification in YAML format","content":{"application/yaml":{"schema":{"type":"string","format":"binary"}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"responses":{"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}},"schemas":{"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}}}}
```

## Get AsyncAPI specification

> Returns the complete AsyncAPI specification for WebSocket API in YAML format

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Specs","description":"OpenAPI and AsyncAPI specs"}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/asyncapi-spec.yaml":{"get":{"summary":"Get AsyncAPI specification","description":"Returns the complete AsyncAPI specification for WebSocket API in YAML format","operationId":"getAsyncApiSpec","tags":["Specs"],"responses":{"200":{"description":"AsyncAPI specification in YAML format","content":{"application/yaml":{"schema":{"type":"string","format":"binary"}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"responses":{"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}},"schemas":{"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}}}}
```


---

# 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.reya.xyz/developers/readme/specs.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.
