Spread Level Configuration
Spread level parameters define the general execution configuration. See the Leg Configuration to parametrize each leg individually
Parameter
Description
TakingParameters
Parameter
Description
from architect_py import (
SpreaderParams,
LegParams,
QuotingParameters,
TakingParameters,
MissedTakePolicy,
OrderDir,
HumanDuration,
)
symbol1 = 'NQ 20251219 CME Future'
symbol2 = 'MNQ 20251219 CME Future'
tp1 = f"{symbol1}/USD"
tp2 = f"{symbol2}/USD"
account = "PAPER:[email protected]"
venue = "CME"
params = SpreaderParams.new(
dir=OrderDir.BUY,
quantity=100,
limit_price=10,
leg1=LegParams.new(
symbol=tp1,
marketdata_venue=venue,
execution_venue=venue,
quantity_ratio=1,
price_multiplier=1,
price_offset=0,
chase_ticks=0,
quoting_parameters=QuotingParameters.new(max_quote_quantity=2),
),
leg2=LegParams.new(
symbol=tp2,
marketdata_venue=venue,
execution_venue=venue,
quantity_ratio=-10,
price_multiplier=-1,
price_offset=0,
chase_ticks=0,
quoting_parameters=QuotingParameters.new(max_quote_quantity=20),
),
taking_parameters=TakingParameters.new(
min_quantity_threshold=None,
max_fire_quantity=None,
take_lockout=None,
),
missed_hedge_policy=MissedTakePolicy.Halt,
missed_hedge_wait_time=HumanDuration('30s'),
)
order = await client.place_algo_order(params=params, account=account)Last updated