# Simulator

## Publish a mock MT564 message

> Publishes a mock MT564 message with configurable fields. All fields used by the MT564 parser can be set.\
> The message will be constructed and published as if it came from the real EFIS API. Available only on TEST environment.<br>

```json
{"openapi":"3.0.1","info":{"title":"CorporateActions","version":"1.0"},"tags":[{"name":"Corporate Action Mock Messages","description":"Mock SWIFT message endpoints for testing"}],"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":{"PublishMT564Request":{"type":"object","required":["messageReference","corporateActionMessageReference","senderBIC","receiverBIC","messageDirection","actionType","isin","exDate","paymentDate"],"properties":{"messageReference":{"type":"string","description":"Message reference."},"corporateActionMessageReference":{"type":"string","description":"Reference to the corporate action."},"senderBIC":{"type":"string","minLength":8,"maxLength":11,"pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$","description":"Sender's BIC (BIC8 + branch code)."},"receiverBIC":{"type":"string","minLength":8,"maxLength":11,"pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$","description":"Receiver's BIC (BIC8 + branch code)."},"messageDirection":{"$ref":"#/components/schemas/MessageDirection"},"actionType":{"$ref":"#/components/schemas/CorporateActionEventTypeEnum"},"isin":{"type":"string","pattern":"^[A-Z]{2}[A-Z0-9]{9}\\d$","description":"ISIN code. Required."},"exDate":{"type":"string","format":"date","description":"Ex-date. Required."},"paymentDate":{"type":"string","format":"date","description":"Payment date. Required."},"recordDate":{"type":"string","format":"date","description":"Record date. Optional."},"automaticApprove":{"type":"boolean","description":"Determines if Corporate action should be approved automatically."},"grossAmount":{"type":"number","format":"decimal","description":"Gross amount. Optional."},"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From. Optional."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To. Optional."},"responseDeadline":{"type":"string","format":"date","description":"Response deadline. Optional"},"additionalText":{"type":"string","description":"Narrative. Optional."},"tenderOptions":{"$ref":"#/components/schemas/CorporateActionTenderOptions"},"postedCash":{"type":"number","format":"decimal","description":"Posted cash e.g cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"number","description":"Posted shares."}}},"MessageDirection":{"type":"string","enum":["I","O"],"description":"Message direction: 'I' = input to SWIFT, 'O' = output from SWIFT."},"CorporateActionEventTypeEnum":{"title":"CorporateActionEventTypeEnum","type":"string","description":"Corporate action event type","enum":["DVCA","INTR","REDM","BONU","SPLF","TEND","CHDV","EXRI","MEET","DVOP","LIQU","DVSE"]},"CorporateActionTenderOptions":{"type":"array","items":{"$ref":"#/components/schemas/CorporateActionTenderOption"}},"CorporateActionTenderOption":{"type":"object","required":["tenderOption"],"properties":{"tenderOption":{"$ref":"#/components/schemas/CorporateActionOptionEnum"},"isDefaultAction":{"type":"boolean","description":"Is Default Action"},"offeredPricePerShare":{"type":"number","format":"decimal","description":"Offered Price Per Share"},"maximumCashAmount":{"type":"number","format":"decimal","description":"Maximum cash amount for CASH options (tag :90a::MACI//)"},"maximumQuantitySharesAccepted":{"type":"number","format":"decimal","description":"Maximum Quantity of Shares Accepted"},"creditedIsin":{"type":"string","description":"ISIN of credited securities for STOCK options (tag :35B:ISIN in Seq E)"},"exchangeRatio":{"type":"number","format":"decimal","description":"Exchange ratio for STOCK options (tag :92D::ADEX//)"}}},"CorporateActionOptionEnum":{"title":"CorporateActionOptionEnum","type":"string","description":"Tender Option","enum":["NONE","CASH","STOCK"]},"PublishMessageResponse":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"uetr":{"type":"string","format":"uuid","description":"The UETR of the published message"}},"required":["message","uetr"]},"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},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/corporate-actions/swift-mock/publishMT564":{"post":{"summary":"Publish a mock MT564 message","operationId":"publishMT564","description":"Publishes a mock MT564 message with configurable fields. All fields used by the MT564 parser can be set.\nThe message will be constructed and published as if it came from the real EFIS API. Available only on TEST environment.\n","tags":["Corporate Action Mock Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishMT564Request"}}}},"responses":{"200":{"description":"MT564 message published successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishMessageResponse"}}}},"400":{"description":"Bad request (e.g., missing required fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Server error while processing the message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```

