Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8375b11
[Tests] migrate async fixtures
Jul 17, 2022
3919b75
Bump requirements
Jul 29, 2022
6fefea6
[Feeds] add CommunityMQTT feed
Jul 5, 2022
c7e239c
[Feeds] update mqtt reconnect defails
Jul 7, 2022
997db34
[Feeds] CommunityMQTT add reconnect and duplicate message handling
Jul 9, 2022
ecb0cf1
[Feeds] update ws tests
Jul 11, 2022
ef19e63
[Feeds] add CommunityMQTT tests
Jul 17, 2022
87f8027
[Community] migrate to swell backend
Jul 18, 2022
7dc0326
[Feeds] init device id fetch
Jul 18, 2022
38a927c
[Feeds] add device creation and uuid fetch
Jul 20, 2022
7685ce2
[Feeds] store device uuid and fetch it at login in non blocking task
Jul 22, 2022
957e8e9
[Feeds] migrate to mongo graphql backend
Jul 29, 2022
9d1d2fa
[Feeds] extract graphql requests into dedicated file
Aug 1, 2022
5bf2838
[Feeds] avoid unecessary login
Aug 4, 2022
513d923
[Feeds] fix subscribe and error message
Aug 4, 2022
ccab6b4
[Constants] cleanup community constants
Aug 4, 2022
3ffcb12
[Requirements] bump requirements
Aug 10, 2022
67e8c4e
[Community] update donor role
Aug 10, 2022
f2a10db
[Requirements] bump requirements
Aug 10, 2022
9bd2c41
[Tentacles] add ADDITIONAL_TENTACLES_PACKAGE_URL
Aug 10, 2022
a0879f9
[Copyright] update year
Aug 11, 2022
790766c
[Version] v0.4.6
Aug 11, 2022
e103bcb
[Constants] add forms links
Aug 11, 2022
2819f23
[Constants] make backend urls env variables
Aug 11, 2022
bc8665a
[BinaryUpdater] add todo
Aug 11, 2022
9b1b9d5
[AsyncTools] add log_exceptions param
Aug 11, 2022
bd0ae7e
[Autentication] add authentication utilities
Aug 11, 2022
2513e4d
[Requirements] bump requirements
Aug 11, 2022
ec916f2
[Community] add environment selection
Aug 12, 2022
270d3df
[Community] fix auth error on env switch
Aug 12, 2022
32c4de2
[Community] add device system
Aug 12, 2022
914878b
[Community] fix create device issue and add stop_feeds
Aug 16, 2022
d06e6b6
[Constants] migrate community to astrolab.cloud
Aug 16, 2022
c05e82b
[Community] use definite exceptions and regroup config elements
Aug 16, 2022
923420c
[Requirements] bump requirements
Aug 16, 2022
53abf7f
[Community] fix issues
Aug 20, 2022
116749e
[Requirements] bump requirements
Aug 22, 2022
234be79
[Tests] update community ws tests
Aug 23, 2022
441aa37
[Stop] stop SignalPublisher
Aug 23, 2022
374fd3c
[Stop] force stop if timeout
Aug 23, 2022
4e2f848
[Logs] increase logfiles size
Aug 23, 2022
d5c98d2
[Logs] disable very verbose trading logs by default
Aug 23, 2022
431f0ae
[Version] v0.4.6 update changelog
Aug 23, 2022
dce5b1e
[Backtesting] fix futures backtesting ref market
Aug 23, 2022
b666f20
[Requirements] bump requirements
Aug 24, 2022
128c692
[Okteto] Remove files
Aug 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/preview-close.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/preview-open.yml

This file was deleted.

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

*It is strongly advised to perform an update of your tentacles after updating OctoBot. (start.py tentacles --install --all)*

## [0.4.6] - 2022-08-23
### Added
- [Trading] Futures trading
- [Exchange] Bitget
- [Trading] Copy trading
- [Beta] Beta environment
### Updated
- [Community] Migrate to updated community website
### Fixed
- [Websockets] Multiple issues related to candles refresh

