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

# Orders

## GET /orders

> Retrieve a list of active orders.

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/orders":{"get":{"deprecated":true,"description":"Retrieve a list of active orders.","operationId":"getOrdersLegacy","parameters":[{"name":"accountAddress","required":false,"in":"query","description":"Account address","schema":{"format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}","type":"string"}},{"name":"bondId","required":false,"in":"query","description":"Unique UUID of an entity","schema":{"format":"uuid","type":"string"}},{"name":"pagination","required":false,"in":"query","style":"deepObject","explode":true,"schema":{"$ref":"#/components/schemas/PaginationRequestDto"}}],"responses":{"200":{"description":"Successfully retrieved a list of items.","content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/PaginationResponseDto"},"items":{"type":"array","items":{"$ref":"#/components/schemas/LegacyOrderDto"}}},"required":["pagination","items"]}}}}},"summary":"","tags":["Orders"]}}},"components":{"schemas":{"PaginationRequestDto":{"type":"object","properties":{"size":{"type":"number","minimum":1,"default":10},"page":{"type":"number","minimum":1,"default":1}}},"PaginationResponseDto":{"type":"object","properties":{"size":{"type":"number","minimum":1,"default":10},"page":{"type":"number","minimum":1,"default":1},"totalItems":{"type":"number","description":"Total items count"},"totalPages":{"type":"number","description":"Total pages count"}},"required":["totalItems","totalPages"]},"LegacyOrderDto":{"type":"object","properties":{"created_at":{"format":"date-time","type":"string","description":"Created date"},"updated_at":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"Order UUID identifier, unique in scope of this node","format":"uuid"},"account_address":{"type":"string","description":"Address of the account that places the order","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"buy_token_id":{"type":"string","description":"Unique identifier for the token being bought in the order in scope of this gateway","format":"uuid"},"buy_amount":{"type":"number","description":"Total amount of the token being bought"},"buy_remaining_amount":{"type":"number","description":"Remaining amount of the token being bought"},"sell_token_id":{"type":"string","description":"Unique identifier for the token being sold in the order in scope of this gateway","format":"uuid"},"sell_amount":{"type":"number","description":"Total amount of the token being sold"},"sell_remaining_amount":{"type":"number","description":"Remaining amount of the token being sold"},"type":{"description":"Type of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderType"}]},"status":{"description":"Status of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderStatus"}]},"ratio":{"type":"number","description":"Ratio of the order"},"expires_at":{"format":"date-time","type":"string","description":"Expiration date of the order.","nullable":true}},"required":["created_at","updated_at","id","account_address","buy_token_id","buy_amount","buy_remaining_amount","sell_token_id","sell_amount","sell_remaining_amount","type","status","ratio"]},"LegacyOrderType":{"type":"string","enum":["buy","sell"],"description":"Order Type"},"LegacyOrderStatus":{"type":"string","enum":["active","consumed","cancelled","expired"],"description":"Status of the order"}}}}
```

## POST /orders

> Create a new order. Example: buy/sell a bond with a currency type token.

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/orders":{"post":{"deprecated":true,"description":"Create a new order. Example: buy/sell a bond with a currency type token.","operationId":"createOrderLegacy","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderDto"}}}},"responses":{"201":{"description":"Successfully created an order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyOrderDto"}}}}},"summary":"","tags":["Orders"]}}},"components":{"schemas":{"CreateOrderDto":{"type":"object","properties":{"currencyId":{"type":"string","description":"Unique UUID of the currency in scope of this gateway","format":"uuid"},"price":{"type":"number","description":"Total price of the currency"},"bondId":{"type":"string","description":"Unique UUID of the bond in scope of this gateway","format":"uuid"},"amount":{"type":"number","description":"Total amount of the bond"},"type":{"description":"Order Type","allOf":[{"$ref":"#/components/schemas/LegacyOrderType"}]},"expiration":{"format":"date-time","type":"string","description":"Expiration date"},"accountAddress":{"type":"string","description":"Account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"}},"required":["currencyId","price","bondId","amount","type","accountAddress"]},"LegacyOrderType":{"type":"string","enum":["buy","sell"],"description":"Order Type"},"LegacyOrderDto":{"type":"object","properties":{"created_at":{"format":"date-time","type":"string","description":"Created date"},"updated_at":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"Order UUID identifier, unique in scope of this node","format":"uuid"},"account_address":{"type":"string","description":"Address of the account that places the order","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"buy_token_id":{"type":"string","description":"Unique identifier for the token being bought in the order in scope of this gateway","format":"uuid"},"buy_amount":{"type":"number","description":"Total amount of the token being bought"},"buy_remaining_amount":{"type":"number","description":"Remaining amount of the token being bought"},"sell_token_id":{"type":"string","description":"Unique identifier for the token being sold in the order in scope of this gateway","format":"uuid"},"sell_amount":{"type":"number","description":"Total amount of the token being sold"},"sell_remaining_amount":{"type":"number","description":"Remaining amount of the token being sold"},"type":{"description":"Type of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderType"}]},"status":{"description":"Status of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderStatus"}]},"ratio":{"type":"number","description":"Ratio of the order"},"expires_at":{"format":"date-time","type":"string","description":"Expiration date of the order.","nullable":true}},"required":["created_at","updated_at","id","account_address","buy_token_id","buy_amount","buy_remaining_amount","sell_token_id","sell_amount","sell_remaining_amount","type","status","ratio"]},"LegacyOrderStatus":{"type":"string","enum":["active","consumed","cancelled","expired"],"description":"Status of the order"}}}}
```

