Git Product home page Git Product logo

investment-control-server's Introduction

The Investment Control Server

πŸ’ΈπŸ Server for working with StopLoss and TakeProfit strategies via Tinkoff-OpenAPI. Educational project.

Problem

Even a strong investor can find it difficult to keep track of all the events in the market that may affect his assets. Sometimes the stock price can drop by 50% in a couple of minutes while the investor is busy with something else. 😱

Solution

Trust the stock price tracking algorithm! πŸ’‘

This server will help you buy stocks with StopLoss and TakeProfit prices and will constantly poll Tinkoff-OpenAPI to sell stocks in case of non-compliance with your condition.

More detailed

The server is able to work with several clients at once. Each client is able to:

  • Register
  • Update your token from Tinkoff Investments
  • Get a list of stocks
  • Buy stocks with price limits specified
  • Receive notifications about sold stocks

For more information about each request, see the documentation for the relative link /docs, which will be available from the running server. πŸ“‘

Technologies used

  • akka-http - for processing HTTP requests
  • tapir - to generate requests paths and documentation
  • monix - for asynchronous operation of server internals
  • slick - to create SQL queries and connect to PostgreSQL
  • circe - for processing JSON bodies
  • pureconfig - to work with the configuration
  • bcrypt - to encrypt user passwords
  • flyway - for database migration

How to run?

  1. Install sbt and Java 11 (I use openjdk-11-jdk)
  2. Configure the PostgreSQL database and enter the url, user, and password in the application.conf
  3. Get a token in your personal account of Tinkoff Investments and add it to the application.conf
  4. Compile and run the server: sbt compile && sbt run

investment-control-server's People

Contributors

zkerriga avatar

Watchers

James Cloos 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.