Note I have never coded in python, used github or git before this bot, so if you see mistakes or ways to improve, comment below.
I've been working on an idea to not buy an announcement coin if it has already "peaked"
I think a good idea would be to pull the 24 high, then add a config option to choose how much higher the 24h high has to be above than the current price in % to not buy the coin.
i.e. you run the bot and it detects and announcement for xyz that has already "peaked", let's say at 100 and you have a 24h % set at 5% then if the current price of the coin is 95, the bot won't buy it.
since this is a customizable number, you get to choose what you believe a big enough price difference is to skip buying. The 24h high pull runs before the current price pull so the price is less likely to be below the 24h price due to a delay in data pull.
I've added the changes and it appears to work. I tested it by adding a coin to new_listings.json to trick the bot into wanting to order it. Tested using RGT as an example, which has spiked already to 62.76 and landed on ~47 atm which is about a 35% difference. When the 24H setting in config was 30%, it did not buy the coin.
Suggestions were made, changes happened. Here is what I have ended up with. Not sure how to highlight the changes in here, if anyone knows how, let me know and I'll edit this.
TRADE_OPTIONS:
# In your pairing coin
# DO NOT DISABLE TSL!!!! YOUR BOT WILL NOT SELL
QUANTITY: 15
# BTCUSDT will be bought for example
PAIRING: USDT
TEST: True
# In %
SL: -3
TP: 2
24H: 2
ENABLE_TSL: True
TSL: -4
TTP: 2
LOGGING:
# Logging levels used in this program are ERROR, INFO, and DEBUG
LOG_LEVEL: INFO
LOG_FILE: bot.log
trade_client.py change
Changed get_last_price to get_coin_info and adjusted to keep all info returned.
Note I have never coded in python, used github or git before this bot, so if you see mistakes or ways to improve, comment below.
I've been working on an idea to not buy an announcement coin if it has already "peaked"
I think a good idea would be to pull the 24 high, then add a config option to choose how much higher the 24h high has to be above than the current price in % to not buy the coin.
i.e. you run the bot and it detects and announcement for xyz that has already "peaked", let's say at 100 and you have a 24h % set at 5% then if the current price of the coin is 95, the bot won't buy it.
since this is a customizable number, you get to choose what you believe a big enough price difference is to skip buying. The 24h high pull runs before the current price pull so the price is less likely to be below the 24h price due to a delay in data pull.
I've added the changes and it appears to work. I tested it by adding a coin to new_listings.json to trick the bot into wanting to order it. Tested using RGT as an example, which has spiked already to 62.76 and landed on ~47 atm which is about a 35% difference. When the 24H setting in config was 30%, it did not buy the coin.
Suggestions were made, changes happened. Here is what I have ended up with. Not sure how to highlight the changes in here, if anyone knows how, let me know and I'll edit this.
Note I have implemented the code from https://github.com/kekkokk/gateio-crypto-trading-bot-binance-announcements-new-coins/commit/62e9799fb6cee170dde4e825422614144b3c34e0
config change Added 24H option
trade_client.py change Changed get_last_price to get_coin_info and adjusted to keep all info returned.
main.py changes Mostly changes to reflect using new get_coin_info method and addition of the 24h high check to not buy.