Doggie52 / QuantConnect-Telegram-Bot

Unofficial Telegram bot for retrieving data from a QuantConnect live algorithm deployment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QuantConnect Telegram Bot

Unofficial Telegram bot for retrieving data from a QuantConnect live algorithm deployment. Supports Oanda accounts.

Commands/Features

  • /get_qc: Gets the current $ NAV from a QuantConnect deployment.
  • /get_oanda: Gets a detailed account summary from an Oanda account, including:
    • NAV
    • Unrealised P&L
    • Realised P&L
    • Margin call %
    • (for each open position) Symbol, Unrealised P&L, Direction, Units

Getting Started

Requirements

  • Windows or *NIX instance
  • (if Windows) Visual Studio 2017
  • QuantConnect account and API key
  • Oanda account and API key
  • Telegram account and Bot API token

Instructions for installation under Windows

  1. Clone into directory of choice.
  2. Fill out the bot-config.json file.
  3. Restore NuGet packages.
  4. Compile and run.

Instructions for installation under *NIX

  1. Follow steps to install Mono for your distro, making sure you install mono-complete.
  2. sudo apt-get update && sudo apt-get install nuget
  3. Clone into directory of choice, cd into this directory.
  4. Fill out the bot-config.json file.
  5. nuget restore QuantConnect-Telegram-Bot.sln
  6. msbuild QuantConnect-Telegram-Bot.sln /p:Configuration=Release
  7. cd QuantConnect-Telegram-Bot/bin/Release
  8. mono ./QuantConnect-Telegram-Bot.exe

If you want to run the process in the background and have it restart automatically if it crashes, replace the last two steps above with the following:

  1. chmod +x ./monitor.sh
  2. nohup ./monitor.sh &

Instructions for Docker deployment

  1. Clone into directory of choice, cd into this directory.
  2. Fill out the bot-config.json file.
  3. Build a Docker image. Example for Google Cloud deployment:
    1. gcloud auth login, follow steps
    2. gcloud config set project [PROJECT_ID]
    3. gcloud builds submit --tag gcr.io/[PROJECT_ID]/quantconnect-telegram-bot .
  4. Run or deploy image as you see fit.

About

Unofficial Telegram bot for retrieving data from a QuantConnect live algorithm deployment.


Languages

Language:C# 92.6%Language:Dockerfile 6.5%Language:Shell 0.9%