Giter VIP home page Giter VIP logo

flatex-order-bot's Introduction

Flatex.at Order Bot

A snapshot of my internal repository. Some working state I guess.

A Matrix chatbot to lose money with Flatex (AT, not sure about DE). Highly overengineered and strongly typed. Best to test this after trading hours or with orders that will never fill.

Development setup

$ cat .envrc
PATH_add /opt/homebrew/opt/node@16/bin
PATH_add node_modules/.bin

$ cat .env
FLATEX_BASE_URL=https://flatex.guidants-trading.de/proxy
FLATEX_PRINCIPAL=123456  # username
FLATEX_CREDENTIAL=password  # password
ONVISTA_BASE_URL=https://api.onvista.de
MATRIX_HOME_SERVER_URL=https://matrix.org
MATRIX_ACCESS_TOKEN=syt_deadbeef
MATRIX_ROOM_ID=!yourfavoritechannel:matrix.org

$ npm start

Quickstart

Create a Matrix bot user and enter access token + authorized channel id (a private chat e.g.). Either write help or just start with the authorization process (2 FA) via authorize. You get a message where you need to enter your PIN, e.g.

<ME>  authorize
<BOT> Enter pin via tan 12 34 56
<ME>  tan 42 00 42
<BOT> Authorization succeeded.

<ME>  cash
<BOT> 1.00 EUR available

<ME>  orders all
<BOT> ✓ 123457201 · GK4810 · 18.07.2022 12:13:14 · A71 · ×1000 · 1.00 · GOLDM.S.BK TUBEAR APC
<BOT> ✓ 123457310 · GK4810 · 18.07.2022 12:13:14 · A71 · ×1000 · 1.00 · GOLDM.S.BK TUBEAR APC

Available commands

[command]

Commands:
  authorize                Authorize transaction PIN
  tan                      Enter pTAN
  balance                  Portfolio balance      [aliases: cash]
  securities               Portfolio securities   [aliases: depot, portfolio]
  orders [mode]            Show orders
  orders-cancel            Cancel order           [aliases: order-cancel]
  orders-buy               Place buy order        [aliases: order-buy]
  orders-sell  [qty]       Place sell order       [aliases: order-sell]
  ko                      Search for knockout certificates

Options:
  --help     Show help
  --version  Show version number

Deployment

Inventory not provided.

$ cat  ansible/inventory-production/group_vars/app/vars
app_flatex_base_url: "{{ vault_app_flatex_base_url }}"
app_flatex_principal: "{{ vault_app_flatex_principal }}"
app_flatex_credential: "{{ vault_app_flatex_credential }}"
app_onvista_base_url: "{{ vault_app_onvista_base_url }}"
app_matrix_home_server: "{{ vault_app_matrix_home_server }}"
app_matrix_access_token: "{{ vault_app_matrix_access_token }}"
app_matrix_room_id: "{{ vault_app_matrix_room_id }}"

# yeet to server
$ ansible-playbook -i inventory-production deploy_app.yml

flatex-order-bot's People

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.