Skip to content

Commit

Permalink
Merge pull request hummingbot#3052 from CoinAlpha/development
Browse files Browse the repository at this point in the history
release / sync dev 0.37.0 -> master (PR 2 of 3)
  • Loading branch information
dennisocana authored Mar 9, 2021
2 parents 6362d1d + 5986af1 commit c2f5146
Show file tree
Hide file tree
Showing 123 changed files with 10,603 additions and 551 deletions.
49 changes: 0 additions & 49 deletions .github/ISSUE_TEMPLATE/exchange_request.md

This file was deleted.

37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,25 @@ We created hummingbot to promote **decentralized market-making**: enabling membe

| logo | id | name | ver | doc | status |
|:---:|:---:|:---:|:---:|:---:|:---:|
| <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) | ![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/blocktane_logo.png" alt="Blocktane" width="90" /> | blocktane | [Blocktane](https://blocktane.io/) | 2 | [API](https://blocktane.io/api) | ![YELLOW](https://via.placeholder.com/15/ffff00/?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/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" /> | dy/dx | [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=+) |
|<img src="assets/huobi_logo.png" alt="Huobi Global" width="90" />| huobi | [Huobi Global](https://www.hbg.com) | 1 | [API](https://huobiapi.github.io/docs/spot/v1/en/) | ![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/kucoin_logo.png" alt="KuCoin" width="90" /> | kucoin | [KuCoin](https://www.kucoin.com/) | 1 | [API](https://docs.kucoin.com/#general) | ![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/kraken_logo.png" alt="Kraken" width="90" /> | kraken | [Kraken](https://www.kraken.com/) | 1 | [API](https://www.kraken.com/features/api) | ![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/liquid_logo.png" alt="Liquid" width="90" /> | liquid | [Liquid](https://www.liquid.com/) | 2 | [API](https://developers.liquid.com/) | ![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/okex_logo.png" alt="OKEx" width="90" /> | okex | [OKEx](https://www.okex.com/) | 3 | [API](https://www.okex.com/docs/en/) | ![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/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=+) |
|<img src="assets/huobi_logo.png" alt="Huobi Global" width="90" />| huobi | [Huobi Global](https://www.hbg.com) | 1 | [API](https://huobiapi.github.io/docs/spot/v1/en/) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/kucoin_logo.png" alt="KuCoin" width="90" /> | kucoin | [KuCoin](https://www.kucoin.com/) | 1 | [API](https://docs.kucoin.com/#general) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/kraken_logo.png" alt="Kraken" width="90" /> | kraken | [Kraken](https://www.kraken.com/) | 1 | [API](https://www.kraken.com/features/api) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/liquid_logo.png" alt="Liquid" width="90" /> | liquid | [Liquid](https://www.liquid.com/) | 2 | [API](https://developers.liquid.com/) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/okex_logo.png" alt="OKEx" width="90" /> | okex | [OKEx](https://www.okex.com/) | 3 | [API](https://www.okex.com/docs/en/) |![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/probit_global_logo.png" alt="Probit Global" width="90" /> | probit | [Probit Global](https://www.probit.com/en-us/) | 1 | [API](https://docs-en.probit.com/docs) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/probit_korea_logo.png" alt="Probit Korea" width="90" /> | probit_kr | [Probit Korea](https://www.probit.kr/en-us/) | 1 | [API](https://docs-en.probit.com/docs) |![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |


## Supported decentralized exchanges
Expand All @@ -58,6 +60,7 @@ We created hummingbot to promote **decentralized market-making**: enabling membe
|:---:|:---:|:---:|:---:|:---:|:--:|
| <img src="assets/celo_logo.svg" alt="Celo" width="90" /> | celo | [Celo](https://terra.money/) | * | [SDK](https://celo.org/developers) | ![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/balancer_logo.svg" alt="Balancer" width="90" height="30" /> | balancer | [Balancer](https://balancer.finance/) | * | [SDK](https://docs.balancer.finance/) | ![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/perpetual_finance_logo.png" alt="Perpetual Protocol" width="90" /> | perpetual_finance | [Perpetual Protocol](https://perp.fi/) | * | [SDK](https://docs.perp.fi/) | ![YELLOW](https://via.placeholder.com/15/ffff00/?text=+) |
| <img src="assets/terra_logo.png" alt="Terra" width="90" /> | terra | [Terra](https://terra.money/) | * | [SDK](https://docs.terra.money/) | ![GREEN](https://via.placeholder.com/15/008000/?text=+) |
| <img src="assets/uniswap_logo.svg" alt="Uniswap" width="90" height="30" /> | uniswap | [Uniswap](https://uniswap.org/) | * | [SDK](https://uniswap.org/docs/v2/) | ![GREEN](https://via.placeholder.com/15/008000/?text=+) |

Expand Down
Binary file added assets/beaxy_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 added assets/perpetual_finance_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 added assets/probit_global_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 added assets/probit_korea_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion hummingbot/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.36.0
0.37.0
25 changes: 23 additions & 2 deletions hummingbot/client/command/balance_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ async def show_balances(self):
if all_ex_limits is None:
all_ex_limits = {}

exchanges_total = 0

for exchange, bals in all_ex_bals.items():
self._notify(f"\n{exchange}:")
# df = await self.exchange_balances_df(bals, all_ex_limits.get(exchange, {}))
Expand All @@ -95,6 +97,9 @@ async def show_balances(self):
self._notify("\n".join(lines))
self._notify(f"\n Total: $ {df['Total ($)'].sum():.0f} "
f"Allocated: {allocated_total / df['Total ($)'].sum():.2%}")
exchanges_total += df['Total ($)'].sum()

self._notify(f"\n\nExchanges Total: $ {exchanges_total:.0f} ")

celo_address = global_config_map["celo_address"].value
if celo_address is not None:
Expand All @@ -110,11 +115,17 @@ async def show_balances(self):

eth_address = global_config_map["ethereum_wallet"].value
if eth_address is not None:
df = await self.ethereum_balances_df()
lines = [" " + line for line in df.to_string(index=False).split("\n")]
eth_df = await self.ethereum_balances_df()
lines = [" " + line for line in eth_df.to_string(index=False).split("\n")]
self._notify("\nethereum:")
self._notify("\n".join(lines))

# XDAI balances
xdai_df = await self.xdai_balances_df()
lines = [" " + line for line in xdai_df.to_string(index=False).split("\n")]
self._notify("\nxdai:")
self._notify("\n".join(lines))

async def exchange_balances_df(self, # type: HummingbotApplication
exchange_balances: Dict[str, Decimal],
exchange_limits: Dict[str, str]):
Expand Down Expand Up @@ -177,6 +188,16 @@ async def ethereum_balances_df(self, # type: HummingbotApplication
df.sort_values(by=["Asset"], inplace=True)
return df

async def xdai_balances_df(self, # type: HummingbotApplication
):
rows = []
bals = await UserBalances.xdai_balances()
for token, bal in bals.items():
rows.append({"Asset": token, "Amount": round(bal, 4)})
df = pd.DataFrame(data=rows, columns=["Asset", "Amount"])
df.sort_values(by=["Asset"], inplace=True)
return df

async def asset_limits_df(self,
asset_limit_conf: Dict[str, str]):
rows = []
Expand Down
4 changes: 3 additions & 1 deletion hummingbot/client/command/history_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ async def get_current_balances(self, # type: HummingbotApplication
if paper_balances is None:
return {}
return {token: Decimal(str(bal)) for token, bal in paper_balances.items()}
elif "perpetual_finance" == market:
return await UserBalances.xdai_balances()
else:
gateway_eth_connectors = [cs.name for cs in CONNECTOR_SETTINGS.values() if cs.use_ethereum_wallet and
cs.type == ConnectorType.Connector]
Expand All @@ -105,7 +107,7 @@ def report_header(self, # type: HummingbotApplication
current_time = get_timestamp()
lines.extend(
[f"\nStart Time: {datetime.fromtimestamp(start_time).strftime('%Y-%m-%d %H:%M:%S')}"] +
[f"Curent Time: {datetime.fromtimestamp(current_time).strftime('%Y-%m-%d %H:%M:%S')}"] +
[f"Current Time: {datetime.fromtimestamp(current_time).strftime('%Y-%m-%d %H:%M:%S')}"] +
[f"Duration: {pd.Timedelta(seconds=int(current_time - start_time))}"]
)
self._notify("\n".join(lines))
Expand Down
2 changes: 1 addition & 1 deletion hummingbot/client/config/config_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_erc20_token_addresses() -> Dict[str, List]:
address_file_path = TOKEN_ADDRESSES_FILE_PATH
token_list = {}

resp = requests.get(token_list_url)
resp = requests.get(token_list_url, timeout=3)
decoded_resp = resp.json()

for token in decoded_resp["tokens"]:
Expand Down
2 changes: 1 addition & 1 deletion hummingbot/client/config/global_config_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def connector_keys():
prompt="Specify token list url of a list available on https://tokenlists.org/ >>> ",
type_str="str",
required_if=lambda: global_config_map["ethereum_wallet"].value is not None,
default="https://wispy-bird-88a7.uniswap.workers.dev/?url=http://tokens.1inch.eth.link"),
default="https://defi.cmc.eth.link/"),
# Whether or not to invoke cancel_all on exit if marketing making on a open order book DEX (e.g. Radar Relay)
"on_chain_cancel_on_exit":
ConfigVar(key="on_chain_cancel_on_exit",
Expand Down
2 changes: 1 addition & 1 deletion hummingbot/client/hummingbot_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _initialize_markets(self, market_names: List[Tuple[str, List[str]]]):
if conn_setting.use_ethereum_wallet:
ethereum_rpc_url = global_config_map.get("ethereum_rpc_url").value
# Todo: Hard coded this execption for now until we figure out how to handle all ethereum connectors.
if connector_name in ["balancer", "uniswap"]:
if connector_name in ["balancer", "uniswap", "perpetual_finance"]:
private_key = get_eth_wallet_private_key()
init_params.update(wallet_private_key=private_key, ethereum_rpc_url=ethereum_rpc_url)
else:
Expand Down
Loading

0 comments on commit c2f5146

Please sign in to comment.