Pegged to Benchmark

View as MarkdownOpen in Claude

The Pegged to Benchmark order is similar to the Pegged to Stock order for options, except that the Pegged to Benchmark allows you to specify any asset type as the reference (benchmark) contract for a stock or option order. Both the primary and reference contracts must use the same currency.

Products: STK, OPT

More on Pegged to Benchmark Orders

More on Supported exchanges

1order = Order()
2order.orderType = "PEG BENCH"
3#BUY or SELL
4order.action = action
5order.totalQuantity = quantity
6#Beginning with price...
7order.startingPrice = startingPrice
8#increase/decrease price..
9order.isPeggedChangeAmountDecrease = peggedChangeAmountDecrease
10#by... (and likewise for price moving in opposite direction)
11order.peggedChangeAmount = peggedChangeAmount
12#whenever there is a price change of...
13order.referenceChangeAmount = referenceChangeAmount
14#in the reference contract...
15order.referenceContractId = referenceConId
16#being traded at...
17order.referenceExchange = referenceExchange
18#starting reference price is...
19order.stockRefPrice = stockReferencePrice
20#Keep order active as long as reference contract trades between...
21order.stockRangeLower = referenceContractLowerRange
22#and...
23order.stockRangeUpper = referenceContractUpperRange