# Trading

## Get Order

> Get single order

```json
{"openapi":"3.0.1","info":{"title":"Trading","version":"1.0"},"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","refreshUrl":"","scopes":{}}}}},"schemas":{"Order":{"type":"object","properties":{"orderId":{"type":"string","format":"uuid"},"exAnteId":{"type":"string","format":"uuid"},"createdOn":{"type":"string","format":"date-time","description":"The date on which the order was created"},"modifiedOn":{"type":"string","format":"date-time","description":"The date on which the order was modified the last time"},"status":{"$ref":"#/components/schemas/TraditionalAssetOrderStatusEnum"},"message":{"type":"string"},"execution":{"$ref":"#/components/schemas/OrderExecution"},"partialExecutions":{"type":"array","description":"List of partial executions","items":{"$ref":"#/components/schemas/PartialExecution"}},"depositoryCustomerProductId":{"type":"string","format":"uuid","description":"The identifier of the depository customer product instance"},"cashCustomerProductId":{"type":"string","format":"uuid","description":"Cash customer product used for the order."},"tradeSide":{"$ref":"#/components/schemas/TradeSideEnum"},"isin":{"type":"string","description":"ISIN of the asset","minLength":12,"maxLength":12,"pattern":"^[A-Z]{2}[A-Z0-9]{10}$"},"quantity":{"type":"number","multipleOf":1,"description":"Number of shares"},"orderType":{"$ref":"#/components/schemas/TraditionalAssetOrderTypeEnum"},"quantityType":{"$ref":"#/components/schemas/TraditionalAssetOrderQuantityTypeEnum"},"limitPrice":{"type":"number","multipleOf":0.001,"description":"The limit price for orders of the type 'limit'."},"stopPrice":{"type":"number","multipleOf":0.001,"description":"The stop price for orders of the type 'stop'."},"expiryDate":{"type":"string","format":"date","description":"'The order expiration date (last day the order can trade) in the YYYY-MM-DD format. \nDefault value is T+1 year'"},"externalId":{"type":"string","description":"Order id in partner's system. This value has to be unique."},"asset_experience_fit":{"type":"boolean","description":"Only applicable if the user has failed the asset fit check for the asset type being ordered. \nTrue if the user has acknowledged their willingness to trade.\n"},"exchangeCode":{"$ref":"#/components/schemas/TraditionalAssetExchangeCodeEnum"}},"required":["cashCustomerProductId","createdOn","depositoryCustomerProductId","exAnteId","exchangeCode","externalId","isin","modifiedOn","orderId","orderType","quantity","quantityType","status","tradeSide"],"title":"Order"},"TraditionalAssetOrderStatusEnum":{"title":"TraditionalAssetOrderStatusEnum","type":"string","enum":["RECEIVED","INVALID","PLACED","UPDATED","REJECTED","FILLED","PARTIALLY_FILLED","CANCELED","RECONCILIATION_CORRECTION","EXPIRED","PENDING","CANCELLATION_REJECTED"]},"OrderExecution":{"title":"OrderExecution","type":"object","properties":{"executionPrice":{"type":"number","description":"The average price per unit of the total execution"},"executionQuantity":{"type":"number"},"remainingQuantity":{"type":"number"},"valueDate":{"type":"string","format":"date"},"bookingDate":{"type":"string","format":"date"},"transactionTime":{"type":"string","format":"date-time"},"amount":{"type":"number","multipleOf":0.01,"description":"Total sum of all executions excluding fees."},"feeAmount":{"type":"number","multipleOf":0.01},"feeDescription":{"type":"string"},"amountCurrency":{"$ref":"#/components/schemas/CurrencyEnum"}},"required":["executionPrice","executionQuantity","transactionTime","amount","amountCurrency"]},"CurrencyEnum":{"title":"CurrencyEnum","type":"string","description":"Currency of the product's balance. Currency code in ISO 4217","enum":["EUR"]},"PartialExecution":{"title":"PartialExecution","type":"object","properties":{"executionId":{"type":"string","format":"uuid"},"executionPrice":{"type":"number"},"executionQuantity":{"type":"number"},"amount":{"type":"number","multipleOf":0.01},"executionTime":{"type":"string","format":"date-time"},"valueDate":{"type":"string","format":"date"},"bookingDate":{"type":"string","format":"date"},"status":{"$ref":"#/components/schemas/TraditionalAssetOrderStatusEnum"}},"required":["executionId","executionPrice","executionQuantity","executionTime","amount","valueDate","bookingDate","status"]},"TradeSideEnum":{"title":"TradeSideEnum","type":"string","enum":["BUY","SELL"]},"TraditionalAssetOrderTypeEnum":{"title":"TraditionalAssetOrderTypeEnum","type":"string","enum":["LIMIT","MARKET","STOP"]},"TraditionalAssetOrderQuantityTypeEnum":{"title":"TraditionalAssetOrderQuantityTypeEnum","type":"string","enum":["UNIT"]},"TraditionalAssetExchangeCodeEnum":{"title":"TraditionalAssetExchangeCodeEnum","type":"string","enum":["TGAT"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":255},"message":{"type":"string","maxLength":255}},"required":["field","code","message"]}}},"paths":{"/trading/order/{orderId}":{"get":{"summary":"Get Order","operationId":"get-order","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Get single order"}}}}
```