## Publish a mock MT566 message

> Publishes a mock MT566 message with configurable fields. All fields used by the MT566 parser can be set.\
> The message will be constructed and published as if it came from the real EFIS API. Available only on TEST environment.<br>

```json
{"openapi":"3.0.1","info":{"title":"CorporateActions","version":"1.0"},"tags":[{"name":"Corporate Action Mock Messages","description":"Mock SWIFT message endpoints for testing"}],"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":{"PublishMT566Request":{"type":"object","required":["messageReference","corporateActionMessageReference","senderBIC","receiverBIC","messageDirection","actionType","isin","exDate","paymentDate"],"properties":{"messageReference":{"type":"string","description":"Message reference."},"corporateActionMessageReference":{"type":"string","description":"Reference to the corporate action."},"senderBIC":{"type":"string","minLength":8,"maxLength":11,"pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$","description":"Sender's BIC (BIC8 + branch code)."},"receiverBIC":{"type":"string","minLength":8,"maxLength":11,"pattern":"^[A-Z0-9]{8}([A-Z0-9]{3})?$","description":"Receiver's BIC (BIC8 + branch code)."},"messageDirection":{"$ref":"#/components/schemas/MessageDirection"},"actionType":{"$ref":"#/components/schemas/CorporateActionEventTypeEnum"},"isin":{"type":"string","pattern":"^[A-Z]{2}[A-Z0-9]{9}\\d$","description":"ISIN code. Required."},"exDate":{"type":"string","format":"date","description":"Ex-date. Required."},"paymentDate":{"type":"string","format":"date","description":"Payment date. Required."},"recordDate":{"type":"string","format":"date","description":"Record date. Optional."},"grossAmount":{"type":"number","format":"decimal","description":"Gross amount. Optional."},"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From. Optional."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To. Optional."},"quantitySuccessfullyTendered":{"type":"number","format":"decimal","description":"Quantity of Shares Successfully Tendered. Optional."},"tenderedCashAmount":{"type":"number","format":"decimal","description":"Tendered Cash Amount. Optional"},"postedCash":{"type":"number","format":"decimal","description":"Posted cash e.g cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"number","description":"Posted shares."},"additionalText":{"type":"string","description":"Narrative. Optional."}}},"MessageDirection":{"type":"string","enum":["I","O"],"description":"Message direction: 'I' = input to SWIFT, 'O' = output from SWIFT."},"CorporateActionEventTypeEnum":{"title":"CorporateActionEventTypeEnum","type":"string","description":"Corporate action event type","enum":["DVCA","INTR","REDM","BONU","SPLF","TEND","CHDV","EXRI","MEET","DVOP","LIQU","DVSE"]},"PublishMessageResponse":{"type":"object","properties":{"message":{"type":"string","description":"Success message"},"uetr":{"type":"string","format":"uuid","description":"The UETR of the published message"}},"required":["message","uetr"]},"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},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/corporate-actions/swift-mock/publishMT566":{"post":{"summary":"Publish a mock MT566 message","operationId":"publishMT566","description":"Publishes a mock MT566 message with configurable fields. All fields used by the MT566 parser can be set.\nThe message will be constructed and published as if it came from the real EFIS API. Available only on TEST environment.\n","tags":["Corporate Action Mock Messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishMT566Request"}}}},"responses":{"200":{"description":"MT566 message published successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishMessageResponse"}}}},"400":{"description":"Bad request (e.g., missing required fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"500":{"description":"Server error while processing the message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```


---

# 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.tradevest.ai/api-reference/asset-management/corporate-actions/simulator.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.