## [0.4.5] - 2022-06-12
### Fixed
- [Trading modes] Stop loss are not created after instantly filled limit orders
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OctoBot [0.4.5](https://octobot.click/gh-changelog)
# OctoBot [0.4.6](https://octobot.click/gh-changelog)
[![PyPI](https://img.shields.io/pypi/v/OctoBot.svg)](https://octobot.click/gh-pypi)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e07fb190156d4efb8e7d07aaa5eff2e1)](https://app.codacy.com/gh/Drakkar-Software/OctoBot?utm_source=github.com&utm_medium=referral&utm_content=Drakkar-Software/OctoBot&utm_campaign=Badge_Grade_Dashboard)[![Downloads](https://pepy.tech/badge/octobot/month)](https://pepy.tech/project/octobot)
[![Dockerhub](https://img.shields.io/docker/pulls/drakkarsoftware/octobot.svg)](https://octobot.click/gh-dockerhub)
Expand Down Expand Up @@ -101,10 +101,6 @@ In short :

- Get 60-day free Digital Ocean hosting by registering with [OctoBot referral link](https://m.do.co/c/40c9737100b1).

[![Develop on Okteto](https://okteto.com/develop-okteto.svg)](https://octobot.click/gh-okteto-deploy)

- Free 24-hour demo repeatable indefinitely on Okteto simply using your Github account

## Exchanges
[![Binance](../assets/binance-logo.png)](https://octobot.click/gh-binance)
[![Binance](../assets/ftx-logo.png)](https://octobot.click/gh-ftx)
Expand Down Expand Up @@ -145,8 +141,4 @@ See [LICENSE](https://octobot.click/gh-license) to see the full text.
<td>Special thanks to <a href="https://m.do.co/c/40c9737100b1" target="_blank">DigitalOcean</a> for hosting OctoBot's open source tentacles and community websites.</td>
<td><a href="https://m.do.co/c/40c9737100b1" target="_blank"><p align="center"><img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/PNG/DO_Logo_Horizontal_Blue.png?utm_medium=opensource&utm_source=OctoBot"></p></a></td>
</tr>
<tr>
<td>Thanks to <a href="https://okteto.com/" target="_blank">Okteto</a> for allowing OctoBot developers to test their changes online with a simple button.</td>
<td><a href="https://okteto.com/" target="_blank"><p align="center"><img src="https://github.com/Drakkar-Software/OctoBot/blob/assets/okteto.png?raw=true"></p></a></td>
</tr>
</table>
4 changes: 2 additions & 2 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pytest>=6.1.1
pytest>=7.1
pytest-asyncio>=0.19
pytest-cov
pytest-asyncio==0.18.3
pytest-timeout

mock>=4.0.1
Expand Down
2 changes: 1 addition & 1 deletion octobot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/api/backtesting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/api/strategy_optimizer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/api/updater.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/backtesting/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/backtesting/abstract_backtesting_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
6 changes: 4 additions & 2 deletions octobot/backtesting/independent_backtesting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -370,7 +370,9 @@ def _find_reference_market(self):
self.logger.error(f"Mixed inverse and linear contracts backtesting are not supported yet")
self.octobot_backtesting.futures_contract_type = trading_enums.FutureContractType.LINEAR_PERPETUAL
# in inverse contracts, use BTC for BTC/USD trading as reference market
return symbol.settlement_asset
if symbol.settlement_asset:
# only use settlement asset if available
return symbol.settlement_asset
for symbol in symbols:
quote = symbol.quote
if ref_market_candidate is None:
Expand Down
2 changes: 1 addition & 1 deletion octobot/backtesting/octobot_backtesting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/channels/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion octobot/channels/octobot_channel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable=E0203
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down
5 changes: 4 additions & 1 deletion octobot/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -203,6 +203,9 @@ def start_octobot(args):
# add args to config
update_config_with_args(args, config, logger)

# switch environments if necessary
octobot_community.IdentifiersProvider.use_environment_from_config(config)

# show terms
_log_terms_if_unaccepted(config, logger)

Expand Down
18 changes: 7 additions & 11 deletions octobot/commands.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -118,16 +118,12 @@ async def install_all_tentacles(tentacles_url=None):
if tentacles_url is None:
tentacles_url = configuration_manager.get_default_tentacles_url()
async with aiohttp.ClientSession() as aiohttp_session:
await tentacles_manager_api.install_all_tentacles(tentacles_url,
aiohttp_session=aiohttp_session,
bot_install_dir=os.getcwd())
# compiled_tentacles_url = tentacles_manager_api.get_compiled_tentacles_url(
# constants.DEFAULT_COMPILED_TENTACLES_URL,
# constants.TENTACLES_REQUIRED_VERSION
# )
# await tentacles_manager_api.install_all_tentacles(compiled_tentacles_url,
# aiohttp_session=aiohttp_session,
# bot_install_dir=constants.OCTOBOT_FOLDER)
for url in (tentacles_url, constants.ADDITIONAL_TENTACLES_PACKAGE_URL):
if url is None:
continue
await tentacles_manager_api.install_all_tentacles(url,
aiohttp_session=aiohttp_session,
bot_install_dir=os.getcwd())


def _signal_handler(_, __):
Expand Down
41 changes: 37 additions & 4 deletions octobot/community/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot)
# Copyright (c) 2021 Drakkar-Software, All rights reserved.
# Copyright (c) 2022 Drakkar-Software, All rights reserved.
#
# OctoBot is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -14,6 +14,19 @@
# You should have received a copy of the GNU General Public
# License along with OctoBot. If not, see <https://www.gnu.org/licenses/>.

from octobot.community import errors
from octobot.community.errors import (
RequestError,
StatusCodeRequestError,
)
from octobot.community import identifiers_provider
from octobot.community.identifiers_provider import (
IdentifiersProvider,
)
from octobot.community import community_user_account
from octobot.community.community_user_account import (
CommunityUserAccount,
)
from octobot.community import community_fields
from octobot.community.community_fields import (
CommunityFields,
Expand All @@ -25,7 +38,8 @@
from octobot.community import community_tentacles_package
from octobot.community import community_supports
from octobot.community import community_donation
from octobot.community import community_feed
from octobot.community import graphql_requests
from octobot.community import feeds
from octobot.community import errors_upload

from octobot.community.community_analysis import (
Expand All @@ -48,8 +62,16 @@
from octobot.community.community_donation import (
CommunityDonation
)
from octobot.community.community_feed import (
CommunityFeed
from octobot.community.graphql_requests import (
create_new_device_query,
select_device,
select_devices,
)
from octobot.community.feeds import (
AbstractFeed,
CommunityWSFeed,
CommunityMQTTFeed,
community_feed_factory,
)
from octobot.community.errors_upload import (
register_error_uploader,
Expand All @@ -58,6 +80,10 @@
)

__all__ = [
"RequestError",
"StatusCodeRequestError",
"IdentifiersProvider",
"CommunityUserAccount",
"CommunityFields",
"get_community_metrics",
"get_current_octobots_stats",
Expand All @@ -70,4 +96,11 @@
"register_error_uploader",
"Error",
"ErrorsUploader",
"create_new_device_query",
"select_device",
"select_devices",
"AbstractFeed",
"CommunityWSFeed",
"CommunityMQTTFeed",
"community_feed_factory",
]
Loading