Skip to content

Commit

Permalink
Merge branch 'development' into digifinex
Browse files Browse the repository at this point in the history
  • Loading branch information
szmcdull authored Apr 5, 2021
2 parents 22fa851 + 76a5df2 commit 4a0491b
Show file tree
Hide file tree
Showing 127 changed files with 6,049 additions and 884 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ We created hummingbot to promote **decentralized market-making**: enabling membe

| logo | id | name | ver | doc | status |
|:---:|:---:|:---:|:---:|:---:|:---:|
| <img src="assets/ascend_ex_logo.png" alt="AscendEx" width="90" /> | ascend_ex | [AscendEx](https://ascendex.com/en/global-digital-asset-platform) | 1 | [API](https://ascendex.github.io/ascendex-pro-api/#ascendex-pro-api-documentation) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/beaxy_logo.png" alt="Beaxy" width="90" /> | beaxy | [Beaxy](https://beaxy.com/) | 2 | [API](https://beaxyapiv2trading.docs.apiary.io/) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="https://i.ibb.co/m0YDQLd/Screen-Shot-2019-03-14-at-10-53-42-AM.png" alt="Binance" width="90" /> | binance | [Binance](https://www.binance.com/) | 3 | [API](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/binanceus_logo.png" alt="Binance US" width="90" /> | binance_us | [Binance US](https://www.binance.com/) | 3 | [API](https://github.com/binance-us/binance-official-api-docs/blob/master/rest-api.md) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/binance_perpetual_logo.png" alt="Binance Perpetual" width="90" /> | binance_perpetual | [Binance Futures](https://www.binance.com/) | 1 | [API](https://binance-docs.github.io/apidocs/futures/en/) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
|<img src="assets/bittrex_logo.png" alt="Bittrex Global" width="90" height="30" />| bittrex | [Bittrex Global](https://global.bittrex.com/) | 3 | [API](https://bittrex.github.io/api/v3) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/bitfinex_logo.png" alt="Bitfinex" width="90" /> | bitfinex | [Bitfinex](https://www.bitfinex.com/) | 2 | [API](https://docs.bitfinex.com/docs/introduction) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/bitmax_logo.png" alt="BitMax" width="90" /> | bitmax | [BitMax](https://bitmax.io/en/global-digital-asset-platform) | 1 | [API](https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/blocktane_logo.png" alt="Blocktane" width="90" /> | blocktane | [Blocktane](https://blocktane.io/) | 2 | [API](https://blocktane.io/api) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="https://i.ibb.co/h9JdGDW/cbp.jpg" alt="Coinbase Pro" width="90" /> | coinbase_pro | [Coinbase Pro](https://pro.coinbase.com/) | * | [API](https://docs.pro.coinbase.com/) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/coinzoom_logo.svg" alt="CoinZoom" width="90" /> | coinzoom | [CoinZoom](https://trade.coinzoom.com/landing) | * | [API](https://api-docs.coinzoom.com/) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/cryptocom_logo.png" alt="Crypto.com" width="90" /> | crypto_com | [Crypto.com](https://crypto.com/exchange) | 2 | [API](https://exchange-docs.crypto.com/#introduction) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/dydx_logo.png" alt="DyDx" width="90" /> | dydx | [dy/dx](https://dydx.exchange/) | 1 | [API](https://docs.dydx.exchange/) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/eterbase_logo.png" alt="Eterbase" width="90" /> | eterbase | [Eterbase](https://www.eterbase.com/) | * | [API](https://developers.eterbase.exchange/?version=latest) |![RED](https://via.placeholder.com/15/f03c15/?text=+) |
Expand Down
Binary file added assets/ascend_ex_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/bitmax_logo.png
Binary file not shown.
16 changes: 16 additions & 0 deletions assets/coinzoom_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
hitbtc_api_key = os.getenv("HITBTC_API_KEY")
hitbtc_secret_key = os.getenv("HITBTC_SECRET_KEY")
# CoinZoom Test
coinzoom_api_key = os.getenv("COINZOOM_API_KEY")
coinzoom_secret_key = os.getenv("COINZOOM_SECRET_KEY")
coinzoom_username = os.getenv("COINZOOM_USERNAME")
# Wallet Tests
test_erc20_token_address = os.getenv("TEST_ERC20_TOKEN_ADDRESS")
web3_test_private_key_a = os.getenv("TEST_WALLET_PRIVATE_KEY_A")
Expand Down
17 changes: 8 additions & 9 deletions hummingbot/client/command/config_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
no_restart_pmm_keys_in_percentage = ["bid_spread", "ask_spread", "order_level_spread", "inventory_target_base_pct"]
no_restart_pmm_keys = ["order_amount", "order_levels", "filled_order_delay", "inventory_skew_enabled", "inventory_range_multiplier"]
global_configs_to_display = ["0x_active_cancels",
"autofill_import",
"kill_switch_enabled",
"kill_switch_rate",
"telegram_enabled",
Expand All @@ -44,12 +45,7 @@
"send_error_logs",
"script_enabled",
"script_file_path",
"manual_gas_price",
"ethereum_chain_name",
"ethgasstation_gas_enabled",
"ethgasstation_api_key",
"ethgasstation_gas_level",
"ethgasstation_refresh_time",
"gateway_enabled",
"gateway_cert_passphrase",
"gateway_api_host",
Expand Down Expand Up @@ -85,7 +81,7 @@ def list_configs(self, # type: HummingbotApplication
self._notify("\n".join(lines))

if self.strategy_name is not None:
data = [[cv.key, cv.value] for cv in self.strategy_config_map.values() if not cv.is_secure]
data = [[cv.printable_key or cv.key, cv.value] for cv in self.strategy_config_map.values() if not cv.is_secure]
df = pd.DataFrame(data=data, columns=columns)
self._notify("\nStrategy Configurations:")
lines = [" " + line for line in df.to_string(index=False, max_colwidth=50).split("\n")]
Expand Down Expand Up @@ -239,9 +235,12 @@ async def inventory_price_prompt(
exchange = config_map["exchange"].value
market = config_map["market"].value
base_asset, quote_asset = market.split("-")
balances = await UserBalances.instance().balances(
exchange, base_asset, quote_asset
)
if global_config_map["paper_trade_enabled"].value:
balances = global_config_map["paper_trade_account_balance"].value
else:
balances = await UserBalances.instance().balances(
exchange, base_asset, quote_asset
)
if balances.get(base_asset) is None:
return

Expand Down
5 changes: 5 additions & 0 deletions hummingbot/client/command/create_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ async def prompt_a_config(self, # type: HummingbotApplication
config: ConfigVar,
input_value=None,
assign_default=True):
if config.key == "inventory_price":
await self.inventory_price_prompt(self.strategy_config_map, input_value)
return
if input_value is None:
if assign_default:
self.app.set_text(parse_config_default_to_text(config))
Expand All @@ -105,9 +108,11 @@ async def prompt_a_config(self, # type: HummingbotApplication

if self.app.to_stop_config:
return
config.value = parse_cvar_value(config, input_value)
err_msg = await config.validate(input_value)
if err_msg is not None:
self._notify(err_msg)
config.value = None
await self.prompt_a_config(config)
else:
config.value = parse_cvar_value(config, input_value)
Expand Down
4 changes: 4 additions & 0 deletions hummingbot/client/command/import_command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

from hummingbot.core.utils.async_utils import safe_ensure_future
from hummingbot.client.config.global_config_map import global_config_map
from hummingbot.client.config.config_helpers import (
update_strategy_config_map_from_file,
short_strategy_name,
Expand Down Expand Up @@ -43,6 +44,9 @@ async def import_config_file(self, # type: HummingbotApplication
self.app.change_prompt(prompt=">>> ")
if await self.status_check_all():
self._notify("\nEnter \"start\" to start market making.")
autofill_import = global_config_map.get("autofill_import").value
if autofill_import is not None:
self.app.set_text(autofill_import)

async def prompt_a_file_name(self # type: HummingbotApplication
):
Expand Down
16 changes: 12 additions & 4 deletions hummingbot/client/command/rate_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
)
from hummingbot.core.utils.async_utils import safe_ensure_future
from hummingbot.core.rate_oracle.rate_oracle import RateOracle
from hummingbot.client.errors import OracleRateUnavailable

s_float_0 = float(0)
s_decimal_0 = Decimal("0")
Expand All @@ -29,14 +30,21 @@ def rate(self, # type: HummingbotApplication
async def show_rate(self, # type: HummingbotApplication
pair: str,
):
try:
msg = await RateCommand.oracle_rate_msg(pair)
except OracleRateUnavailable:
msg = "Rate is not available."
self._notify(msg)

@staticmethod
async def oracle_rate_msg(pair: str,
):
pair = pair.upper()
self._notify(f"Source: {RateOracle.source.name}")
rate = await RateOracle.rate_async(pair)
if rate is None:
self._notify("Rate is not available.")
return
raise OracleRateUnavailable
base, quote = pair.split("-")
self._notify(f"1 {base} = {rate} {quote}")
return f"Source: {RateOracle.source.name}\n1 {base} = {rate} {quote}"

async def show_token_value(self, # type: HummingbotApplication
token: str
Expand Down
Loading

0 comments on commit 4a0491b

Please sign in to comment.