## Cancel order

> Cancel a single trading order. Please note that Market orders have a low probability of being canceled.

```json
{"openapi":"3.0.1","info":{"title":"Trading","version":"1.0"},"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","refreshUrl":"","scopes":{}}}}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":255},"message":{"type":"string","maxLength":255}},"required":["field","code","message"]}}},"paths":{"/trading/order/{orderId}":{"delete":{"summary":"Cancel order","operationId":"cancel-order","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}],"responses":{"202":{"description":"Accepted","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Cancel a single trading order. Please note that Market orders have a low probability of being canceled."}}}}
```

## Update Order

> Update Order

```json
{"openapi":"3.0.1","info":{"title":"Trading","version":"1.0"},"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","refreshUrl":"","scopes":{}}}}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":255},"message":{"type":"string","maxLength":255}},"required":["field","code","message"]},"OrderUpdate":{"title":"OrderUpdate","type":"object","properties":{"quantityType":{"$ref":"#/components/schemas/TraditionalAssetOrderQuantityTypeEnum"},"quantity":{"type":"number","multipleOf":1,"description":"Number of shares or order amount"},"currency":{"$ref":"#/components/schemas/CurrencyEnum"},"orderType":{"$ref":"#/components/schemas/TraditionalAssetOrderTypeEnum"},"limitPrice":{"type":"number","multipleOf":0.01,"description":"The limit price for orders of the type 'limit'."},"stopPrice":{"type":"number","multipleOf":0.01,"description":"The stop price for orders of the type 'stop'."},"expiryDate":{"type":"string","format":"date","description":"The order expiration date (last day the order can trade) in the YYYY-MM-DD format. Default value is T+1 year."}}},"TraditionalAssetOrderQuantityTypeEnum":{"title":"TraditionalAssetOrderQuantityTypeEnum","type":"string","enum":["UNIT"]},"CurrencyEnum":{"title":"CurrencyEnum","type":"string","description":"Currency of the product's balance. Currency code in ISO 4217","enum":["EUR"]},"TraditionalAssetOrderTypeEnum":{"title":"TraditionalAssetOrderTypeEnum","type":"string","enum":["LIMIT","MARKET","STOP"]}}},"paths":{"/trading/order/{orderId}":{"patch":{"summary":"Update Order","operationId":"update-order","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}],"responses":{"202":{"description":"Accepted","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"description":"Update Order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdate"}}}}}}}}
```

## Create Market Order

> Create a single security market order

```json
{"openapi":"3.0.1","info":{"title":"Trading","version":"1.0"},"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","refreshUrl":"","scopes":{}}}}},"schemas":{"CreateOrderResult":{"title":"CreateOrderResult","type":"object","properties":{"orderId":{"type":"string","format":"uuid"},"createdOn":{"type":"string","format":"date-time"}},"required":["orderId","createdOn"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":255},"message":{"type":"string","maxLength":255}},"required":["field","code","message"]},"MarketOrderData":{"title":"MarketOrderData","type":"object","properties":{"depositoryCustomerProductId":{"type":"string","format":"uuid","description":"The identifier of the depository customer product instance"},"cashCustomerProductId":{"type":"string","format":"uuid","description":"Cash customer product used for the order."},"tradeSide":{"$ref":"#/components/schemas/TradeSideEnum"},"quantityType":{"$ref":"#/components/schemas/TraditionalAssetOrderQuantityTypeEnum"},"exchangeCode":{"$ref":"#/components/schemas/TraditionalAssetExchangeCodeEnum"},"isin":{"type":"string","description":"ISIN of the asset","minLength":12,"maxLength":12,"pattern":"^[A-Z]{2}[A-Z0-9]{10}$"},"quantity":{"type":"number","multipleOf":1,"description":"Number of shares"},"externalId":{"type":"string","description":"Order id in partner's system. This value has to be unique."}},"required":["depositoryCustomerProductId","cashCustomerProductId","tradeSide","quantityType","exchangeCode","isin","quantity","externalId"]},"TradeSideEnum":{"title":"TradeSideEnum","type":"string","enum":["BUY","SELL"]},"TraditionalAssetOrderQuantityTypeEnum":{"title":"TraditionalAssetOrderQuantityTypeEnum","type":"string","enum":["UNIT"]},"TraditionalAssetExchangeCodeEnum":{"title":"TraditionalAssetExchangeCodeEnum","type":"string","enum":["TGAT"]}}},"paths":{"/trading/order/market":{"post":{"summary":"Create Market Order","operationId":"create-market-order","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketOrderData"}}}},"description":"Create a single security market order"}}}}
```

## Create Limit Order

> Create a single security limit order

