CPAPI Spreads

View as MarkdownOpen in Claude

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.

"conidex": "28812380;;;43645865/1,9408/-1"

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:
CurrencySpread ConID
AUD61227077
CAD61227082
CHF61227087
CNH136000441
GBP58666491
HKD61227072
INR136000444
JPY61227069
KRW136000424
MXN136000449
SEK136000429
SGD426116555
USD28812380

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.