CPAPI Spreads
Combo Orders follow the format of: ‘{spread_conid};;;{leg_conid1}/{ratio},{leg_conid2}/{ratio}’
This example documents the same structure of a long IBKR order against a short MCD order.
Combination orders or spread orders may also be placed using the same orders endpoint. In the case of combo orders, we must use the ‘conidex’ instead of “conid”. The conidex field is a string representation of our combo order parameters.
The spread_conid is a unique identified used to denote a spread order. For US Stock Combos, only the spread_conid needs to be submitted.. For all other countries, you will need to use the format ‘spread_conid@exchange’.
Available currency spread conids:
Following our spread_conid, we will then follow with 4 semicolnons, and then the first leg_coind. This will be the first contract to trade. After the conid, a forward slash, ’/’, needs to be included followed by your spread ratio.
The ratio indicates two parts. The first is the sign of the ratio, whether it is positive or negative. Positive signs indicate a ‘Buy’ side, while a negative value represents a ‘Sell’ side. This could also be explained as a state of ‘Long’ and ‘Short’ respectively, depending on your current position and intention. After indicating the side, you would indicate the ratio value. This is the multiplier of your quantity value.
Now, you can continue to add legs to the order by separating them with a comma. The number of legs available is based on the exchange’s rules.

