1305 lines
48 KiB
Plaintext
Executable File
1305 lines
48 KiB
Plaintext
Executable File
2025.06.04:
|
|
. Added "base_add_calculation" endpoint: Calculates how many safety orders can be added with the amount of base currency available on the exchange.
|
|
|
|
2025.05.31:
|
|
. Added "liquidate after switch": Once the short trader is ready to switch to long, it liquidates the base currency and shuts down the trader.
|
|
|
|
2025.05.27:
|
|
. Commented out parameter validation in config and status handlers.
|
|
|
|
2025.05.26:
|
|
. Added closed order request wrappers in exchange_wrapper.
|
|
. In check_status: autoswitch prior to order check.
|
|
|
|
2025.05.18:
|
|
. In start_trader, missing base is calculated using amount_to_precision.
|
|
|
|
2025.05.16:
|
|
. Added exception handling when removing a trader.
|
|
. Minor variable renaming.
|
|
|
|
2025.05.12:
|
|
. Improved config file handling when switching to long or short.
|
|
. If the config file does not exist, it creates it.
|
|
|
|
2025.05.05:
|
|
. Forced Telegram message when quit flag is raised.
|
|
|
|
2025.05.04:
|
|
. Simplified unwrapped_add_pair.
|
|
|
|
2025.04.10:
|
|
. Modified Gate.io min_base_size.
|
|
|
|
2025.04.09:
|
|
. Modified default retries to 5.
|
|
|
|
2025.04.08:
|
|
. Updated Binance, KuCoin and Gate.io min_base_size.
|
|
|
|
2025.04.04:
|
|
. Added validate_market method to the broker object.
|
|
|
|
2025.03.29:
|
|
. Enabling last_call disables autoswitch.
|
|
|
|
2025.03.19:
|
|
. Added the possibility to force specific orders when importing a trader.
|
|
|
|
2025.03.07:
|
|
. Error fix in take_profit_routine.
|
|
|
|
2025.03.04:
|
|
. Error fix in add_quote.
|
|
. Error fix in last_call.
|
|
. Fixed a bug in switch_quote_currency that prevented the new config and status files to be written to disk.
|
|
|
|
2025.03.03:
|
|
. Replaced more variables with their respective config handlers.
|
|
. Added a new API endpoint: reload_trader_config.
|
|
. Removed the config reloading when a trader closes a deal.
|
|
|
|
2025.03.02:
|
|
. Fixed an error in restart_pair_no_json()
|
|
|
|
2025.03.01:
|
|
. StatusHandler initial implementation.
|
|
. Variable cleanup
|
|
|
|
2025.02.27
|
|
. ConfigHandler: centralized configuration handling in an object, for easier future development (parameter validation, for example)
|
|
. Bugfixes everywhere.
|
|
. Exchange_wrapper now validates every symbol against the market information from the exchange, both when adding and importing a trader.
|
|
|
|
2025.02.02:
|
|
. new_so_routine now cancels the old take profit order after the new safety order is sent.
|
|
|
|
2025.01.31:
|
|
. In check_status, when safety order = None it does not return 1 anymore.
|
|
|
|
2025.01.10:
|
|
. Added is_paused to status_dict.
|
|
|
|
2024.12.14:
|
|
. Modified waitress parameters.
|
|
|
|
2024.12.07:
|
|
. Switch to a proper WSGI server (waitress)
|
|
|
|
2024.12.04:
|
|
. Proper missing bak file handling on switch_to_long.
|
|
|
|
2024.12.02:
|
|
. New endpoint: /get_balance.
|
|
|
|
2024.12.01:
|
|
. Added "generated_at" entry: When generating a config file, the generated timestamp is saved in the config file.
|
|
. If the switch price is lower than the next SO price, it displays it in green instead of the next SO price.
|
|
|
|
2024.11.30:
|
|
. Added "forced_restart_if_retries_exhasted" option to the config file of a trader. If set to true, the trader will always restart if the first order of the deal
|
|
does not fill. Default behavior is one restart only. It is recommended to set this to false, unless there is a specific combination of pair/exchange with too high
|
|
volatility/underperfoming market order matching engine that requires a forced restart.
|
|
|
|
2024.11.26:
|
|
. Implemented deals cache to reduce db load until the new database service is implemented.
|
|
. Added a new API endpoint: /get_deals_cache.
|
|
. Combined daly/monthly API endpoint added to statistics_server: /combined_totals.
|
|
|
|
2024.11.25:
|
|
. Implemented a short log list: In order to avoid constant log file queries, a list of the last few log entries is stored in memory and it's returned
|
|
via /get_log_list API endpoint.
|
|
|
|
2024.11.17:
|
|
. The trader is supplied with a complete open order list, instead of only the ids.
|
|
. Removed sum_filled_amounts, it was only called once.
|
|
|
|
2024.11.13:
|
|
. Fixed bug handling timestamps.
|
|
. Added a couple of pauses for OKX.
|
|
|
|
2024.11.11:
|
|
. Refactored boost check to optimize CPU usage.
|
|
|
|
2024.11.10:
|
|
. Removed a double-summing bug in new_so_routine.
|
|
|
|
2024.11.09:
|
|
. Removed multiplier modifier added in 0.12d, since it was not needed anymore.
|
|
. Minor refactor in take_profit_routine
|
|
|
|
2024.11.08:
|
|
. Added boosted take profit level: If the trader is actively closing deals, the expected profit level is raised by x%.
|
|
Defaults are: Four deals in one hour, 1% raise.
|
|
|
|
2024.11.06b:
|
|
. Added /switch_to_long_price endpoint: It displays the price at which the automatic switch_to_long routine is triggered.
|
|
|
|
2024.11.06:
|
|
. Optimized the conditionals that lead to switch_to_long.
|
|
|
|
2024.10.31:
|
|
. Added an option to set the wait time before sending a new safety order.
|
|
. Added a per-trader option to enable or disable slippage checks.
|
|
|
|
2024.10.30:
|
|
. Changes trying to catch the wrong base amount bug.
|
|
. Simplified new_market_order code.
|
|
. Changed the amount to cleanup after the trader starts as a workaround for the wrong base bug. It seems that Gate.io is not "freeing the funds" quick enough after some order fills.
|
|
|
|
2024.10.29:
|
|
. New functions to get top ask and top bid prices.
|
|
. Improvements when dealing with shallow orderbooks.
|
|
. Removed unnecessary status file writes to disk.
|
|
|
|
2024.10.28:
|
|
. Docstrings and comments improvements.
|
|
. New endpoint: /edit_cooldown_multiplier.
|
|
|
|
2024.10.25:
|
|
. Modified some strings.
|
|
|
|
2024.10.20:
|
|
. Insted of querying the average fill on the initial order, now the initial price is calculated using total_quote/total_base.
|
|
. Using create_market_buy_order_with_cost with Gate.io (Because there may be a bug when generating simulated market buy orders.)
|
|
|
|
2024.10.18:
|
|
. Improved slippage behavior in take_profit_routine.
|
|
|
|
2024.10.01:
|
|
. Improvements when checking for liquidity and restarting the bot because of lack of.
|
|
|
|
2024.09.27:
|
|
. Modified some strings.
|
|
|
|
2024.09.25:
|
|
. Optimized Binance's open orders fetching routine (Be sure to keep Binance's lap time >= 2 seconds to avoid hitting API limits, increase if banned.)
|
|
Every fetch_open_orders call have a weight of 80, you have 6000/minute available, the rest of the exchanges don't give a damn.
|
|
|
|
2024.09.24:
|
|
. Optimized Binance's price fetch routine.
|
|
|
|
2024.08.26:
|
|
. In check_status, if the safety order is none, it assigns it an empty order.
|
|
|
|
2024.08.15:
|
|
. Removed "paused_pairs" list and endpoints and added "paused_traders" to global_status.
|
|
. Switched "trader will be paused" and "trader will be resumed" strings.
|
|
|
|
2024.08.14:
|
|
. Added automatic status file backup.
|
|
|
|
2024.08.11:
|
|
. Removed some unnecessary variable clearings in unwrapped_switch_to_short.
|
|
|
|
2024.08.07a:
|
|
. Added an extra confirmation prior to starting the instance.
|
|
. Added percentage to switch to long.
|
|
|
|
2024.08.07:
|
|
. Added extra exception handling code to update_status to catch an annoying bug.
|
|
|
|
2024.08.05d:
|
|
. Minor wrap up.
|
|
|
|
2024.08.05c:
|
|
. Further optimizations of previous point.
|
|
|
|
2024.08.05b:
|
|
. In new_limit_order and market orders, returns a get_order(new_order) instead of directly what the endpoint returns.
|
|
|
|
2024.08.05:
|
|
. Changes in market and simulated_market orders to mitigate Kucoin "order does not exist" error.
|
|
|
|
2024.08.04:
|
|
. Now both exceptions in update_status write to log.
|
|
|
|
2024.07.21:
|
|
. In a short trader, if the take profit price is bigger than the old_long price, it displays it in bright green.
|
|
|
|
2024.07.17:
|
|
. Reverted previous change: It was ugly.
|
|
|
|
2024.07.15:
|
|
. Added long/short trader amount to status bar.
|
|
|
|
2024.07.08:
|
|
. Added tp order and safety order to the status dict.
|
|
|
|
2024.07.07:
|
|
. Extended dynamic_so_deviance to include short traders.
|
|
. Implemented clip_value()
|
|
. The order of the traders on screen is now shorts first.
|
|
|
|
2024.07.03:
|
|
. Bias implemented (Safety order price variation)
|
|
|
|
2024.07.01:
|
|
. Small list comprehension refactor in load_keys_from_db.
|
|
. Now it rewrites the config file as soon as a new pair is imported.
|
|
|
|
2024.06.24:
|
|
. Fixed a small bug in generate_status_strings.
|
|
|
|
2024.06.23:
|
|
. Added a flag to /view_old_long endpoint, if true it will load the old_long data from the old_long file, else it will display it from the status dict.
|
|
. After switching to short, last_call is cancelled.
|
|
|
|
2024.06.10:
|
|
. New API endpoint: /reload_safety_order.
|
|
|
|
2024.06.06:
|
|
. Splash screen now has its own function.
|
|
. Implemented max_short_safety_orders: default safety order value for short traders. Default is 45, can be overriden in config_dict by setting "max_short_safety_orders" key.
|
|
|
|
2024.06.05:
|
|
. More docstring edits, type checking and type hints :D
|
|
|
|
2024.06.04:
|
|
. Refactoring in new_limit_order.
|
|
. Added some docstrings.
|
|
|
|
2024.06.03:
|
|
. Added some type-checking code to linear_space.
|
|
. Now it forces a Telegram notification when a trader is paused because of exceeded retries limit.
|
|
|
|
2024.05.31:
|
|
. Small change in import_trader: Now it loads no_of_safety_orders prior to loading the orders.
|
|
. Now it does not takes into account a partial SO fill in take_profit_routine.
|
|
|
|
2024.05.26:
|
|
. Exchange name is now displayed in bright white (where available).
|
|
. When the old take profit order is partially filled, the log entry now includes the order id.
|
|
. Added paused_traders endpoint
|
|
. Initial refactor of import_trader: No longer a class, simplified it as a function.
|
|
. Added some type-checking code to the unwrapped API functions.
|
|
|
|
2024.05.24:
|
|
. Now the trader calculates minimum_order_size_allowed with a simplified ceil statement.
|
|
|
|
2024.05.23:
|
|
. Changed Kucoin minimum_quote_size calculation.
|
|
|
|
2024.05.22:
|
|
. "There is no safety order to cancel" message no longer gets into log file.
|
|
. Cooldown between trades reduced to 2s.
|
|
|
|
2024.05.21:
|
|
. Now it removes old_long file when switching to long.
|
|
|
|
2024.05.20:
|
|
. Added "view_old_long" endpoint.
|
|
|
|
2024.05.18:
|
|
. Added all_markets method to broker. It returns a dictionary of all the markets of the exchange.
|
|
. In the add_pair endpoint, now it checks first if the market exists and if it's active prior to trying to start the trader.
|
|
. Added no_retries flag to several methods in broker class.
|
|
|
|
2024.05.17:
|
|
. Removed unused offline_workers references.
|
|
. Enabled autoswitch when safety orders are exhausted.
|
|
|
|
2024.05.16:
|
|
. Removed SSL implementation and rate limiter, that tasks will be handled by Nginx from now on.
|
|
. Removed wraps, refactored api-key implementation.
|
|
. Fixed a small bug in check_duplicate_profit_in_db that ocurred when a trading pair got its first profit.
|
|
|
|
2024.05.15:
|
|
. Removed CORS (not needed anymore) and added a simple rate limiter. If memory leak continues, try waitress.
|
|
. Partial profits partially implemented:
|
|
. When a take profit order is partially filled and later a new safety order is sent, the profit of that operation was not taken into account
|
|
when calculating the total profit at deal close.
|
|
. Only for long traders, at least for the time being.
|
|
. Joint-code, test later.
|
|
|
|
2024.05.14:
|
|
. When adding quote, status_dict wasn't saved to disk, so if an interruption ocurred the old take profit order id remained in the status dictionary.
|
|
|
|
2024.05.12:
|
|
. Initial implementation of API refactoring.
|
|
. Changed name of main file from dca_runtime_wAPI.py to main.py.
|
|
|
|
2024.05.09:
|
|
. Minor refactoring in calculate_safety_prices, with sample code of future changes.
|
|
|
|
2024.04.30:
|
|
. screen_buffer is now global, for future API access.
|
|
|
|
2024.04.29:
|
|
. Implemented check_for_duplicate_profit_in_db()
|
|
|
|
2024.04.28:
|
|
. Minor refactoring when removing keys from the status dictionary.
|
|
|
|
2024.04.26:
|
|
. Unwrapped all API calls to prepare for migration to new API.
|
|
|
|
2024.04.25:
|
|
. Added even more pause descriptors and exceptions (hunting pause bug only present on testnet)
|
|
|
|
2024.04.24:
|
|
. Added a few more pause descriptors
|
|
|
|
2024.04.23:
|
|
. Initial screen_buffer implementation.
|
|
|
|
2024.04.20:
|
|
. Small detail on draw_line.
|
|
|
|
2024.04.17:
|
|
. Removed newly unused telegram_bot_sendmessage() from broker.
|
|
|
|
2024.04.16:
|
|
. Changed some variable names in profit_to_db.
|
|
|
|
2024.04.15:
|
|
. Added get_write_order_history in broker.
|
|
|
|
2024.04.14:
|
|
. Fixed bug while toggling Telegram notifications.
|
|
|
|
2024.04.13:
|
|
. Consolidation of profit_db changes.
|
|
|
|
2024.04.12:
|
|
. The exception that occurs when there is an error writing status file does not add an entry to the log.
|
|
|
|
2024.04.11:
|
|
. Initial implementation of profit_to_db.
|
|
|
|
2024.04.10a:
|
|
. Moved get_min_base_size, get_min_quote_size and get_step_size to broker.
|
|
|
|
2024.04.10:
|
|
. Changed a conditional in return_status.
|
|
. Changed min_base_size calculation for Kucoin.
|
|
|
|
2024.04.09:
|
|
. Removed market from status_dict. Since market() calls on CCXT are local, it does not make any sense to cache them.
|
|
. Added deal_order_history to the status_dict, which will be saved in a future implementation of profit_db.
|
|
|
|
2024.04.08:
|
|
. In new_limit_order: replaced tries<self.retries//2 with tries<=self.retries//2
|
|
. Undid global populate_prices_dict, bugs with gate.io
|
|
|
|
2024.04.06:
|
|
. Refactored seconds_to_time, it's a bit more readable now and it makes use of datetime, already imported.
|
|
. Commented out acc_profit. There's no point on keeping that variable floating around.
|
|
. Moved duster class to its own file. It's not a development priority right now.
|
|
|
|
2024.04.05:
|
|
. Prices are now global, threaded in parallel to main_loop.
|
|
|
|
2024.04.04:
|
|
. When removing a pair via the quit flag, the key was not removed from the worker status dictionary. Now it does get removed.
|
|
|
|
2024.04.01a:
|
|
. Commented out a couple of lines that attempted to remove a trader two times if the last_call flag was raised (in take_profit_routine)
|
|
|
|
2024.04.01:
|
|
. Cancelled implementation of Binance's fees due to some bug that might be present on amount_to_precision routine (11.988 MAV rounded to 11.000)
|
|
|
|
2024.03.31:
|
|
. Implementation of Binance's fees.
|
|
. Refactored check_for_duplicate_profit.
|
|
|
|
2024.03.30:
|
|
. Edited adjust_base notification.
|
|
. Some small fee handling modifications.
|
|
. In new_limit_order: replaced tries<self.retries/2 with tries<self.retries//2
|
|
|
|
2024.03.29:
|
|
. Modified retries in new_limit_order: it cuts retries in half when the error is because of insufficient funds.
|
|
. Removed calculate_fees flag. It now always takes fees into account (if possible)
|
|
. Added an API endpoint to toggle Telegram notifications.
|
|
. Removed some Huobi workarounds, since there are no plans on supporting back that exchange.
|
|
. Added the order id to the "old safety order partially filled" notification when closing a trade.
|
|
. Added commented-out code to deal with partially filled safety orders when closing a trade.
|
|
. "Due to exchange..." message now only goes to logs, no more Telegram message.
|
|
|
|
2024.03.28:
|
|
. Modified new_limit_order log entry on error.
|
|
. Added an extra conditional when calling do_cleanup.
|
|
. new_so_routine==2 signals restart now.
|
|
. Removed negative_trades logs. Improvements ahead.
|
|
. Added a log entry when old safety order is partially filled.
|
|
|
|
2024.03.27:
|
|
. Telegram bug addressed.
|
|
. Refactors when sending a new safety order.
|
|
. Refactors when cancelling orders.
|
|
. Cleanup reverted to half of the available funds.
|
|
|
|
2024.03.26b:
|
|
. For debug purposes, when negative profit, it saves the trade detail in a file.
|
|
. Removed timestamp from Telegram notifications and added the exchange name.
|
|
|
|
2024.03.26:
|
|
. Unified cooldown amount for all exchanges.
|
|
. In new_so_routine, now it first cancels the take profit order.
|
|
|
|
2024.03.25:
|
|
. Further advances implementing global logger.
|
|
. Added an onscreen notification when cooldown period starts and ends.
|
|
. Now it sends a Telegram notification when the initial order size is changed.
|
|
|
|
2024.03.24:
|
|
. Minor code cleanup.
|
|
. Added another log entry when the old tp order is partially filled.
|
|
|
|
2024.03.22:
|
|
. Added another half a second cooldown while restarting pairs on Gate.io
|
|
. In take_profit_routine, if start_bot returns something other than [0,1,2,3], raises the quit flag.
|
|
. Removed show_info and its corresponding API endpoints.
|
|
. Streamlined return_status()
|
|
. Initial sketching of dusters.
|
|
|
|
2024.03.21a:
|
|
. Streamlined trader restart when the market order does not fill (sometimes that is the case while simulating a market order).
|
|
|
|
2024.03.21:
|
|
. Added another half a second while restarting the pair.
|
|
. If the exchange is Gate.io, another second is added (lowish liquidity exchange)
|
|
|
|
2024.03.20:
|
|
. Advances implementing global logger.
|
|
. Added another second while restarting the pair.
|
|
. Added exception handling to get_mid_price.
|
|
|
|
2024.03.19:
|
|
. In take_profit_routine, added exception handling when checking the slippage.
|
|
. Partial implementation of global logger.
|
|
. Rolled back changes in get_step_size due to performance issues:
|
|
* The calculation takes a lot of time when the step size is too small.
|
|
* Now it defaults to 1/10th of the minimum order size.
|
|
|
|
2024.03.18:
|
|
. Changed get_single_price to the more correct denomination get_ticker_price.
|
|
. Change method when querying for price when checking for slippage restarting the trader.
|
|
. Removed old code in return_optimal_order_size.
|
|
. Removed a useless amount_to_precision call while starting a short trader.
|
|
|
|
2024.03.17a:
|
|
. Default order size is now a configuration in the broker config file and is handled at broker level.
|
|
. Implemented get_step_size.
|
|
|
|
2024.03.17:
|
|
. Added a pause while restarting the pair if slippage is too big.
|
|
|
|
2024.03.15:
|
|
. Moved Telegram messaging to broker.
|
|
. Moved slippage_default_threshold to broker.
|
|
|
|
2024.03.14:
|
|
. Set reload flag to true in load_markets call.
|
|
. Modified reload_markets.
|
|
. Added hourly market reload.
|
|
. Removed almost all offline_pairs. Only a key in the status dictionary remains.
|
|
|
|
2024.03.13:
|
|
. Added type checking code in return_status.
|
|
|
|
2024.03.12:
|
|
. Changed restart logic when slippage threshold is exceeded.
|
|
. Added a pause between exceeded slippage retries.
|
|
. Changed handling of a few zero division errors.
|
|
|
|
2024.03.11:
|
|
. Added color to percentages.
|
|
. Fixed a small bug in get_min_base_size.
|
|
|
|
2024.03.10:
|
|
. Removed unnecessary calls to amount_to_precision.
|
|
. Added broker method "cost_to_precision".
|
|
. Added necessary calls to cost_to_precision.
|
|
|
|
2024.03.09:
|
|
. safety_order_index reset now on the beginning of start_bot.
|
|
|
|
2024.03.08:
|
|
. Limit imposed in automatic order size: no more than 2x the value configured on the trader configuration file.
|
|
Some trading pairs go parabolic, this safeguard is to avoid getting a lot of funds caught on a bad trade.
|
|
|
|
2024.03.06:
|
|
. If order_size is too small, it updates it with the minimum_order_size+1 that the exchange enforces.
|
|
. Updated Telegram message logic.
|
|
. Added a 5 seconds timeout to the Telegram message requests.
|
|
. Old code cleanup.
|
|
|
|
2024.03.05c:
|
|
. Cut cancel_order retries in half.
|
|
|
|
2024.03.05b:
|
|
. Added error handling specifically when there is an error writing the status file to disk.
|
|
|
|
2024.03.05:
|
|
. Fixed a wrong key value in global_status
|
|
|
|
2024.03.04:
|
|
. Added ASCII art logo at the beginning.
|
|
. Fixed a rogue Telegram message while switching to long.
|
|
. Added CCXT's version to global status and to the main screen output.
|
|
. Streamlined slippage check logic.
|
|
. Increased send_new_tp_order retries.
|
|
. Modified some strings.
|
|
|
|
2024.03.03:
|
|
. Updated Gate.io minimum order size calculation (yet again)
|
|
|
|
2024.03.02:
|
|
. Changed version numbers: Now "last date of modification" is used as version.
|
|
. Slippage check implemented.
|
|
. Changed initialization parameters: Import mode is now default, for initialization use --first_start.
|
|
. Modified a few strings.
|
|
. In restart_pair, the trader is paused before closing the orders and restarting, avoiding new safety orders to be sent in the meantime.
|
|
. Retries sending a new take profit order cut in half.
|
|
. Changed default order size from 6 to 7.
|
|
. Removed "Ignore empty safety order warnings" feature.
|
|
. Updated Gate.io minimum order size calculation.
|
|
. Cut retries in half when simulating market orders.
|
|
. Removed hardcoded attempt_to_restart flag at startup.
|
|
. Added a notice when there is a future last_deal programmed.
|
|
. Reduced exchange timeout to 10000ms.
|
|
. Modified OKX API connection (updated name on new CCXT version)
|
|
. Added reload_markets method to broker object.
|
|
. Added reload_markets endpoint.
|
|
. Added load_old_long endpoint.
|
|
. Minor refactoring of start up routine.
|
|
|
|
0.14m:
|
|
. Reverted Binance's changes.
|
|
|
|
0.14l:
|
|
. Modified profit notification formatting.
|
|
. Added a specific log line when profit is negative.
|
|
. Added a Telegram notification when removing a pair.
|
|
. Changed Binance's min_base_size to allow more changüí.
|
|
|
|
0.14k:
|
|
. Changed default order size from 5 to 6.
|
|
. Negative profits are back to being reported.
|
|
|
|
0.14j:
|
|
. Removed orderbook price calculation.
|
|
|
|
0.14i:
|
|
. Modified the Telegram profit notification to include the type of trade closed (long or short)
|
|
. Force rewrite of the config file when removing a pair (if x.quit==True)
|
|
. Added a half wait_time pause to adjust_base.
|
|
|
|
0.14h:
|
|
. Added a new API endpoint: /edit_call_wait_time. Sets the wait time between retries and some API calls.
|
|
. Removed old commented-out code.
|
|
. Added exception handling then drawing the deal line (hacky).
|
|
. Removed accumulated profit from Telegram notification (to reduce clutter)
|
|
. Broker now returns an empty order if requesting for an empty id.
|
|
|
|
0.14g:
|
|
. Implemented market reload.
|
|
. Improved pause strings.
|
|
. Removed clear_offline_pairs, close_trader, global_close, market_close and global_market_close unused/outdated API endpoints.
|
|
. Simplified restart_pair endpoint.
|
|
. Changed default wait_time to 1 second (500ms before).
|
|
|
|
0.14f:
|
|
. Modified some strings.
|
|
. Changed take_profit_routine: removed a self.pause=True and added a self.pause=False after handling all the order cancelling and profit calculation.
|
|
|
|
0.14e:
|
|
. Improved pause strings.
|
|
. Added a missing amount_to_precision call.
|
|
|
|
0.14d:
|
|
. Removed log points, added pause strings.
|
|
|
|
0.14c:
|
|
. Added some log points
|
|
|
|
0.14b:
|
|
. Added quote currency to Telegram notification trade size
|
|
|
|
0.14a:
|
|
. When removing a pair, now it forces the broker to rewrite the config file to disk.
|
|
. When importing a trader, updates the amount of safety orders from the status dictionary.
|
|
. Removed unused max_so_amount key in status dictionary.
|
|
. Modified a few variable names.
|
|
. Updated Gate.io minimum base size calculation.
|
|
. Updated Telegram notification when switch_to_long completes successfully.
|
|
. Added rewrite_config_file in market_close call.
|
|
. Added total deal size to the Telegram deal close notification
|
|
. Added "safety_order_expansion_rate":
|
|
- When switching to short mode, it increases the amount of target safety orders.
|
|
- This may aid on trading pairs that go up in price too much and consume all safety orders quickly once the switch was made.
|
|
- This will also decrease profitability of converted-to-short pairs.
|
|
- The default value is 1.5 (50% more safety orders)
|
|
- Tunable in switch_to_short definition.
|
|
|
|
0.13e:
|
|
. Fixed a bug that ocurred when generating a new config file.
|
|
|
|
0.13d:
|
|
. Removed price_to_precision in return_status.
|
|
. Added a pause while modifying the amount of safety orders.
|
|
. Modified trade close Telegram notification string.
|
|
|
|
0.13c:
|
|
. Now it restarts a trader only if the attempt_restart flag is raised in config_dict (That was the whole point of that flag)
|
|
. Started to implement some setters/getters.
|
|
. Let's try to add price_to_precision to the display prices.
|
|
. Fixed a string in take_profit_routine.
|
|
|
|
0.13b:
|
|
. Added a config generator, if a pair is added and there's no config file for that pair, it generates one automatically with default values.
|
|
. Changed default pct_to_profit string to 'XX.XX'.
|
|
. Added a credentials.py file to handle Telegram API keys and others in the future (Exchange keys will remain in the config file)
|
|
. "Fixed" a bug in take_profit_routine that could result in counting twice the funds if a safety order was filled at the same time that the tp order.
|
|
|
|
0.13a:
|
|
. Added a slippage check prior to sending a new safety order (work in progress).
|
|
. Now it logs rejected orders because of low balance.
|
|
. If there are not enough funds, instead of keep adding to the index, it stops even trying to send safety orders altogether.
|
|
|
|
0.12w:
|
|
. Improved on-screen percentage formatting.
|
|
. Refactored send_new_safety_order.
|
|
|
|
0.12v:
|
|
. Removed the self.quit toggle specified in the previous update and replaced it with a retry limit.
|
|
. Now it sends a Telegram message when it fails to restart a trader.
|
|
|
|
0.12u:
|
|
. Commented out online_pairs.add in add_pair.
|
|
. Fixed a bug in draw_line.
|
|
. Now it toggles self.quit flag when the initial order is not successfully filled.
|
|
|
|
0.12t:
|
|
. Updated a few strings.
|
|
. Refactored the status bar print line to f-string.
|
|
|
|
0.12s:
|
|
. Now it checks that the take profit order is still open prior to sending a new safety order.
|
|
|
|
0.12r:
|
|
. Added a few log points.
|
|
|
|
0.12q:
|
|
. Modified a few strings.
|
|
. Fixed a bug in the take profit routine that caused an exception when the trader had all the safety orders filled.
|
|
|
|
0.12p:
|
|
. Removed an unnecessary amount_to_precision call that caused a bug when starting short traders on Binance.
|
|
|
|
0.12o:
|
|
. Small precision improvements calculating the safety order tables.
|
|
|
|
0.12n:
|
|
. Fixed a bug that occurred while checking for partially filled safety orders with short traders in take_profit_routine.
|
|
|
|
0.12m:
|
|
. Removed a redundant amount_to_precision call in start_bot.
|
|
|
|
0.12l:
|
|
. Refactored percentage calculation in return_status
|
|
. The safety order and take profit price from status_dict now consists on the orders price directly, not the intended as before.
|
|
. Added a check for partially filled safety orders in take_profit_routine.
|
|
|
|
0.12k:
|
|
. Modified a message to display the correct order size when starting a short trader.
|
|
. Added retries and an additional check to cancel order method.
|
|
. Suddenly Binance stopped informing market["limits"]["cost"]["min"]. Shake it up and go.
|
|
|
|
0.12j:
|
|
. Fixed a bug in get_min_quote_size.
|
|
|
|
0.12i:
|
|
. Added a log entry for taking note of the case when a safety order is filled, the trader takes notice but the TP order is filled almost
|
|
immediately without giving the trader a chance to send the new one. In this case, the profit calculation would denote "negative", but
|
|
the amount is cleaned up afterwards.
|
|
. Removed a redundant price check in switch_to_long.
|
|
|
|
0.12h:
|
|
. Some small refactorings here and there to achieve full compatibility with Poloniex.
|
|
. Improved precision when sending market orders by inspecting the orderbook prior to sending the order.
|
|
. Changed a few calculations to use orderbook's mid price instead of tickers' close price.
|
|
. Added price_to_precision wrapper to exchange_wrapper.
|
|
. Added a check for minimum order size when starting a trader.
|
|
|
|
0.12g:
|
|
. Now it writes the status file immediately after toggling the stop_when_profit flag.
|
|
. Removed "calculating optimal step size" message.
|
|
. Initial Poloniex support.
|
|
. Replaced a few order["price"] instances with order["average"] instead, to be more tolerant to low volume markets.
|
|
|
|
0.12f:
|
|
. Bug fixes in get_min_base_size.
|
|
. Some text editing and minor refactoring on instance startup.
|
|
. Fixed a bug that resulted in a value of 0 assigned to the step variable while calculating minimum order size.
|
|
. Improved step algorithm.
|
|
. Fixed a bug in the 0.12c bugfix.
|
|
|
|
0.12e:
|
|
. Added some text when starting an instance containing version numbers and misc info.
|
|
. Refactored get_min_base_size.
|
|
. Now it displays the percentage of price change needed to fill the take profit order.
|
|
. Shuffled some code in dca_runtime for readability purposes.
|
|
. Removed an unnecessary API call in get_min_base_size.
|
|
. Added the alternative of a flipped deviance table, devised in 0.12a.
|
|
. Added wait_time variable to the broker object.
|
|
|
|
0.12d:
|
|
. Manually switching a trader from short to long ignores profit calculation by default.
|
|
. Added a multiplier option to the tp_level calculation. Might become handy if a trader is closing deals too often (not implemented yet).
|
|
. Changed the handling of missing and cancelled take profit orders.
|
|
. Changed a conditional when checking for filled safety orders.
|
|
|
|
0.12c:
|
|
. Fixed a bug in take_profit_routine that caused a miscalculation of profit if the previous safety order and the take
|
|
profit order were filled simultaneously.
|
|
|
|
0.12b:
|
|
. Removed the division in balance_to_clean, adjusting the base amount rendered the need for loose change available useless.
|
|
. You can specify the amount of retries that a broker gets within the config file of the broker.
|
|
|
|
0.12a:
|
|
. Added "Dynamic safety order deviance": Insted of a fixed percentage, now it linearly varies +-1% (configurable), the earlier safety orders
|
|
are closer together to capture smaller movements. It can increase deal time when buried in safety orders, but it can be way more
|
|
profitable with more volatile pairs. Only available for long traders. It's dangerous for short traders if there are only a few
|
|
safety orders.
|
|
|
|
0.11e:
|
|
. Added a check for market before switching quote currency.
|
|
|
|
0.11d:
|
|
. Minor refactoring in exchange_wrapper.
|
|
. Fixed a bug that prevented from unsignaling last_call.
|
|
|
|
0.11c:
|
|
. Fixed old_long files that were not updated when switching quote currency.
|
|
|
|
0.11b:
|
|
. Fixed a bug in last_call endpoint: if the pair didn't exist it would not return an error.
|
|
. Fixed log and profit filenames that were not updated when switching quote currency.
|
|
. Removed some extra text from write_to_log.
|
|
|
|
0.11a:
|
|
. Added the ability to switch the quote currency of a trader, with its corresponding API endpoint
|
|
. Fixed a bug that deleted a pair from the config file when it was not necessary
|
|
. Fixed a bug when showing missing traders
|
|
. Some refactoring to reach full compatibility with Huobi
|
|
. Health index has been renamed to a more self explanatory 'Safety order occupancy percentage'
|
|
. Fixed a balance error detection routine that didn't work with Gate.io
|
|
. Some minor type related refactorings
|
|
. Now it writes a different log file for every exchange
|
|
. Added a Telegram notification when a pair closed its last deal
|
|
. Adds a notice if the trader is in a testnet
|
|
. Work in progress: trying to catch the pause bug when a pair executes its last trade
|
|
. Refactored fetch_free_base method
|
|
. Some string updates
|
|
|
|
0.10c:
|
|
. Changed all json indents to 4
|
|
. Modified switch_to_long, now it accepts parameter from_take_profit, to signal if SO and TP orders need to be closed or not
|
|
. Added console output when sending the first safety order
|
|
. Added side info to log output when new limit orders fail
|
|
. Now it automatically enables autoswitch when switching to short and disables it when switching to long.
|
|
|
|
0.10b:
|
|
. Minor refactor in get_tp_level, now it passes the safety order index as an argument
|
|
|
|
0.10a:
|
|
. Minor refactor in get_tp_level
|
|
. Improved logging
|
|
. Added a linear take profit percentage table. It obtains the percentages from a local implementation of Numpy's linspace function.
|
|
|
|
0.9k:
|
|
. Added a message to console when compensating base amount
|
|
. Only notifies old long price exceeded if autoswitch is turned off.
|
|
|
|
0.9j:
|
|
. Commented out automatic switch to short code. Not really necessary unless the instance is handling >50 traders.
|
|
. Modified some strings
|
|
. Fixed a bug that led to online_pairs not be cleared on each iteration
|
|
. Removed old code and adaptative_so_amount (and its api endpoint), not useful at all
|
|
|
|
0.9i:
|
|
. Added handling for a specific division by zero error (rare)
|
|
|
|
0.9h:
|
|
. Modified a few variable declarations
|
|
. Now it restarts the pair when the TP order is missing
|
|
|
|
0.9g:
|
|
. Modified log strings
|
|
. Added a Telegram message when switching back from short to long bot
|
|
. Fixed an order bug in liquidate_base()
|
|
|
|
0.9f:
|
|
. Modified a few strings
|
|
. Added a log output when rewriting the broker config file
|
|
|
|
0.9e:
|
|
. Added an endpoint that returns the last trader time
|
|
|
|
0.9d:
|
|
. Added an endpoint that returns server time
|
|
|
|
0.9c:
|
|
. Now it sends a Telegram message if a pair errors out. Mostly for debugging, probably will be removed later.
|
|
|
|
0.9b:
|
|
. Changed a few self.quit for self.restart
|
|
|
|
0.9a:
|
|
. Fixed a bug when processing old long info
|
|
. Now it searches for the .oldlong file if it can't find the info in status_dict when switching from short to long
|
|
. Added a config option for attempting pair restart
|
|
. Commented out some offline pairs restart code
|
|
. Enabled the change in 0.8o
|
|
|
|
0.9:
|
|
. Now it sends a Telegram notification when a trader errors out
|
|
|
|
0.8t:
|
|
. restart_pair() now cancels pending buy orders for long traders
|
|
. Implemented automatic trader restart on error
|
|
|
|
0.8s:
|
|
. Now it shows one decimal less.
|
|
|
|
0.8r:
|
|
. Modified return_status() so it does not return any number in scientific notation
|
|
|
|
0.8q:
|
|
. Updated empty_order
|
|
. Added a pause after cancelling an order
|
|
. Added two more decimals to the displayed prices
|
|
|
|
0.8p:
|
|
. Some minor refactorings here and there
|
|
. Removed a few spaces in the console output
|
|
. Prices shown in console output now to precision
|
|
. Chasing a stop_when_profit bug
|
|
|
|
0.8o:
|
|
. Refactored return_status()
|
|
. Now it rereads the total amount of base on the exchange in the event of a take profit order rejected for lack of base.
|
|
This could be nasty, will follow it closely
|
|
|
|
0.8n:
|
|
. Removed exceeded pairs notice on console
|
|
. Removed profit from console view. Might replace it with the amount of deals closed later.
|
|
. Added the exchange to the exceeded pair Telegram notification
|
|
. Added an API endpoint to switch the check of old long prices on or off.
|
|
. Fixed a bug in the missing pairs function that caused it to return an empty list
|
|
. Fixed a bug that colored an extra character in short mode
|
|
. Added exception handling to update_status
|
|
. Fixed alignment of pair and safety order info
|
|
|
|
0.8m:
|
|
. Added pair restart
|
|
. Now the minimum amount for cleanup is double the minimum order size imposed by the exchange (may increase the amount of open orders on the exchange)
|
|
. Added a Telegram warning when the short price exceeds the old long price and a notice on the console output
|
|
. Refactored the Telegram messaging methods
|
|
. Added is_short to status
|
|
. Allowed multiple restart attempts of a bot (specially useful on Gate.io)
|
|
|
|
0.8l:
|
|
. Fixed a bug which led to an empty safety price table
|
|
|
|
0.8k:
|
|
. Minor change in error handling in exchange_wrapper
|
|
|
|
0.8j:
|
|
. Added an API endpoint that returns the pairs that are included in the config file but not running
|
|
|
|
0.8i:
|
|
. Fixed a bug when simulating market orders
|
|
. Minor refactorings
|
|
. Fixed unnecessary fee substraction when the trader is short
|
|
|
|
0.8h:
|
|
. base_profit now can't be less than zero (maybe that could have been a problem at a later stage?)
|
|
. Added colors to health_index
|
|
. Corrected a bug when detecting duplicate profit reports
|
|
. Added a message that shows the amount of loose change available when taking profit
|
|
|
|
0.8g:
|
|
. Now it displays a message when sending a new safety order
|
|
. Removed cosine table. It was stupid.
|
|
. Now it removes the pair from the config file when the last deal is closed
|
|
. Programmable last call added.
|
|
. Added support for FTX when calculating minimum order sizes
|
|
. Added timestamp to "free base" screen message
|
|
. Now it displays order size as an integer when possible when starting a short bot
|
|
. Added base_change to take into account rounding errors in short traders depleting the base amount
|
|
|
|
0.8f:
|
|
. Added a check for duplicate profit reporting
|
|
|
|
0.8e:
|
|
. Now it calculates on the fly the optimal order size for short bots
|
|
. Refactored some code in exchange_wrapper
|
|
|
|
0.8d:
|
|
. Reimplemented switch_to_long
|
|
. Added a few docstrings
|
|
. Now it double checks if the pair is really offline when restarting an offline pair
|
|
|
|
0.8c:
|
|
. Uncommented self.safety_order_index+1 in new_so_routine
|
|
. Doubled the amount of retries when starting a bot
|
|
|
|
0.8b:
|
|
. Added deal price to the profit message displayed onscreen
|
|
. Upon error, get_open_orders only returns None
|
|
|
|
0.8a:
|
|
. Modified the trader pause procedure
|
|
. Fixed a bug that was present when importing a single trader
|
|
. Modified the step size when switching to short
|
|
|
|
0.7u:
|
|
. Fixed adaptative_so_amount when importing trader
|
|
|
|
0.7t:
|
|
. Added a list of paused traders to be displayed onscreen if any are paused
|
|
. Fixed a route typo when saving old long info
|
|
. Added adaptative so amount:
|
|
- When switching to short mode, if the base is not enough, instead of returning an error it decreases the safety order amount
|
|
to calculate the order size.
|
|
- This is helpful in situations when the minimum order size of the pair is too big, or the trader long order size was too small.
|
|
- The lower limit is hardcoded to half the maximum amount of safety orders.
|
|
- I can't think of a scenario where having less orders than that is optimal.
|
|
. Changed return API string when toggling cleanup
|
|
|
|
|
|
0.7s:
|
|
. Changed the order of the conditionals when checking for autoswitch within the take profit routine
|
|
. Now when a trader switches to short, it writes the tp info on a different file, in case the trader crashes and restarts
|
|
. To the old_tp entry, a timestamp was added
|
|
. Removed duplicate method in trader.py
|
|
. Added an endpoint to toggle trader pause
|
|
. Improved some error logging
|
|
|
|
0.7r:
|
|
. Added a pause character to indicate paused pairs.
|
|
|
|
0.7q:
|
|
. Modified the removal routine of "last call" marked pairs.
|
|
. Commented out some lines dealing with old specific bugs.
|
|
|
|
0.7p:
|
|
. Removed write_to_disk conditional, now it only writes to disk if told to.
|
|
. Fixed a wrong argument passed to fetch_market.
|
|
|
|
0.7o:
|
|
. Fixed a wrong color bug.
|
|
|
|
0.7n:
|
|
. Writes updated status file as soon as it finishes importing all the values.
|
|
|
|
0.7m:
|
|
. In switch_to_long, toggled the is_short flag after messing with the config files.
|
|
. Removed unused precision variable from trader object.
|
|
. Minor string editing.
|
|
. Price now shows bright green if, within a short bot, the current price is larger than the old take profit price.
|
|
|
|
0.7l:
|
|
. Commented out global status file loading.
|
|
. Removed some unnecesary ticker requests in get_min_base_size method.
|
|
. Added a double check before liquidating base.
|
|
. Added a switch_to_long API endpoint (Mostly for testing, but it might be useful someday).
|
|
|
|
0.7k:
|
|
. Rounded to 6 decimals the base amount of the telegram notification.
|
|
. In that same message, it was needed to substract 1 from safety_order_index.
|
|
. Refactored the calculation of minimal base size (Thanks, CCXT)
|
|
. Minor refactorings here and there
|
|
|
|
0.7j:
|
|
. Uncommented a few lines
|
|
. Now it checks if the pair is already running when adding pairs through API
|
|
. Added trader pause in market_close, add_quote, close_trader, global_close
|
|
|
|
0.7i:
|
|
. Minor bug fixes and refactorings
|
|
. Fixed importing didn't took into account the original start_time and deal_start_time
|
|
. Switches on the self.pause flag in take_profit_routine and new_so_routine methods
|
|
. Moved the autoswitch routine to check_status
|
|
|
|
0.7h:
|
|
. Added a notice when autoswitch is on
|
|
|
|
0.7g:
|
|
. Now the pause flag of a trader is on by default, it only switches it off once it's properly started
|
|
. Refactored offline pairs routine
|
|
|
|
0.7f:
|
|
. Now checks also for autoswitch when closing a short deal
|
|
|
|
0.7e:
|
|
. Added a pause flag to not process orders when an API call manhandles the trader
|
|
|
|
0.7d:
|
|
. Added safety order count to the Telegram take profit message
|
|
|
|
0.7c:
|
|
. Divided dca_classes into trader and exchange_wrapper modules
|
|
. Implemented truncate method to easily round down numbers to precision, in preparation to implement a sans-ccxt version
|
|
. Reduced retry wait times in exchange_wrapper
|
|
. Now it also indicates the amount of base that was not sold (happens on some exchanges when tick size is too high)
|
|
|
|
.0.7b:
|
|
. Changed the order of operations in switch_to_short to account for possible bad outcomes
|
|
. Changed the code when fetching market info due to inconsistencies between different exchange implementations in CCXT
|
|
(E.g., the fetch_ticker method returns ticker size info on FTX but not on Binance)
|
|
|
|
.0.7a:
|
|
. new_limit_order now returns None when it encounters errors
|
|
. Fixed duplicated cleanup message
|
|
. First implementation of switch to short
|
|
. First implementation of autoswitch (off by default)
|
|
. Removed redundant variables
|
|
. Reduces safety order deviance when switching to short
|
|
|
|
.0.6h:
|
|
. Changed the first conditional in take_profit_routine()
|
|
. Changed the order of sending take profit order and safety order, so if there are not enough funds the bots don't close any orders
|
|
|
|
.0.6g:
|
|
. Some fixes on the telegram notification text
|
|
. Removed a restriction when importing traders
|
|
. Removed bug-hunting code in check_status (if safety_order_index==0)
|
|
. Refactoring at "#Check if SO order is filled"
|
|
|
|
.0.6f:
|
|
. Status dictionary didn't have deal start time and trader start time. Commented out for now.
|
|
. Added price to telegram message
|
|
|
|
.0.6e:
|
|
. Fixed importing bots with all SOs filled.
|
|
. Previous bug not fixed at all. Retrying.
|
|
. Short traders now are displayed in yellow.
|
|
. More changes dealing with safety orders.
|
|
|
|
.0.6d:
|
|
. Fixed a bug when adding SOs.
|
|
|
|
.0.6c:
|
|
. Fixed a few lines that substracted fees in quote when it wasn't necessary.
|
|
|
|
.0.6b:
|
|
. When they were no more opened orders on the exchange, there was a bug that kept the script running as if life was normal. Fixed that.
|
|
|
|
.0.6a:
|
|
. Some cosmetic changes regarding short bots.
|
|
. Fixed market close commands for compatibility with short bots.
|
|
|
|
.0.6:
|
|
. Preliminary support for short bots. Market close API commands not compatible yet.
|
|
|
|
.0.5f:
|
|
. Cleanup routine now only sweeps half of what it used to be. DCAing dust might be a good idea.
|
|
. Removed some keys from global_status["config"] that should not be public.
|
|
. Fixed two flags that signal showing more or less info on the terminal window.
|
|
. Reformatted a few strings.
|
|
. Now it displays the filled safety orders instead of the open safety order number.
|
|
|
|
0.5e:
|
|
. Now it doesn't try to cancel a non-existent safety order when the deal that closes have consumed all safety orders.
|
|
|
|
0.5d:
|
|
. Fixed a minor bug that miscounted the maximum safety orders when importing a trader that had more than the default value.
|
|
|
|
0.5c:
|
|
. Serialized trader startup
|
|
. Added the endpoints for toggling less_info and even_less_info
|
|
. Updated some sleep timers
|
|
. Added two more decimals when displaying prices
|
|
|
|
0.5b:
|
|
. global_status api endpoint used to return telegram keys. Not anymore.
|
|
. Small cleanup here and there
|
|
. Added a space in write_to_log method
|
|
|
|
0.5a:
|
|
. Several minor bug fixes
|
|
. Removed the "Press Ctrl+C..." message
|
|
. Moved Telegram data to exchange config file
|
|
|
|
0.5:
|
|
. First API implementation
|
|
. Exchange config file now has a host and port entry
|
|
. Several bug fixes and exception handling routines implemented
|
|
|
|
0.4q:
|
|
. Removed a bug in the pair removal process
|
|
. Added a check for empty order list
|
|
|
|
0.4p:
|
|
. In the config file, the time between restarts attempts now is specified in seconds, rather than minutes.
|
|
. Fixed? a bug that caused a restart of a pair that was marked for deletion
|
|
|
|
0.4o:
|
|
. get_tp_level: Implemented dynamic take profit percentage (between +0.5% and -0.5% of config file's tp_level)
|
|
The first order will always be +0.5%, the first third without change (this is where almost all deals end up closing),
|
|
the second third -0.25% and the last third -0.5%
|
|
. get_tp_level_v2: Also there's an alternative available: it generates a cosine table and uses it as a continuous modifier for the tp_level.
|
|
Due to the nature of the cosine function, it is a bit more agressive when setting the percentage in the first few tp orders.
|
|
Probably worth a try if the markets are green, perhaps a bit too greedy if the markets are on a downtrend.
|
|
|
|
.0.4n:
|
|
. Code cleanup (automatically recognizing when there is the need to simulate a market order)
|
|
|
|
.0.4m:
|
|
. Code cleanup
|
|
. Added a loop to fetch_orders()
|
|
. Removed write_try()
|
|
. When simulating market orders, the initial order was not canceled if retries were exhausted.
|
|
|
|
.0.4l:
|
|
. Modified a few market order calls that did not support Gate.io
|
|
. Removed average deal uptime.
|
|
|
|
.0.4k:
|
|
. Doubled the amount of retries when there's an API bug (Because of a lovely exchange that starts with K and ends with ucoin)
|
|
. Added "clear offline pair list" command
|
|
. "Remove pair" now also deletes the pair if it is included in the offline pairs list
|
|
. The onscreen take profit message now truncates the number to 4 decimals
|
|
. Added an exception counter. The idea is to see which errors pop up more often and try to eliminate unnecessary exception catchers
|
|
. Fixed an error when adding funds. It didn't work in OKX as it didn't discount the fees of the buy order (in base currency)
|
|
. Zero-balance Kucoin bug handled by retrying the order. Commenting out that rounding stuff.
|
|
. Added average deal uptime.
|
|
. Added Gate.io support (simulating market orders mostly)
|
|
|
|
.0.4j:
|
|
. Added a few time.sleep(0.5) when iterating for an order, because Kucoin.
|
|
. Enabled cleanup for Binance
|
|
. Minor code cleanup
|
|
|
|
.0.4i:
|
|
. Added a few exceptions trying to address the 0 balance bug mentioned in the code
|
|
. Added a looped exception to get_order
|
|
|
|
.0.4h:
|
|
. Eliminated a few time.sleep() that were unnecessary
|
|
. Added a looped exception to the start bot routine. I suspect that kucoin balance sometimes hits 0 (The reason? Maybe the balance goes to
|
|
0 momentarily while setting up an order) and that is what is making the orders fail. If that is true, the best solution would be to
|
|
implement async-await, so it does not try to open two orders at the same time.
|
|
. Added a message on screen when a deal is closed
|
|
|
|
.0.4g:
|
|
. Corrected a small error that serialized the initialization of the traders in all exchanges.
|
|
|
|
.0.4f:
|
|
. Implemented rounding routine.
|
|
|
|
.0.4e:
|
|
. Exchange name now appears in uppercase.
|
|
. Corrected a wild carriage return when enabling the "even less info" mode.
|
|
. Changed the take profit routine so it only calculates profits if there are no errors with the tp order.
|
|
. Added a price list dictionary to attempt to reduce API load (It loads all prices at once instead of fetching them one by one)
|
|
Some exchanges do not like this and prefer the old way.
|
|
. A few changes in new_so_routine to try to catch a bug that causes the new tp order not to be sent because of not enough base
|
|
If that does not work, I'll implement a decreasing rounding routine, just like in the previous version.
|
|
|
|
.0.4d:
|
|
. Changes in the draw_line function
|
|
|
|
.0.4c:
|
|
. Added a command to remove a pair without closing the orders
|
|
. Serialized the start of the bots for kucoin. Also added an "if open" clause when cancelling orders, also for kucoin. IH8U kucoin!
|
|
|
|
.0.4b:
|
|
. Added another tp check
|
|
|
|
.0.4a:
|
|
. Now it prints the exchange's name on the screen.
|
|
. Now it also sends the profit order id to telegram
|
|
. Minor bug fixes
|
|
|
|
.0.4:
|
|
. General cleanup and bug-hunting.
|
|
. Eliminated a few redundant commands
|
|
. Ready for primetime?
|
|
|
|
.v0.3d:
|
|
.dca_classes.py:
|
|
. Modified get_single_price. Now it does not return a tuple but a float.
|
|
.dca_runtime.py:
|
|
. Made the necessary changes to accomodate the update above.
|
|
|
|
v0.3c:
|
|
.dca_classes.py:
|
|
. Modified send_new_safety_order() in order to catch a bug that results in 0/30 safety orders in an imported_trader
|
|
.dca_runtime.py:
|
|
. draw_line(): line width back to 80
|
|
|
|
v0.3b:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py:
|
|
. You can now save added pairs to the main config file
|
|
|
|
v0.3a:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py
|
|
. Now it isn't necessary to input the pair without the / in some commands
|
|
|
|
v0.3:
|
|
.dca_classes.py:
|
|
. Import bot implemented:
|
|
. Created a child class imported_trader
|
|
. Now it writes the status_dict to a file
|
|
.dca_runtime.py:
|
|
. Import bot implemented
|
|
|
|
v0.2c:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py:
|
|
. Multithreaded "close all pairs and quit"
|
|
|
|
v0.2b:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py:
|
|
. Fixed bugs in cleanup command.
|
|
. Line width is now 90 characters.
|
|
|
|
v0.2a:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py
|
|
. Multiple corrections to address issues found after testing.
|
|
|
|
v0.2:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py:
|
|
. Finished implementing commands. Now to test them
|
|
|
|
v0.1d:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py:
|
|
. Pair now is shown in blue
|
|
. Attempt to reconnect counter now does not show negative numbers
|
|
. Implemented more commands
|
|
|
|
v0.1c:
|
|
.dca_classes.py:
|
|
. No changes
|
|
.dca_runtime.py:
|
|
. Added the ability to set a timer to attempt to restart an instance
|
|
|
|
v0.1b:
|
|
. dca_classes.py:
|
|
. Now it reloads the config file every time it closes a deal.
|
|
. dca_runtime.py:
|
|
. When you add an instance, now it adds it to an intermediate list before adding it to the main running_instances list.
|
|
Sometimes it would trigger an error (Threads can only be started once) if you pressed Ctrl-C at the exact wrong time.
|
|
|
|
v0.1a:
|
|
. Initial VPS deployment |