OpenAPI

Planned October 2022 - BREAKING

Removal of a number of fields in the trade/v1/allocationkeys resource:

The following fields are planned for removal (On or after October 2022)

Field Comment
PredefinedQuantityPlease use TotalUnitValues instead.

Planned November 2022 - BREAKING

Removal of a number of fields in the trade/v2/orders, trade/v2/orders/multileg , trade/v2/orders/precheck and trade/v2/orders/multileg/precheck resources:

The following fields are planned for removal (On or after November 2022)

Field Comment
OrderDuration.ExpirationDatePlease use ExpirationDateTime instead.
OrderDuration.ExpiryTimeOnExchangePlease use ExpirationDateTime instead.

Change to functionality in PUT ca/v2/elections (On or after November 2022)

While changing and withdrawing previous elections are allowed for most of the voluntary events, some events have special terms that once submitting the elections, investors are not be allowed to change or withdraw these elections. Today it is possible to submit changes or withdrawal via OpenAPI and such elections are handled in later stages.

After this change,

  • the PUT ca/v2/elections endpoint will reject an election base on the AllowedAction settings of the options. Error codes ChangeInElectionNotAllowed and WithdrawalOfElectionNotAllowed will be responded together with their messages respectively;
  • the GET /ca/v2/events will respond the additional AllowedAction in each options to indicate which actions are allowed on this option. For most of the voluntary events, the AllowedActions will be ["Change", "Withdrawal"];
  • these election rules will also take place in the PUT ca/v2/elections/bulk endpoint.

As an example, assume that an event has 2 options, option 1 allows change and withdrawal while option 2 disallows change and withdrawal, it's response of GET /ca/v2/events will be:

GET /ca/v2/events
{
    "EventId": "9652429",

    "Electable": "Electable",

    "ElectionStatus": "NotElected",
    ....
    "Options": [
        {
            "AllowedActions": ["Change", "Withdrawal"],
            "OptionId": "1"
            ...
        },
        {
            "AllowedActions": [],
            "OptionId": "2"
            ...
    ]
}

After making the initial election, further changes on Option 1 will still be available. But changes or withdrawals on Option 2 will be rejected.

PUT ca/v2/elections
{
  "AccountKey": "2y0tX0m9ZH7MH8HK38qM9g==",
  "EventId": "9652429",
  "Options": [
    {
      "Amount": 200,
      "OptionId": "2",
      "Remarks": "I want to change the amount to 200 on option 2."
    }
  ]
}


400 - Bad Request
{
  "Message": "Option 2 has already been elected once. Election cannot be updated further on this option.",
  "ErrorCode": "ChangeInElectionNotAllowed"
}
PUT ca/v2/elections
{
  "AccountKey": "2y0tX0m9ZH7MH8HK38qM9g==",
  "EventId": "9652429",
  "Options": [
    {
      "Amount": 0,
      "OptionId": "2",
      "Remarks": "I want to withdraw my election on option 2."
    }
  ]
}


400 - Bad Request
{
  "Message": "Option 2 has already been elected once. Withdrawal is not allowed from this option now.",
  "ErrorCode": "WithdrawalOfElectionNotAllowed"
}



RELEASED CHANGES

The list of completed changes can be found here