jtseven / fundless Goto Github PK
View Code? Open in Web Editor NEWCrypto index fund bot with web interface and telegram messaging bot
License: GNU General Public License v3.0
Crypto index fund bot with web interface and telegram messaging bot
License: GNU General Public License v3.0
In GitLab by @joschka.theissen on Jan 17, 2022, 13:51
The tooltips with coin names on the savings plan allocation bar chart on the savings plan page are messed adding or removing coins from the index. They only look correct after reloading the page.
In GitLab by @joschka.theissen on Dec 13, 2021, 13:15
The bot should be able to automatically move coins from the exchange into a defined wallet for arbitrary cryptos.
This could for example happen based on a defined threshold value of the current on-exchange holdings.
Errors should be logged to a predefined file additional to stdout
In GitLab by @joschka.theissen on May 28, 2021, 13:51
Right now errors, debug, and info messages are only printed to the console.
Introduce proper logging to console and log file.
In GitLab by @joschka.theissen on Aug 16, 2021, 12:59
Some methods better fit to the newly introduces analytics module but currently are implemented within the trading module.
The analytics module also own the local trade history stored in trades.csv, wich should be used instead of fetching trades from the exchange.
Following methods should be moved:
In GitLab by @joschka.theissen on Dec 18, 2021, 15:14
Related to #21
Add a csv file to store transfers between exchanges or wallets. Fees for these transfers are stored in the transfers.csv as well.
E.g. ORM objects of sqlalchemy
Fix this deprecation warning within the messages module:
Setting custom attributes such as 'next_state' on objects such as 'StateChangeUpdate' of the PTB library is deprecated.
In GitLab by @joschka.theissen on Dec 9, 2021, 12:53
Generate a report of each savings plan execution similar to order report pdfs of classic brokers.
A function could be added to the open source pdf parser of Parqet (Tresor One) to parse the transactions into their portfolio tracking as soon as they support crypto.
In GitLab by @joschka.theissen on Sep 25, 2021, 11:20
In GitLab by @joschka.theissen on Jan 5, 2022, 12:40
There is a (probably) threading related issue with the order checking job after placing savings plan orders with the telegram bot.
fundless_1 | 2022-01-05 12:36:21 7517b7e7f96f apscheduler.scheduler[1] ERROR Error submitting job "check_orders (trigger: date[2022-01-05 11:36:21 UTC], next run at: 2022-01-05 11:36:21 UTC)" to executor "default" fundless_1 | Traceback (most recent call last): fundless_1 | File "/usr/local/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 974, in _process_jobs fundless_1 | executor.submit_job(job, run_times) fundless_1 | File "/usr/local/lib/python3.9/site-packages/apscheduler/executors/base.py", line 71, in submit_job fundless_1 | self._do_submit_job(job, run_times) fundless_1 | File "/usr/local/lib/python3.9/site-packages/apscheduler/executors/pool.py", line 22, in _do_submit_job fundless_1 | f = self._pool.submit(run_job, job, job._jobstore_alias, run_times, self._logger.name) fundless_1 | File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 169, in submit fundless_1 | raise RuntimeError('cannot schedule new futures after ' fundless_1 | RuntimeError: cannot schedule new futures after interpreter shutdown fundless_1 | 2022-01-05 12:36:21 7517b7e7f96f apscheduler.scheduler[1] INFO Removed job 53ac671d053e45aeb211798264448f71
In GitLab by @joschka.theissen on Aug 16, 2021, 12:55
Right now online the allocation chart is computed based on the local trades history. Index balance should also be using the local trade history to only consider trades done by the bot.
The balance method should be moved from the trading module to the analytics module, as the analytics module controls the trades.csv file
In GitLab by @joschka.theissen on May 28, 2021, 13:50
Adjust saving plan buy order weighting with current portfolio tracking error.
In GitLab by @joschka.theissen on Sep 23, 2021, 13:27
Use nivo charts instead of Plotly charts as they are more responsive, nicer and fit better to a chosen bootstrap theme.
In GitLab by @joschka.theissen on Nov 25, 2021, 16:54
The recent rebranding of the ticker of Nano from 'nano' to 'xno' did lead to problems.
This needs to be supported, probably rebrandings could be gathered from coin gecko or other sources.
The existing ticker in all files then has to be updated to the new one.
In GitLab by @joschka.theissen on Sep 23, 2021, 13:28
A bug has shown, that the message bot is stuck in a wrong state when asking for savings plan execution. The user is not able to continue the chat flow in that case.
In GitLab by @lennart.reiher on Aug 7, 2021, 13:44
Limit orders not necessarily go through directly. Although the orders are repeatedly checked for completion, I did not yet find a way of cleanly cancelling orders. If the orders are manually cancelled on the exchange, this is recognized by the bot, but the bot will remain in its order-checking mode.
2022-02-13 15:28:47 Joschkas-MacBook-Pro-2021.fritz.box analytics[16825] ERROR 1 validation error for AddTrade
id
str type expected (type=type_error.str)
In GitLab by @lennart.reiher on Aug 7, 2021, 13:37
I would like to have the option of setting a custom weighting. See below for how this could be configured.
Thoughts:
portfolio:
mode:
options:
- cherry_pick
- index # not yet implemented
selected: cherry_pick
cherry_pick:
symbols: # as defined by coingecko
- btc
- eth
index:
top_n: 10
exclude_symbols: [xrp] # probably a good idea to exclude stable coins
weighting:
options:
- equal
- custom # <----------
- market_cap
- sqrt_market_cap # square root of market cap
- cbrt_market_cap # cubic root
- sqrt_sqrt_market_cap # fourth root
selected: custom # <----------
custom: # <----------
btc: 0.3 # <----------
eth: 0.7 # <----------
Support the export of trades into a csv file that can be uploaded to Parqet:
Parqet csv format
In GitLab by @joschka.theissen on Aug 8, 2021, 13:03
Implement a telegram bot command to update the config parameters from the config.yaml file. Right now a restart of the python script is needed, to update config parameters.
It should be possible to let the savings plan execute without the need of confirmation via telegram.
In that case, the bot should only send an order confirmation or a warning in case of any problems via telegram.
Checking for the minimal order volume should be skipped, if the order volume is 0.0 anyways.
When the number of trades becomes large, it might introduce performance issues to show all trade cards on the trades view in the web dashboard. A limited number of cards should be loaded on page load, and further cards might be loaded when scrolling to the end of the page or by clicking a button to view more cards.
In GitLab by @joschka.theissen on Nov 1, 2021, 14:51
After about 10 days of running the dashboard the history charts do not work when set to 'since buy' range.
Daily, weekly and monthly views still work.
In GitLab by @joschka.theissen on Aug 16, 2021, 13:02
Currencies should be converted if they do not match each other.
E.g. base_currency EUR and base_symbol BUSD should be buying the index with BUSD but giving all numbers in the telegram bot and in the config in euro amounts.
In GitLab by @joschka.theissen on Dec 18, 2021, 15:40
The exchange used for the corresponding order should be tracked in the trades.csv
In GitLab by @joschka.theissen on May 28, 2021, 13:59
The minimum order volume on Binance is $10 for all coins. This is too high for smaller savings plans with high coin diversification (e.g. $50 each month with 20 different coins).
Add some logic (e.g. skipping some coins each execution and therefore higher volume on next execution) to still allow small volume savings plans.
In GitLab by @joschka.theissen on May 28, 2021, 13:54
Add a performance overview command '/performance' to the telegram bot.
This needs either access to a local database with trades or fetch the trades from exchanges.
Difficulty with fetching trades from exchanges is the distinguishing between trades done by the index bot and trades done by the user.
โ Either store order IDs for orders belonging to the bot locally or store all trade data locally
In GitLab by @joschka.theissen on Nov 3, 2021, 11:02
Right now the value history computation can not handle the time change for dst:
File "/code/fundless/main.py", line 54, in <module> fundless_1 | dashboard = Dashboard(config, analytics) fundless_1 | File "/code/fundless/dashboard_app.py", line 97, in __init__ fundless_1 | self.history_chart = self.analytics.value_history_chart(title=False) fundless_1 | File "/code/fundless/analytics.py", line 420, in value_history_chart fundless_1 | value, invested = self.compute_value_history(from_timestamp=from_timestamp) fundless_1 | File "/code/fundless/analytics.py", line 393, in compute_value_history fundless_1 | price_history = price_history.asfreq(freq=freq, method='pad')
pytz.exceptions.AmbiguousTimeError: Cannot infer dst time from 2021-10-31 02:00:00, try using the 'ambiguous' argument
Seemingly randomly, the savings plan might be double executed sometimes
In GitLab by @joschka.theissen on Dec 12, 2021, 18:21
The complete web app is always reloading if a different menu is selected in the sidebar. Only the view of the menu should change without reloading the page.
In GitLab by @joschka.theissen on Dec 19, 2021, 22:12
Currently the different types of currencies are named confusingly (and wrong)
Coin/currency to buy the index coins:
Coin that is in the index and being bought by the bot:
Coin/currency that is used to denote profit/losses and that is shown in the dashboard
In GitLab by @joschka.theissen on Dec 13, 2021, 13:13
E.g. when moving the portfolio to a different exchange or transferring coins into cold storage the bot has to account for transaction fees and deduct them from the holdings.
A coin that is in the holdings should always be shown in the main index coin selection and not be moved into the dropdown list when deselected.
Since a recent bump of the pandas version a lot of deprecation warnings came up and are spamming the log.
pad is deprecated and will be removed in a future version. Use ffill instead.
The parsing of 'now' in pd.to_datetime without
utc=True is deprecated. In a future version, this will match Timestamp('now') and Timestamp.now()
The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
โ Adjust the code according to the guidelines on these deprecations in the pandas release notes
In GitLab by @joschka.theissen on Aug 7, 2021, 14:45
Right now, online coins that are currently in the index are considered in the performance computation.
All coins, that are in the trades.csv file should be considered for performance computation, even if they are not mentioned in the config anymore.
In GitLab by @joschka.theissen on Jan 11, 2022, 13:27
Use https://github.com/stewartlord/identicon.js to generate a user's identicon.
In GitLab by @joschka.theissen on Jan 5, 2022, 12:54
Save the exchange of the order to order_ids.csv file and use the correct exchange when fetching an order that is missing in trades.csv
In GitLab by @joschka.theissen on Jan 16, 2022, 23:15
When initiating an exchange the support of all used methods should be checked with ccxt.
This makes it easier to adapt new exchanges and prevent errors when adding newly supported exchanges.
In GitLab by @joschka.theissen on Sep 23, 2021, 13:25
Shown components (e.g. portfolio value, performance) could be updated via websockets instead of pulling new data with an interval.
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.pro.coinbase.com/products/XRP-EUR/ticker
ccxt.base.errors.ExchangeError: coinbasepro Not allowed for delisted products
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.