## GET /orders/{orderId}

> Retrieve full specific order information.

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/orders/{orderId}":{"get":{"deprecated":true,"description":"Retrieve full specific order information.","operationId":"getOrderLegacy","parameters":[{"name":"orderId","required":true,"in":"path","description":"Order UUID identifier, unique in scope of this node","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Successfully received an order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyOrderDto"}}}}},"summary":"","tags":["Orders"]}}},"components":{"schemas":{"LegacyOrderDto":{"type":"object","properties":{"created_at":{"format":"date-time","type":"string","description":"Created date"},"updated_at":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"Order UUID identifier, unique in scope of this node","format":"uuid"},"account_address":{"type":"string","description":"Address of the account that places the order","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"buy_token_id":{"type":"string","description":"Unique identifier for the token being bought in the order in scope of this gateway","format":"uuid"},"buy_amount":{"type":"number","description":"Total amount of the token being bought"},"buy_remaining_amount":{"type":"number","description":"Remaining amount of the token being bought"},"sell_token_id":{"type":"string","description":"Unique identifier for the token being sold in the order in scope of this gateway","format":"uuid"},"sell_amount":{"type":"number","description":"Total amount of the token being sold"},"sell_remaining_amount":{"type":"number","description":"Remaining amount of the token being sold"},"type":{"description":"Type of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderType"}]},"status":{"description":"Status of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderStatus"}]},"ratio":{"type":"number","description":"Ratio of the order"},"expires_at":{"format":"date-time","type":"string","description":"Expiration date of the order.","nullable":true}},"required":["created_at","updated_at","id","account_address","buy_token_id","buy_amount","buy_remaining_amount","sell_token_id","sell_amount","sell_remaining_amount","type","status","ratio"]},"LegacyOrderType":{"type":"string","enum":["buy","sell"],"description":"Order Type"},"LegacyOrderStatus":{"type":"string","enum":["active","consumed","cancelled","expired"],"description":"Status of the order"}}}}
```

## PUT /orders/{orderId}

> Update an existing order. Example: buy/sell a bond with a currency type token.

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/orders/{orderId}":{"put":{"deprecated":true,"description":"Update an existing order. Example: buy/sell a bond with a currency type token.","operationId":"updateOrderLegacy","parameters":[{"name":"orderId","required":true,"in":"path","description":"Order UUID identifier, unique in scope of this node","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderLegacyDto"}}}},"responses":{"201":{"description":"Successfully updated an order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyOrderDto"}}}}},"summary":"","tags":["Orders"]}}},"components":{"schemas":{"UpdateOrderLegacyDto":{"type":"object","properties":{"currencyId":{"type":"string","description":"Unique UUID of the currency in scope of this gateway","format":"uuid"},"price":{"type":"number","description":"Total price of the currency"},"bondId":{"type":"string","description":"Unique UUID of the bond in scope of this gateway","format":"uuid"},"amount":{"type":"number","description":"Total amount of the bond"},"type":{"description":"Order Type","allOf":[{"$ref":"#/components/schemas/LegacyOrderType"}]},"expiration":{"format":"date-time","type":"string","description":"Expiration date"}},"required":["currencyId","price","bondId","amount","type"]},"LegacyOrderType":{"type":"string","enum":["buy","sell"],"description":"Order Type"},"LegacyOrderDto":{"type":"object","properties":{"created_at":{"format":"date-time","type":"string","description":"Created date"},"updated_at":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"Order UUID identifier, unique in scope of this node","format":"uuid"},"account_address":{"type":"string","description":"Address of the account that places the order","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"buy_token_id":{"type":"string","description":"Unique identifier for the token being bought in the order in scope of this gateway","format":"uuid"},"buy_amount":{"type":"number","description":"Total amount of the token being bought"},"buy_remaining_amount":{"type":"number","description":"Remaining amount of the token being bought"},"sell_token_id":{"type":"string","description":"Unique identifier for the token being sold in the order in scope of this gateway","format":"uuid"},"sell_amount":{"type":"number","description":"Total amount of the token being sold"},"sell_remaining_amount":{"type":"number","description":"Remaining amount of the token being sold"},"type":{"description":"Type of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderType"}]},"status":{"description":"Status of the order","allOf":[{"$ref":"#/components/schemas/LegacyOrderStatus"}]},"ratio":{"type":"number","description":"Ratio of the order"},"expires_at":{"format":"date-time","type":"string","description":"Expiration date of the order.","nullable":true}},"required":["created_at","updated_at","id","account_address","buy_token_id","buy_amount","buy_remaining_amount","sell_token_id","sell_amount","sell_remaining_amount","type","status","ratio"]},"LegacyOrderStatus":{"type":"string","enum":["active","consumed","cancelled","expired"],"description":"Status of the order"}}}}
```

## PATCH /orders/{orderId}

> Cancel the order by id parameter.

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/orders/{orderId}":{"patch":{"deprecated":true,"description":"Cancel the order by id parameter.","operationId":"cancelOrderLegacy","parameters":[{"name":"orderId","required":true,"in":"path","description":"Order UUID identifier, unique in scope of this node","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"The order was cancelled."}},"summary":"","tags":["Orders"]}}}}
```


---

# 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://axiology.gitbook.io/axiology-docs/rest-api/orders.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.
