Vega Intelligent Solutions - Software Suite
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

#Vega project POC

This proof of concept uses several APIs to allow the user to gather crypto currency market data and to interact with a AI bot. To run this demo locally you will need to

  1. Download and install python at url:
  2. Create a Telegram bot and download ngrok to run locally
  3. Sign up with Google's dialogflow site
  4. Set the telegram bot and dialogflow tokens in the
  5. Run the or with python.exe

#Telegram Bot

  1. Download telegram for your respective operating system at url:

  2. Download ngrok at url:

  3. Once telegram is installed you have to converse with the bot father to create your bot. Go to url: .Once done the bot father will give you the bot's token.

  4. If running the module, find the location of ngrok.exe and run ngrok http a. Telegram requires the web hook url to use https so select the https version, it will look like this url: b. Find your bot token from the bot father and take the ngrok and then set the telegram web hook in a browser. The values are fake for clarity so replace your respective values. Make sure to leave the bot prefix in front of the token. If successful, your browser will return the following json:

  5. You should now be ready to start conversing with your bot and telegram should route your traffic to your local machine.

#Dialog Flow Setup

  1. Google's dialog flow allows us to pass what the user typed into the telegram bot and to parse out key values. Google has steps you need to follow to start creating intents at
  2. Once you sign up and navigate to the console window at you will see a link to create a new agent. Name it whatever you want and then click on the settings -> Export and Import
  3. Find the intents backup located in this project under Bots -> IntentsBackup ->
  4. Click on Restore from Zip and upload the zip file.
  5. You should now see the intents
  6. In the top right corner ask the agent a question and click on Copy Url which will give you a long curl command, navigate to the end of the line and you will see the Bearer token
    ...  -H 'Authorization:Bearer 88664e99886a55abd954c332bc3021z11'

the value is fake for demo purposes of course. Take this value and insert it in the value named apiai_bearer, see example:

   apiai_bearer="Bearer 8664e99886a55abd954c332bc3021z11"
  1. Once you start asking the telegram bot questions our code will send the message to google's dialog and it figures out the intent, action and parses out values such as the coin you asked it.
  2. Disclaimer, this is just a demo and you should not share these values with anyone.

#Docker If you are using Windows 10 Home, you will have to use the Quickstart terminal which is a work around for not having Windows 10 Pro Reference:

navigate to the taxreport directory:
if using quickstart terminal it is cd c/VegaIS/app/taxreports

docker build -t treport:latest .
docker run -d -p 5000:5000 treport

if using quickstart terminal it is cd c/VegaIS/app/vegatrading

docker build -t vtrade .
docker run -d -p 5001:5001 vtrade

If you get an error like this:
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to to create one.

type docker login and enter your username. 

#Stand Alone command line #make sure to run pip install -r C:\VegaIS\requirements.txt Check the in C:\VegaIS\Config and set the path of the sqlite data base reports_db = 'C:/VegaIS/app/taxreports/'

Assuming you have installed python version 3.3.2 or higher you can run the modules by themselves at the command prompt.

C:\Users\usr1\AppData\Local\Programs\Python\Python36\python.exe C:/VegaIS/app/vegatrading/
Running trading:
    python.exe C:/VegaIS/app/vegatrading/
    console results when running:

    C:\WINDOWS\system32>C:\Users\usr1\AppData\Local\Programs\Python\Python36\python.exe C:/VegaIS/app/vegatrading/
    Using TensorFlow backend.
    INFO:engineio:Server initialized for eventlet.

Running reports:
C:\Users\usr1\AppData\Local\Programs\Python\Python36\python.exe C:/VegaIS/app/taxreports/

python.exe C:/VegaIS/app/taxreports/

Adjust the paths depending on how you downloaded the project. #You can configure the upload path and base in the config as well: ``` taxreport_base = 'C:/VegaIS/app/taxreports/' reports_db = 'C:/VegaIS/app/taxreports/' uploads = 'C:/VegaIS/app/taxreports/uploads/'

#if both modules are running you should be able to navigate to a browser: url: url:

#Resolving Module and package settings in windows You may get an error related to importing Bot.currencybot or MLBOT when running or with python by itself. To resolve this issue reference url: Open a command prompt and set the root path of the folder that you downloaded the project to.