Friday, April 23, 2021
  • Setup menu at Appearance » Menus and assign menu to Top Bar Navigation
Advertisement
  • AI Development
    • Artificial Intelligence
    • Machine Learning
    • Neural Networks
    • Learn to Code
  • Data
    • Blockchain
    • Big Data
    • Data Science
  • IT Security
    • Internet Privacy
    • Internet Security
  • Marketing
    • Digital Marketing
    • Marketing Technology
  • Technology Companies
  • Crypto News
No Result
View All Result
NikolaNews
  • AI Development
    • Artificial Intelligence
    • Machine Learning
    • Neural Networks
    • Learn to Code
  • Data
    • Blockchain
    • Big Data
    • Data Science
  • IT Security
    • Internet Privacy
    • Internet Security
  • Marketing
    • Digital Marketing
    • Marketing Technology
  • Technology Companies
  • Crypto News
No Result
View All Result
NikolaNews
No Result
View All Result
Home Neural Networks

Create Your Own Python Server to Gather High Granularity Market Data for Cryptocurrencies (And use it to create a Neural Network Trading Bot)

January 11, 2020
in Neural Networks
Create Your Own Python Server to Gather High Granularity Market Data for Cryptocurrencies (And use it to create a Neural Network Trading Bot)
585
SHARES
3.3k
VIEWS
Share on FacebookShare on Twitter

If you are into deep learning and machine learning, most of the time you will have the problem of reaching good quality data and using that for training Neural Networks. With current developments in Cryptocurrency market, hot topic is applying deep learning models into trading and then predicting the price trends using those models and trading automatically with bots.

Why not making some money while doing some neural network magic, right? Wrong. It might sound easy but actually the stuff is much harder than you think. Most importantly, forget about getting a high performing model without good quality data. The reason is deep learning is different than traditional machine learning and it is highly dependent on how much and how good your data is.

You might also like

Startup Incubations & Accelerators For AI Startups | by Farhad Rahbarnia | Apr, 2021

58 Resources To Help Get Started With Deep Learning ( In TF ) | by Shubham Panchal | Apr, 2021

Why Is Intelligent Data Capture Much Bigger Than OCR? | by Infrrd | Apr, 2021

When I first wanted to train a model using Python and Keras, I realized the problem and started to gather data first. Which is useful for all sorts of different uses. Not only predicting future price predictions, deep learning can also be used for uncovering the price changes between different exchanges, unrevealing arbitrage opportunities before it happens.

Here We Go:

If we are talking about Data and Deep Learning you can’t do it without Python 🐍
  1. So to start gathering data, first step is fetching it from exchanges. That means we have to connect at least few of the exchanges and gather this in to the memory. To do that you have first have to reach this exchanges through their APIs. It is fairly simple to that if you would like to go through each of the documentation of the APIs but this will consume lot of time and we need to gather at least 10 different exchanges to unravel connections between the price movements and depending on exchanges. (For example when price starts dipping on major exchanges like GDAX, it might take some time to affect other smaller exchanges in some other countries).

So in this case your friend is an amazing python library called CCXT which has already most of the APIs already embedded into it. You just have to call a function and voila! Data you need is there. Here is the link to that: https://github.com/ccxt/ccxt

2. You need to write this data into somewhere and store it in an orderly fashion to use it later on for your money printing trading bot 🙂 For this you can use an MySQL server on digitalocean for pretty cheap and then implement SQL writing commands in your python code. I hate meddling around with SQL commands so I went ahead with a SQL library which is called dataset by pudo which you can check it out from here: https://github.com/pudo/dataset

Heroku Killer; Dokku

3. I assume you don’t want to run your laptop 7/24 therefore so you need to set up a server. You got two options; expensive and easy or cheap and fast but hard to set up: So it is Heroku or Dokku on Digitalocean. I chose the path of digitalocean and set up a dokku server because for database intense applications it gets pretty expensive pretty quick. Have a look at the dokku tutorial from digitalocean: https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-dokku-application

So in these 3 steps you will be ready to start your own data collection server. Check out digitalocean tutorials for the basics of the server setup and learn how Procfile, heroku buildpacks work. (Since this topic is vast I skip in this tutorial.) Procfile and runtimes are already included in the github version. So all you have to do is set up the server and input your mysql login credentials.

So when we look at our structure it is a fairly simple architecture:

Architecture is fairly simple

I will not go very detailed into whole code review but I want to show you some functions from the code:

I have used tickers to fetch data and use this data to create candles in database. There is already candle function inside ccxt library but it doesn’t function on many exchanges so ticker was way to go. (Although some exchanges doesn’t support OHLCV availability was much higher than using built-in OHLCV function.) Here is the code snippet from main.py file:

I guess you also noticed there is variable name called delta. There is another function inside main.py file which calculates price changes over 7 day and 24h timespan. Here you can have a look at the delta function. It uses the already saved data inside our SQL server therefore it will take some time for this function to work properly. It is optional to use it.

