> 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/developers/devnet/api-reference/rest-api-reference/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":"3.5.2"},"tags":[{"name":"Specs","description":"OpenAPI and AsyncAPI specs"}],"servers":[{"url":"/v2"}],"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","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"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":"3.5.2"},"tags":[{"name":"Specs","description":"OpenAPI and AsyncAPI specs"}],"servers":[{"url":"/v2"}],"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","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}}}}
```

## Get order-entry AsyncAPI specification

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

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"3.5.2"},"tags":[{"name":"Specs","description":"OpenAPI and AsyncAPI specs"}],"servers":[{"url":"/v2"}],"paths":{"/asyncapi-exec-spec.yaml":{"get":{"summary":"Get order-entry AsyncAPI specification","description":"Returns the complete AsyncAPI specification for the order-entry WebSocket API in YAML format","operationId":"getAsyncExecApiSpec","tags":["Specs"],"responses":{"200":{"description":"Order-entry 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","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}}}}
```
