Skip to content

Commit

Permalink
Merge branch 'hummingbot:development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
petioptrv authored Aug 30, 2023
2 parents 2796dcd + 2d664e4 commit c8c5be7
Show file tree
Hide file tree
Showing 33 changed files with 3,150 additions and 3,666 deletions.
88 changes: 44 additions & 44 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
version: "3.9"
services:
# hummingbot:
# container_name: hummingbot
# build:
# context: .
# dockerfile: Dockerfile
# volumes:
# - ./conf:/home/hummingbot/conf
# - ./conf/connectors:/home/hummingbot/conf/connectors
# - ./conf/strategies:/home/hummingbot/conf/strategies
# - ./logs:/home/hummingbot/logs
# - ./data:/home/hummingbot/data
# - ./scripts:/home/hummingbot/scripts
# environment:
# - CONFIG_PASSWORD=a
# - CONFIG_FILE_NAME=directional_strategy_rsi.py
# logging:
# driver: "json-file"
# options:
# max-size: "10m"
# max-file: 5
# tty: true
# stdin_open: true
# network_mode: host
#
# dashboard:
# container_name: dashboard
# image: hummingbot/dashboard:latest
# volumes:
# - ./data:/home/dashboard/data
# ports:
# - "8501:8501"

gateway:
container_name: gateway
image: hummingbot/gateway:latest
ports:
- "15888:15888"
- "8080:8080"
hummingbot:
container_name: hummingbot
build:
context: .
dockerfile: Dockerfile
volumes:
- "./gateway_files/conf:/home/gateway/conf"
- "./gateway_files/logs:/home/gateway/logs"
- "./gateway_files/db:/home/gateway/db"
- "./certs:/home/gateway/certs"
environment:
- GATEWAY_PASSPHRASE=a
- ./conf:/home/hummingbot/conf
- ./conf/connectors:/home/hummingbot/conf/connectors
- ./conf/strategies:/home/hummingbot/conf/strategies
- ./logs:/home/hummingbot/logs
- ./data:/home/hummingbot/data
- ./scripts:/home/hummingbot/scripts
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: 5
tty: true
stdin_open: true
network_mode: host
# environment:
# - CONFIG_PASSWORD=a
# - CONFIG_FILE_NAME=simple_pmm_example.py

# dashboard:
# container_name: dashboard
# image: hummingbot/dashboard:latest
# volumes:
# - ./data:/home/dashboard/data
# ports:
# - "8501:8501"

# gateway:
# container_name: gateway
# image: hummingbot/gateway:latest
# ports:
# - "15888:15888"
# - "8080:8080"
# volumes:
# - "./gateway_files/conf:/home/gateway/conf"
# - "./gateway_files/logs:/home/gateway/logs"
# - "./gateway_files/db:/home/gateway/db"
# - "./certs:/home/gateway/certs"
# environment:
# - GATEWAY_PASSPHRASE=a
2 changes: 1 addition & 1 deletion hummingbot/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dev-1.19.0
dev-1.20.0
8 changes: 5 additions & 3 deletions hummingbot/connector/exchange/gate_io/gate_io_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from hummingbot.connector.exchange_py_base import ExchangePyBase
from hummingbot.connector.trading_rule import TradingRule
from hummingbot.connector.utils import combine_to_hb_trading_pair
from hummingbot.core.data_type.common import OrderType, PriceType, TradeType
from hummingbot.core.data_type.common import OrderType, TradeType
from hummingbot.core.data_type.in_flight_order import InFlightOrder, OrderState, OrderUpdate, TradeUpdate
from hummingbot.core.data_type.order_book_tracker_data_source import OrderBookTrackerDataSource
from hummingbot.core.data_type.trade_fee import AddedToCostTradeFee, TokenAmount, TradeFeeBase
Expand Down Expand Up @@ -217,9 +217,11 @@ async def _place_order(self,
})
if trade_type.name.lower() == 'buy':
if price.is_nan():
price = self.get_price_by_type(
price = self.get_price_for_volume(
trading_pair,
price_type=PriceType.BestAsk if trade_type is TradeType.BUY else PriceType.BestBid)
True,
amount
).result_price
data.update({
"amount": f"{price * amount:f}",
})
Expand Down
Loading

0 comments on commit c8c5be7

Please sign in to comment.