Code Monkey home page Code Monkey logo

websocket-ticker-to-candle's Introduction

websocket-ticker-to-candle

Please note

While the gist of this repository is fully functional ticker streaming setup which can stream websocket data and save the resampled one minute OHLC to db. Volume data is not stable where as OHLC data is verified.

Currently streaming of websocket for symbols is done only for Alice Blue

Prerequisites

Runs only in Python3.X

How to RUN

Run below command in terminal activating the environment where you've all dependencies installed.

python3 stream_ws.py

or

python stream_ws.py

Databases

SQLITE : sqlite is used to store all the ticks for all the symbols

MYSQL : MySql is used to store all the re-sampled one minute OHLC data into respective symbol table, you can replace mysql with any database of your choice.

Make sure you've dependencies installed ahead following requirements.txt

websocket-ticker-to-candle
│
├── credentials
│    ├── env_crendentials.json
|    └── access_tokens.json ( This is auto updated day basis)
├──── data
│    └── stock_data_db.db
├────systemutil
│    └── util.py
│    └── tel_msgr.py
└─── stream_ws.py

Telegram notifications

The below line send's a message during the beginning of the websocket.

Also you could you it your own diff purposes. If you're willing to use,make sure you've created your own bot using BotFather Telegram is altogether a different. ocean.

If you not interested you can just DELETE/ Comment the line.

tel_utl.sendMsg("1> Job execution begun at {0}".format(
            datetime.datetime.now()))

Dependent Libraries

websocket-ticker-to-candle's People

Contributors

quantmechanics 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.