示例#1
0
def exchange_on_validated(value: str) -> None:
    required_exchanges.append(value)
示例#2
0
def derivative_on_validated(value: str):
    required_exchanges.append(value)
示例#3
0
def exchange_on_validated(value: str):
    required_exchanges.append(value)
    ExchangePriceManager.set_exchanges_to_feed([value])
    ExchangePriceManager.start()
    return "Enter the token trading pair you would like to trade on %s%s >>> " \
           % (maker_market, f" (e.g. {example})" if example else "")


# strategy specific validators
def is_valid_maker_market_trading_pair(value: str) -> bool:
    maker_market = pure_market_making_config_map.get("maker_market").value
    return is_valid_market_trading_pair(maker_market, value)


pure_market_making_config_map = {
    "maker_market":
    ConfigVar(key="maker_market",
              prompt="Enter your maker exchange name >>> ",
              validator=is_exchange,
              on_validated=lambda value: required_exchanges.append(value)),
    "maker_market_trading_pair":
    ConfigVar(key="primary_market_trading_pair",
              prompt=maker_trading_pair_prompt,
              validator=is_valid_maker_market_trading_pair),
    "mode":
    ConfigVar(
        key="mode",
        prompt=
        "Enter quantity of bid/ask orders per side (single/multiple) >>> ",
        type_str="str",
        validator=lambda v: v in {"single", "multiple"},
        default="single"),
    "bid_place_threshold":
    ConfigVar(
        key="bid_place_threshold",
示例#5
0
def market_on_validated(value: str) -> None:
    required_exchanges.append(value)
    requried_connector_trading_pairs["uniswap_v3"] = [value]
def taker_market_on_validated(value: str):
    required_exchanges.append(value)
    maker_exchange = cross_exchange_market_making_config_map["maker_market"].value
    ExchangePriceManager.set_exchanges_to_feed([maker_exchange, value])
    ExchangePriceManager.start()
示例#7
0
def secondary_market_on_validated(value: str):
    required_exchanges.append(value)
def secondary_market_on_validated(value: str):
    required_exchanges.append(value)
    primary_exchange = arbitrage_config_map["primary_market"].value
    ExchangePriceManager.set_exchanges_to_feed([primary_exchange, value])
    ExchangePriceManager.start()
示例#9
0
def taker_market_on_validated(value: str):
    required_exchanges.append(value)