Giter VIP home page Giter VIP logo

discordalertstdapitrader's Introduction

DiscordAlertsTrader: Discord Alerts Trader Bot


DiscordAlertsTrader is a python package to get messages from a subscribed discord channel where buy and sell stock and options signals are messaged. The package will parse the messages and execute the trades for traders specified in the config file.

Trades are done through TDAmeritrade API.

What this package does:

  • Read messages and parse trading singals, e.g. BTO (Buy to Open), STC (Sell to Close), partial STC, SL (Stop Limits), PT (Profit Taking)
  • Track trading signals and performance of traders using message history and realtime price
  • Execute and cancel orders, check order status, account status and current ticker prices

Currently, the package is for parsing signals of the discord group Xtrades.

Invite link to Xtrades: https://discord.gg/fMANuG8tR9

DiscordChatExporter dependency


It requires DiscordChatExporter CLI version (tested in Linux and Windows). https://github.com/Tyrrrz/DiscordChatExporter For Linux, first intall .NET Core v3.1, as indicated in the DiscordChatExporter exporter.

Once installed, edit config_example.py and save it as config.py. There needs to be:

Path to the DiscordChatExporter dll:

path_dll = "DiscordExtractor/DiscordChatExporter.Cli.dll"

Discord token to access discord message chats:

discord_token = "token0Y03e..."

Channel ID of the channel were trading alers are messaged:

channel_IDS = {"stock_alerts": 6666,
               "option_alerts": 4444,
               "options_chat": 5555}

Channels from wich actually get trading alerts:

CHN_NAMES = ["stock_alerts","option_alerts"] 

TDAmeritrade


To access the TDAmeritrade account for trading and info is necessary to install td-ameritrade-python-api from:

pip install td-ameritrade-python-api

Follow the instructions from the github repository to set up an API developer account and get a tocken: https://github.com/areed1192/td-ameritrade-python-api

Once installed, edit secrets_api_example.py and save it as secrets_api.py. There needs to be:

auth = {
'client_id':'AADDAD',
'redirect_url':'https://127.0.0.1',
'credentials_path':'secrets_td.json',
}

Setup and Run


Once downloaded the package, install the dependencies listed in requirements.txt. Then open a terminal, cd to the folder directory of the package and type:

python setup.py

This will provide an URL link where to login into TD ameritrade developer API in order to get the credentials:

Run the Command Line Interface:

python real_time_exporter.py

Currently, the GUI is not available as it needs to be updated with current external package versions.

WARNING


This is still a Work in Progress project. I get good results using the package, If you plan to use it, USE AT YOUR OWN RISK.

discordalertstdapitrader's People

Contributors

adonunes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.