> For the complete documentation index, see [llms.txt](https://docs.tradevest.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradevest.ai/api-reference/asset-management/corporate-actions/simulator.md).

# 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."},"cashDividendData":{"$ref":"#/components/schemas/CashDividendData"},"stockDividendData":{"$ref":"#/components/schemas/StockDividendData"},"stockSplitData":{"$ref":"#/components/schemas/StockSplitData"},"bonusIssueData":{"$ref":"#/components/schemas/BonusIssueData"},"tenderOfferData":{"$ref":"#/components/schemas/TenderOfferData"},"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"]},"CashDividendData":{"type":"object","required":["grossAmountPerShare","originalCurrency","taxPercent"],"properties":{"grossAmountPerShare":{"type":"number","format":"decimal","description":"Gross amount per share."},"originalCurrency":{"$ref":"#/components/schemas/CorporateActionCurrencyEnum"},"taxPercent":{"type":"number","format":"decimal","description":"Percent of tax collected by custodian."},"exchangeRate":{"type":"number","format":"decimal","description":"The exchange rate used to convert the originalCurrency to EUR. Required if originalCurrency is not EUR. Expressed as the amount of foreign currency per 1 EUR (e.g., 1 EUR = X foreign currency)."}}},"CorporateActionCurrencyEnum":{"title":"CorporateActionCurrencyEnum","type":"string","description":"Currency of Corporate Action. Currency code in ISO 4217. Required for DVCA.","enum":["CNY","TWD","ZAR","INR","KRW","BRL","AUD","BGN","CAD","CHF","CZK","DKK","EUR","HUF","JPY","NZD","NOK","GBP","PLN","RON","SEK","TRY","USD"]},"StockDividendData":{"type":"object","required":["ratioTo","ratioFrom"],"properties":{"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To."},"fractionalCashAmount":{"type":"number","format":"decimal","description":"Cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"decimal","description":"Posted shares. Confirmed in an MT566 only; ignored in an MT564 announcement."}}},"StockSplitData":{"type":"object","required":["ratioTo","ratioFrom"],"properties":{"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To."},"fractionalCashAmount":{"type":"number","format":"decimal","description":"Cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"decimal","description":"Posted shares. Confirmed in an MT566 only; ignored in an MT564 announcement."}}},"BonusIssueData":{"type":"object","required":["ratioTo","ratioFrom"],"properties":{"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To."},"fractionalCashAmount":{"type":"number","format":"decimal","description":"Cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"decimal","description":"Posted shares. Confirmed in an MT566 only; ignored in an MT564 announcement."},"bonusIssueDecision":{"$ref":"#/components/schemas/BonusIssueAdminDecisionEnum"}}},"BonusIssueAdminDecisionEnum":{"title":"BonusIssueAdminDecisionEnum","type":"string","description":"Admin decision on how a bonus issue is treated for tax and cost basis. INTERNAL_REALLOCATION is a tax-neutral capital increase from company funds (ratio-based); EXTERNAL_CAPITAL_DISTRIBUTION is a taxable bonus issue valued at ex-date price.","enum":["INTERNAL_REALLOCATION","EXTERNAL_CAPITAL_DISTRIBUTION"]},"TenderOfferData":{"type":"object","description":"Tender offer announced in an MT564 (TEND). Carries the response deadline and offered options.","required":["responseDeadline","tenderOptions"],"properties":{"responseDeadline":{"type":"string","format":"date-time","description":"Response deadline."},"tenderOptions":{"$ref":"#/components/schemas/CorporateActionTenderOptions"}}},"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"},"maximumQuantitySharesAccepted":{"type":"number","format":"decimal","description":"Maximum Quantity of Shares Accepted"},"creditedIsin":{"type":"string","description":"ISIN of credited securities for STOCK options"},"exchangeRatio":{"type":"number","format":"decimal","description":"Exchange ratio for STOCK options"}}},"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."},"cashDividendData":{"$ref":"#/components/schemas/CashDividendData"},"stockDividendData":{"$ref":"#/components/schemas/StockDividendData"},"stockSplitData":{"$ref":"#/components/schemas/StockSplitData"},"bonusIssueData":{"$ref":"#/components/schemas/BonusIssueData"},"tenderResultData":{"$ref":"#/components/schemas/TenderResultData"},"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"]},"CashDividendData":{"type":"object","required":["grossAmountPerShare","originalCurrency","taxPercent"],"properties":{"grossAmountPerShare":{"type":"number","format":"decimal","description":"Gross amount per share."},"originalCurrency":{"$ref":"#/components/schemas/CorporateActionCurrencyEnum"},"taxPercent":{"type":"number","format":"decimal","description":"Percent of tax collected by custodian."},"exchangeRate":{"type":"number","format":"decimal","description":"The exchange rate used to convert the originalCurrency to EUR. Required if originalCurrency is not EUR. Expressed as the amount of foreign currency per 1 EUR (e.g., 1 EUR = X foreign currency)."}}},"CorporateActionCurrencyEnum":{"title":"CorporateActionCurrencyEnum","type":"string","description":"Currency of Corporate Action. Currency code in ISO 4217. Required for DVCA.","enum":["CNY","TWD","ZAR","INR","KRW","BRL","AUD","BGN","CAD","CHF","CZK","DKK","EUR","HUF","JPY","NZD","NOK","GBP","PLN","RON","SEK","TRY","USD"]},"StockDividendData":{"type":"object","required":["ratioTo","ratioFrom"],"properties":{"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To."},"fractionalCashAmount":{"type":"number","format":"decimal","description":"Cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"decimal","description":"Posted shares. Confirmed in an MT566 only; ignored in an MT564 announcement."}}},"StockSplitData":{"type":"object","required":["ratioTo","ratioFrom"],"properties":{"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To."},"fractionalCashAmount":{"type":"number","format":"decimal","description":"Cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"decimal","description":"Posted shares. Confirmed in an MT566 only; ignored in an MT564 announcement."}}},"BonusIssueData":{"type":"object","required":["ratioTo","ratioFrom"],"properties":{"ratioFrom":{"type":"number","format":"decimal","description":"Ratio From."},"ratioTo":{"type":"number","format":"decimal","description":"Ratio To."},"fractionalCashAmount":{"type":"number","format":"decimal","description":"Cash in lieu of fractional shares."},"postedShares":{"type":"number","format":"decimal","description":"Posted shares. Confirmed in an MT566 only; ignored in an MT564 announcement."},"bonusIssueDecision":{"$ref":"#/components/schemas/BonusIssueAdminDecisionEnum"}}},"BonusIssueAdminDecisionEnum":{"title":"BonusIssueAdminDecisionEnum","type":"string","description":"Admin decision on how a bonus issue is treated for tax and cost basis. INTERNAL_REALLOCATION is a tax-neutral capital increase from company funds (ratio-based); EXTERNAL_CAPITAL_DISTRIBUTION is a taxable bonus issue valued at ex-date price.","enum":["INTERNAL_REALLOCATION","EXTERNAL_CAPITAL_DISTRIBUTION"]},"TenderResultData":{"type":"object","description":"Tender result confirmed in an MT566 (TEND).","properties":{"quantitySuccessfullyTendered":{"type":"number","format":"decimal","description":"Quantity of Shares Successfully Tendered. Optional."},"tenderedCashAmount":{"type":"number","format":"decimal","description":"Tendered Cash Amount. Optional."}}},"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
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://docs.tradevest.ai/api-reference/asset-management/corporate-actions/simulator.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.
