Skip to content

Commit

Permalink
PMM Renames
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHolyRoger committed Feb 24, 2021
1 parent 957c938 commit d0fe3e5
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 61 deletions.
4 changes: 4 additions & 0 deletions hummingbot/client/command/config_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.core.utils.async_utils import safe_ensure_future
from hummingbot.model.inventory_cost import InventoryCost
from hummingbot.strategy.the_money_pit import (
TheMoneyPitStrategy
)
from hummingbot.strategy.pure_market_making import (
PureMarketMakingStrategy
)
Expand Down Expand Up @@ -183,6 +186,7 @@ async def _config_single_key(self, # type: HummingbotApplication
for config in missings:
self._notify(f"{config.key}: {str(config.value)}")
if isinstance(self.strategy, PureMarketMakingStrategy) or \
isinstance(self.strategy, TheMoneyPitStrategy) or \
isinstance(self.strategy, PerpetualMarketMakingStrategy):
updated = ConfigCommand.update_running_mm(self.strategy, key, config_var.value)
if updated:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env python

from .pure_market_making import PureMarketMakingStrategy
from .the_money_pit import TheMoneyPitStrategy
from .asset_price_delegate import AssetPriceDelegate
from .order_book_asset_price_delegate import OrderBookAssetPriceDelegate
from .api_asset_price_delegate import APIAssetPriceDelegate
from .inventory_cost_price_delegate import InventoryCostPriceDelegate
from .market_indicator_delegate import MarketIndicatorDelegate
__all__ = [
PureMarketMakingStrategy,
TheMoneyPitStrategy,
AssetPriceDelegate,
OrderBookAssetPriceDelegate,
APIAssetPriceDelegate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

from hummingbot.client.hummingbot_application import HummingbotApplication
from hummingbot.strategy.market_trading_pair_tuple import MarketTradingPairTuple
from hummingbot.strategy.pure_market_making import (
PureMarketMakingStrategy,
from hummingbot.strategy.the_money_pit import (
TheMoneyPitStrategy,
OrderBookAssetPriceDelegate,
APIAssetPriceDelegate,
InventoryCostPriceDelegate,
MarketIndicatorDelegate,
)
from hummingbot.strategy.pure_market_making.pure_market_making_config_map import pure_market_making_config_map as c_map
from hummingbot.strategy.the_money_pit.the_money_pit_config_map import the_money_pit_config_map as c_map
from hummingbot.connector.exchange.paper_trade import create_paper_trade_market
from hummingbot.connector.exchange_base import ExchangeBase
from decimal import Decimal
Expand Down Expand Up @@ -107,9 +107,9 @@ def start(self):
indicator_expiry,
indicator_use_time)

strategy_logging_options = PureMarketMakingStrategy.OPTION_LOG_ALL
strategy_logging_options = TheMoneyPitStrategy.OPTION_LOG_ALL

self.strategy = PureMarketMakingStrategy(
self.strategy = TheMoneyPitStrategy(
market_info=MarketTradingPairTuple(*maker_data),
bid_spread=bid_spread,
ask_spread=ask_spread,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from libc.stdint cimport int64_t
from hummingbot.strategy.strategy_base cimport StrategyBase


cdef class PureMarketMakingStrategy(StrategyBase):
cdef class TheMoneyPitStrategy(StrategyBase):
cdef:
object _market_info

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ from .data_types import (
Proposal,
PriceSize
)
from .pure_market_making_order_tracker import PureMarketMakingOrderTracker
from .the_money_pit_order_tracker import TheMoneyPitOrderTracker

from .asset_price_delegate cimport AssetPriceDelegate
from .asset_price_delegate import AssetPriceDelegate
Expand All @@ -49,7 +49,7 @@ s_decimal_neg_one = Decimal(-1)
pmm_logger = None


cdef class PureMarketMakingStrategy(StrategyBase):
cdef class TheMoneyPitStrategy(StrategyBase):
OPTION_LOG_CREATE_ORDER = 1 << 3
OPTION_LOG_MAKER_ORDER_FILLED = 1 << 4
OPTION_LOG_STATUS_REPORT = 1 << 5
Expand Down Expand Up @@ -121,7 +121,7 @@ cdef class PureMarketMakingStrategy(StrategyBase):
raise ValueError("Parameter price_ceiling cannot be lower than price_floor.")

super().__init__()
self._sb_order_tracker = PureMarketMakingOrderTracker()
self._sb_order_tracker = TheMoneyPitOrderTracker()
self._market_info = market_info
self._bid_spread = bid_spread
self._ask_spread = ask_spread
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ from hummingbot.strategy.order_tracker import OrderTracker
from hummingbot.strategy.order_tracker cimport OrderTracker


cdef class PureMarketMakingOrderTracker(OrderTracker):
cdef class TheMoneyPitOrderTracker(OrderTracker):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ from hummingbot.strategy.order_tracker cimport OrderTracker
NaN = float("nan")


cdef class PureMarketMakingOrderTracker(OrderTracker):
cdef class TheMoneyPitOrderTracker(OrderTracker):
# ETH confirmation requirement of Binance has shortened to 12 blocks as of 7/15/2019.
# 12 * 15 / 60 = 3 minutes
SHADOW_MAKER_ORDER_KEEP_ALIVE_DURATION = 60.0 * 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################
### Pure market making strategy config ###
### The Money Pit strategy config ###
########################################################

template_version: 21
Expand Down

0 comments on commit d0fe3e5

Please sign in to comment.