> 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/specs.md).

# 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.3.6"},"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.3.6"},"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"}}}}
```