```json
{"openapi":"3.0.1","info":{"title":"Trading","version":"1.0"},"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","refreshUrl":"","scopes":{}}}}},"schemas":{"CreateOrderResult":{"title":"CreateOrderResult","type":"object","properties":{"orderId":{"type":"string","format":"uuid"},"createdOn":{"type":"string","format":"date-time"}},"required":["orderId","createdOn"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":255},"message":{"type":"string","maxLength":255}},"required":["field","code","message"]},"LimitOrderData":{"title":"LimitOrderData","type":"object","properties":{"depositoryCustomerProductId":{"type":"string","format":"uuid","description":"The identifier of the depository customer product instance"},"cashCustomerProductId":{"type":"string","format":"uuid","description":"Cash customer product used for the order."},"tradeSide":{"$ref":"#/components/schemas/TradeSideEnum"},"quantityType":{"$ref":"#/components/schemas/TraditionalAssetOrderQuantityTypeEnum"},"exchangeCode":{"$ref":"#/components/schemas/TraditionalAssetExchangeCodeEnum"},"isin":{"type":"string","description":"ISIN of the asset","minLength":12,"maxLength":12,"pattern":"^[A-Z]{2}[A-Z0-9]{10}$"},"quantity":{"type":"number","multipleOf":1,"description":"Number of shares"},"limitPrice":{"type":"number","multipleOf":0.001,"description":"The limit price for orders of the type 'limit'."},"expiryDate":{"type":"string","format":"date","description":"'The order expiration date (last day the order can trade) in the YYYY-MM-DD format. \nDefault value is T+1 year'"},"externalId":{"type":"string","description":"Order id in partner's system. This value has to be unique."}},"required":["depositoryCustomerProductId","cashCustomerProductId","tradeSide","quantityType","exchangeCode","isin","quantity","limitPrice","expiryDate","externalId"]},"TradeSideEnum":{"title":"TradeSideEnum","type":"string","enum":["BUY","SELL"]},"TraditionalAssetOrderQuantityTypeEnum":{"title":"TraditionalAssetOrderQuantityTypeEnum","type":"string","enum":["UNIT"]},"TraditionalAssetExchangeCodeEnum":{"title":"TraditionalAssetExchangeCodeEnum","type":"string","enum":["TGAT"]}}},"paths":{"/trading/order/limit":{"post":{"summary":"Create Limit Order","operationId":"create-limit-order","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitOrderData"}}}},"description":"Create a single security limit order"}}}}
```

## Create Stop Order

> Create a single security stop order

```json
{"openapi":"3.0.1","info":{"title":"Trading","version":"1.0"},"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"/oauth2/token","refreshUrl":"","scopes":{}}}}},"schemas":{"CreateOrderResult":{"title":"CreateOrderResult","type":"object","properties":{"orderId":{"type":"string","format":"uuid"},"createdOn":{"type":"string","format":"date-time"}},"required":["orderId","createdOn"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":255},"message":{"type":"string","maxLength":255}},"required":["field","code","message"]},"StopOrderData":{"title":"StopOrderData","type":"object","properties":{"depositoryCustomerProductId":{"type":"string","format":"uuid","description":"The identifier of the depository customer product instance"},"cashCustomerProductId":{"type":"string","format":"uuid","description":"Cash customer product used for the order."},"tradeSide":{"$ref":"#/components/schemas/TradeSideEnum"},"quantityType":{"$ref":"#/components/schemas/TraditionalAssetOrderQuantityTypeEnum"},"exchangeCode":{"$ref":"#/components/schemas/TraditionalAssetExchangeCodeEnum"},"isin":{"type":"string","description":"ISIN of the asset","minLength":12,"maxLength":12,"pattern":"^[A-Z]{2}[A-Z0-9]{10}$"},"quantity":{"type":"number","multipleOf":1,"description":"Number of shares"},"stopPrice":{"type":"number","multipleOf":0.001,"description":"The stop price for orders of the type 'stop'."},"expiryDate":{"type":"string","format":"date","description":"'The order expiration date (last day the order can trade) in the YYYY-MM-DD format. \nDefault value is T+1 year'"},"externalId":{"type":"string","description":"Order id in partner's system. This value has to be unique."}},"required":["depositoryCustomerProductId","cashCustomerProductId","tradeSide","quantityType","exchangeCode","isin","quantity","stopPrice","expiryDate","externalId"]},"TradeSideEnum":{"title":"TradeSideEnum","type":"string","enum":["BUY","SELL"]},"TraditionalAssetOrderQuantityTypeEnum":{"title":"TraditionalAssetOrderQuantityTypeEnum","type":"string","enum":["UNIT"]},"TraditionalAssetExchangeCodeEnum":{"title":"TraditionalAssetExchangeCodeEnum","type":"string","enum":["TGAT"]}}},"paths":{"/trading/order/stop":{"post":{"summary":"Create Stop Order","operationId":"create-stop-order","parameters":[{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopOrderData"}}}},"description":"Create a single security stop order"}}}}
```


---

# 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.wawex.ai/api-reference/asset-management/trading.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.
