Comments (15)
The obvious ones are BTCUSDC, ETHUSDC, XRPUSDC, DOGEUSDC, SOLUSDC, AVAXUSDC have some volume, they seem to work with SunFlow, it tries to buy, but I have no funds yet. Your approach is unique.. we should chat at the office some time. ;-)
from sunflow-cryptobot.
@eppenga wow nice, I will try it! Python is still the number one programming language for a reason!
I noted myself to add Apprise to your script/logging, so you can notify Buy/Sell moments via Telegram, e-mail etc. etc.
Only a few lines of code are needed. For AI I have this one bookmarked (amoung others): Trading predictions using AI and Python
from sunflow-cryptobot.
Nope, no backtesting here. I have an opinion on backtesting which I gladly share sometime, but to keep it short, I prefer to develop mathematical / statistical methods which work regardless of backtesting. Running without trading fees for this bot could be profitable as it can do high frequency trades, almost like scalping. Volume might be an issue, especially because it sets market orders which are influenced much harder by lower volumes, but let's try! Could you give me maybe a few example of these USDC pairs?
from sunflow-cryptobot.
Just setup a test on AVAXUSDC, all seems to run fine. Wasn't aware that it's really without fees, thx! Double checking API response and indeed it says CumExecFee equals 0 :)
BTW also changed some things again, you might need to do a pull request, pls. be aware the config.py files is changed, did this to allow it run multiple instances of the same symbol via different sub accounts. Want to use that for testing what's the best way to calculate trigger distance.
from sunflow-cryptobot.
@cyberjunky > Did some overhauling this weekend, not as much as I wanted, mainly improved trigger price distance calculations, fixed some bugs and optimized. Also professionalized releasing a bit, have a development environment now, a test and a production. For the test environment I setup three sub accounts that run all the same symbols, so they are comparable and can see which settings work best.
Kline buy prevention is now also working as intended, yay! Ok...it made one failure :)
Will make a wish list of all the featured had in mind, also ran the first (non successful lol :)) tests with LSTM and ARIMA models for price predictions. Python has so much cool things to offer, never knew this :)
from sunflow-cryptobot.
Thanks so much! Valuable info!!
from sunflow-cryptobot.
@eppenga wow nice, I will try it! Python is still the number one programming language for a reason! I noted myself to add Apprise to your script/logging, so you can notify Buy/Sell moments via Telegram, e-mail etc. etc. Only a few lines of code are needed. For AI I have this one bookmarked (amoung others): Trading predictions using AI and Python
Only intended to make live easy and please do not feel obligated to add Telegram at all, here are the hooks that you could use:
Bought or Sold, please see trailing.py starting line 96:
# Check if trailing order if filled, if so reset counters and close trailing process
if order['result']['list'] == []:
print(defs.now_utc()[1] + "Trailing: check_order: Trailing " + active_order['side'] + ": *** Order has been filled! ***\n")
Going to Buy, please see sunflow.py starting line 358, when can_buy flips to True:
# Get buy decission and report
result = defs.decide_buy(indicators_advice, use_indicators, spread_advice, use_spread, orderbook_advice, use_orderbook, interval, intervals)
can_buy = result[0]
message = result[1]
print(defs.now_utc()[1] + "Sunflow: buy_matrix: " + message + "\n")
Going to Sell, please see sunflow.py starting line 183, when can_sell flips to True:
# Check if and how much we can sell
result = orders.check_sell(new_spot, profit, active_order, all_buys, info)
all_sells_new = result[0]
active_order['qty_new'] = result[1]
can_sell = result[2]
rise_to = result[3]
from sunflow-cryptobot.
It's a start, more info like price, amounts of buy/sells, wallet size, and realized pnl are things I think about.
from sunflow-cryptobot.
Wow, almost looks like a professional bot this way! Python is awesome, I think from nothing to this in about a month, with some help from YouTube, Visual Studio (what an awesome editor is that...my fanciest ever was Notepad++), ChatGPT and you. So cool :)
from sunflow-cryptobot.
In my other bot scripts I have added a telegram bot mechanism, so you can ask for info, stop/start bot, panic sell etc from it's Telegram channel... but lets start small ;-)
Visual Studio is awesome indeed, I'm testing with the Github Copilot add-in (and subscription) it even suggest code and naming while typing... and you can ask it to create docstrings etc. etc.
from sunflow-cryptobot.
Nice nice! I am still old school, create functional designs and things and then start coding ;) Cool stuff!
from sunflow-cryptobot.
Merged the commit, great fun to see Sunflow outputting to my Telegram. It's a bit talkative, think I will remove some messages later.
from sunflow-cryptobot.
Thx for all your feedback @cyberjunky , fyi it has profit calculations now which are also displayed through apprise. Also lots of other bugs have been fixed and it's all much more stable now.
On price predictions I opened up the new ChatGPT version which was released yesterday and wanted to try the API, so I wrote this in literally 10 minutes (Python is awesome) and ok, only tried it 5 minutes, but... I'm amazed, but it might just be luck...
from openai import OpenAI
import configai, preload, time
# Get a list of prices
prices = preload.get_prices("XRPUSDC", 100)
# Connect to ChatGPT
client = OpenAI(api_key=configai.api_key)
# Do logic
start_time = int(time.time() * 1000)
completion = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a fortune teller that can really predict the future."},
{"role": "user", "content": "Predict the next price based on this list and only output the number itself."},
{"role": "user", "content": "The list contains the time in miliseconds and the price at that moment in time."},
{"role": "user", "content": str(prices)}
]
)
end_time = int(time.time() * 1000)
# Output to stdout
predicted_price = completion.choices[0].message
print(f"ChatGPT predicts {predicted_price} and it took {end_time - start_time}ms")
from sunflow-cryptobot.
@eppenga Nice work, I think you didn't update the repo yet. if done I'm going to try it out soon!
The ChatGPT part looks nice, but I don't have a paid subscription yet, I thinks it's needed.
from sunflow-cryptobot.
Well I tested it a bit further yesterday night and asking ChatGPT to predict one or two prices in the future is OK-ish, but when you go up to ten, nah... Ohw yes, another thing, it is soooo slow....never seen it give an answer in less than .5 seconds. But, still, it is very interesting to see how the ChatGPT API works and what you can with it. Yes, costs a bit of money, I put in a couple of Euros for the API, it's hardly using it, it's cheap.
from sunflow-cryptobot.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sunflow-cryptobot.