prompt="Enter your maker derivative connector >>> ", validator=validate_derivative, on_validated=derivative_on_validated, prompt_on_new=True), "market": ConfigVar(key="market", prompt=maker_trading_pair_prompt, validator=validate_derivative_trading_pair, prompt_on_new=True), "leverage": ConfigVar( key="leverage", prompt="How much leverage do you want to use? " "(Binance Perpetual supports up to 75X for most pairs) >>> ", type_str="int", validator=lambda v: validate_int(v, min_value=0, inclusive=False), prompt_on_new=True), "position_mode": ConfigVar( key="position_mode", prompt="Which position mode do you want to use? (One-way/Hedge) >>> ", validator=validate_derivative_position_mode, type_str="str", default="One-way", prompt_on_new=True), "bid_spread": ConfigVar( key="bid_spread", prompt="How far away from the mid price do you want to place the " "first bid order? (Enter 1 to indicate 1%) >>> ", type_str="decimal",
} else "Invalid fee tier.", prompt_on_new=True), "use_volatility": ConfigVar( key="use_volatility", type_str="bool", prompt="Do you want to use price volatility from the pool to adjust spread for positions? (Yes/No) >>> ", prompt_on_new=True, validator=validate_bool, ), "volatility_period": ConfigVar( key="volatility_period", type_str="int", prompt="Enter how long (in hours) do you want to use for price volatility calculation >>> ", required_if=lambda: uniswap_v3_lp_config_map.get("use_volatility").value, validator=lambda v: validate_int(v, 1), default=3600, prompt_on_new=True ), "volatility_factor": ConfigVar( key="volatility_factor", type_str="decimal", prompt="Enter volatility factor >>> ", required_if=lambda: uniswap_v3_lp_config_map.get("use_volatility").value, validator=lambda v: validate_decimal(v, Decimal("0")), default=Decimal("1"), prompt_on_new=True ), "buy_position_price_spread": ConfigVar( key="buy_position_price_spread", prompt="How wide apart(in percentage) do you want the lower price to be from the upper price for buy position?(Enter 1 to indicate 1%) >>> ",
"concurrent_orders_submission": ConfigVar( key="concurrent_orders_submission", prompt= "Do you want to submit both arb orders concurrently (Yes/No) ? If No, the bot will wait for first " "connector order filled before submitting the other order >>> ", prompt_on_new=True, default=False, validator=validate_bool, type_str="bool"), "debug_price_shim": ConfigVar( key="debug_price_shim", prompt= "Do you want to enable the debug price shim for integration tests? If you don't know what this does " "you should keep it disabled. >>> ", default=False, validator=validate_bool, type_str="bool"), "gateway_transaction_cancel_interval": ConfigVar( key="gateway_transaction_cancel_interval", prompt= "After what time should blockchain transactions be cancelled if they are not included in a block? " "(this only affects decentralized exchanges) (Enter time in seconds) >>> ", prompt_on_new=True, default=600, validator=lambda v: validate_int(v, min_value=1, inclusive=True), type_str="int"), }
validator=validate_bool), "volatility_buffer_size": ConfigVar( key="volatility_buffer_size", prompt= "Enter amount of ticks that will be stored to calculate volatility >>> ", type_str="int", validator=lambda v: validate_decimal(v, 1, 10000), default=200), "trading_intensity_buffer_size": ConfigVar( key="trading_intensity_buffer_size", prompt= "Enter amount of ticks that will be stored to estimate order book liquidity >>> ", type_str="int", validator=lambda v: validate_int(v, 1, 10000), default=200), "order_levels": ConfigVar( key="order_levels", prompt="How many orders do you want to place on both sides? >>> ", type_str="int", validator=lambda v: validate_int(v, min_value=-1, inclusive=False), default=1), "level_distances": ConfigVar( key="level_distances", prompt= "How far apart in % of optimal spread should orders on one side be? >>> ", type_str="decimal", validator=lambda v: validate_decimal(v, min_value=0, inclusive=True),
def validate_int_zero_or_above(cls, v: str): ret = validate_int(v, min_value=2) if ret is not None: raise ValueError(ret) return v