Add existing orders into an existing contingency group

You can add one or more existing entry order into an existing contingency (OCO, OTO) contingency group.

To join orders into a group:

1) Create a valuemap and fill only one field:

Valuemap field

Datatype

Description

Command

string

The command. Must be JoinToExistingContingencyGroup.

The field is obligatory.

ContingencyID

string

Identifier of the existing contingency group.

The field is obligatory.

2) Create a valuemap for each entry order you want to add into the contingency group. Fill these value maps as:

Valuemap field

Datatype

Description

AcctID

string

The identifier of the account to which the order belongs to.

The field is obligatory.

OrderID

string

The identifier of the order to be included into the group.

The order must exist, must be an entry (LE or SE) and must be in the waiting status.

The field is obligatory.

3) Append each entry order valuemap to the main valuemap using valuemap.append() method.

Please note that only dependent orders may be added into OTO or ELS groups.

4) Pass main valuemap table to terminal:execute() method.

Limitations:

1) All entry orders must be created for the same account.

Returns:

The terminal:execute() method will return the list of request id for entry order processed.

back