So I think you wonder how it works after few weeks. I am running the script for nearly for 3 months now and it created a massive 250 MB CSV file including dizzying number of columns just with numbers in it. The granularity is 5 minutes and there are 16 different exchanges that includes 10 to 20 different pairs inside generating hundred thousands of rows. Here how it looks like when exported from MySQL server:

Credit: BecomingHuman By: Ceyhun Derinbogaz

Previous Post

TrickBot hackers create new stealthy backdoor for high-value targets

Next Post

Hackaday Podcast 049: Tiny Machine Learning, Basement Battery Bonanza, And Does This Uranium Feel Hot?

Related Posts

Startup Incubations & Accelerators For AI Startups | by Farhad Rahbarnia | Apr, 2021
Neural Networks

Startup Incubations & Accelerators For AI Startups | by Farhad Rahbarnia | Apr, 2021

April 23, 2021
58 Resources To Help Get Started With Deep Learning ( In TF ) | by Shubham Panchal | Apr, 2021
Neural Networks

58 Resources To Help Get Started With Deep Learning ( In TF ) | by Shubham Panchal | Apr, 2021

April 23, 2021
Why Is Intelligent Data Capture Much Bigger Than OCR? | by Infrrd | Apr, 2021
Neural Networks

Why Is Intelligent Data Capture Much Bigger Than OCR? | by Infrrd | Apr, 2021

April 22, 2021
AI Transforms Mortgage Industry — Automate Document Processing | by Infrrd | Apr, 2021
Neural Networks

AI Transforms Mortgage Industry — Automate Document Processing | by Infrrd | Apr, 2021

April 22, 2021
How AI Is Disruptive Innovation For OCR | by Infrrd | Apr, 2021
Neural Networks

How AI Is Disruptive Innovation For OCR | by Infrrd | Apr, 2021

April 22, 2021
Next Post
Hackaday Podcast 049: Tiny Machine Learning, Basement Battery Bonanza, And Does This Uranium Feel Hot?

Hackaday Podcast 049: Tiny Machine Learning, Basement Battery Bonanza, And Does This Uranium Feel Hot?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Plasticity in Deep Learning: Dynamic Adaptations for AI Self-Driving Cars

Plasticity in Deep Learning: Dynamic Adaptations for AI Self-Driving Cars

January 6, 2019
Microsoft, Google Use Artificial Intelligence to Fight Hackers

Microsoft, Google Use Artificial Intelligence to Fight Hackers

January 6, 2019

Categories

  • Artificial Intelligence
  • Big Data
  • Blockchain
  • Crypto News
  • Data Science
  • Digital Marketing
  • Internet Privacy
  • Internet Security
  • Learn to Code
  • Machine Learning
  • Marketing Technology
  • Neural Networks
  • Technology Companies

Don't miss it

Evolving ITOps with AIOps with no-code AI training with Cloud Pak for Watson AIOps – IBM Developer
Technology Companies

Evolving ITOps with AIOps with no-code AI training with Cloud Pak for Watson AIOps – IBM Developer

April 23, 2021
Best free PC antivirus software in 2021
Internet Security

Best free PC antivirus software in 2021

April 23, 2021
Cybercriminals Using Telegram Messenger to Control ToxicEye Malware
Internet Privacy

Cybercriminals Using Telegram Messenger to Control ToxicEye Malware

April 23, 2021
Strategies for a successful Voice of the Customer program
Data Science

Strategies for a successful Voice of the Customer program

April 23, 2021
European Values Confront AI Innovation in EU’s Proposed AI Act  
Artificial Intelligence

European Values Confront AI Innovation in EU’s Proposed AI Act  

April 23, 2021
Artificial Intelligence and Machine Learning: Demographics & Firmographics
Machine Learning

Global Federated Learning Solutions Market (2020 to 2028)

April 23, 2021
NikolaNews

NikolaNews.com is an online News Portal which aims to share news about blockchain, AI, Big Data, and Data Privacy and more!

What’s New Here?

  • Evolving ITOps with AIOps with no-code AI training with Cloud Pak for Watson AIOps – IBM Developer April 23, 2021
  • Best free PC antivirus software in 2021 April 23, 2021
  • Cybercriminals Using Telegram Messenger to Control ToxicEye Malware April 23, 2021
  • Strategies for a successful Voice of the Customer program April 23, 2021

Subscribe to get more!

© 2019 NikolaNews.com - Global Tech Updates

No Result
View All Result
  • AI Development
    • Artificial Intelligence
    • Machine Learning
    • Neural Networks
    • Learn to Code
  • Data
    • Blockchain
    • Big Data
    • Data Science
  • IT Security
    • Internet Privacy
    • Internet Security
  • Marketing
    • Digital Marketing
    • Marketing Technology
  • Technology Companies
  • Crypto News

© 2019 NikolaNews.com - Global Tech Updates