Giter Site home page Giter Site logo

drixie / royaloak Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maxstue/vite-reactts-electron-starter

0.0 0.0 0.0 3.52 MB

Starter using Vite2 + React + Typescript + Tailwind + Electron Starter.

License: MIT License

Shell 0.05% JavaScript 6.96% TypeScript 2.53% CSS 0.01% HTML 90.31% Python 0.13%

royaloak's People

Contributors

ambarvm avatar dev-sr avatar drixie avatar maxstue avatar rylorin avatar saikksub avatar tararjawad avatar

royaloak's Issues

Debug and Address Issues with Rules Execution - V1/PP23

Rules execution works right now, but sporadically. Sometimes it works fine, and other times, it does not. Some test and debugging of the existing code is required.

The code logic may need to be re-written for accuracy, clarity, and extensibility

Fetch Realtime Data and Bar Data (historical) from Interactive Brokers using Stoqey Node-IB Library

  1. The end goal is to use this data for (a) calculating indicator values, (b) executing order rules for assets
  2. Calculated indicator data should be saved in the database for each asset (Idris to show Fabio how to use existing python code for indicator calculations... there are no reliable nodejs libraries for indicator calculations)
  3. The data should be fetched for all assets saved in the watchlist

Notes:
a) This data will eventually be used to display charts and levels in the TradingView Library

History Data Endpoint

request format: ?exchange={EXCHANGE}_{symbol}&tf={timeframe}&from={FROM}&to={to}

example: ?exchange=NASDAQ_AAPL&tf=1D&from=1660568058000&to=1660654458000

exchange = Exchange an underscore followed by the ticker of the requested instrument
tf = timeframe required for the candles : 1s,1m,1h,1d

Response: array of Bars

Bar is an object with the following fields:

time: number. Amount of milliseconds since Unix epoch start in UTC timezone. time for daily bars is expected to be a trading day (not session start day) at 00:00 UTC. Charting Library adjusts time according to [Session] from SymbolInfo. time for monthly bars is the first trading day of the month without the time part.
open: number. Bar's open value
high: number. Bar's high value
low: number. Bar's low value
close: number. Bar's close value
volume: number. Bar's volume value

Example bar:
{
close: 1189.8
high: 1197
low: 1116.5
open: 1125.5
time: 1660568058000
volume: 22159225.71
}

Endpoints required for Charting Library: 1: Symbol Info for each symbol on IBKR

Symbol Info:

Example Request: /api/markets?ticker=BINANCE:BNBBTC
Request Format: /api/markets?ticker={EXCHANGE}:{SYMBOL}

mentioned in the curly braces {} are the variables same as the objects in the response example

Example Response:

{
"id": "62eb98a0359dcce08fca66db",
"symbol": "BNBBTC",
"exchange": "BINANCE",
"type": "SPOT",
// Possible types are: stock index forex
"description": "BNB/BTC SPOT", // Description of a symbol. Will be displayed in the chart legend for this symbol.
"pricescale": 100000000, // pricescale defines the number of decimal places. It is 10^number-of-decimal-places. If a price is displayed as 1.01, pricescale is 100; If it is displayed as 1.005, pricescale is 1000.
"ticker": "BINANCE_SPOT:BNBBTC", // ticker is the unique identifier of the symbol that is used only inside the Library. Your users will never be able to see it.
"session": "0930-1600"// A trading session defines the hours in a week when a symbol is actively traded on an exchange. The trading session of a symbol is passed to the Charting Library : tip: use this parser to test http://tradingview.github.io/checksession.html
"session_holidays": [20181105,20181107,20181112] , //List of holidays for this symbol. These dates are not displayed on the chart. It's a string in the following format:
YYYYMMDD[,YYYYMMDD].
"timezone": "US/Mountain", // Timezone of the listed exchange in olsondb format
has_intraday: true,
has_seconds: true,
has_no_volume: false,

volume_precision: 2, // Integer showing typical volume value decimal places for a particular symbol. 0 means volume is always an integer. 1 means that there might be 1 numeric character after the comma.
}

If you have access to Trading view charting library check for further fields you can possibly add in symbol info object from the IBKR api. Here:
https://github.com/tradingview/charting_library/wiki/Symbology#symbolinfo-structure

We need this info for each symbol that we show the data for. Because we need to tell tradingview library these things, for example, has_intraday true implies that this symbol supports intra day timeframe, which means we can provide the data for seconds, minutes and hours timeframes.
Another example, sessions: we need to tell the library what trading sessions the symbol is traded on, so the library shows the green or red icon of the trading status e.t.c.

Fetch Historical Data (from IB)

Time frames: 1 min, 5 min, 15 min, 1 hr, 8hr, 1D, 1W

This will be used for calculating indicator values used for setting levels and executing rules

Fetch/Code Aggregated Market Depth Data - V1/PP25

  1. Attempt to see if aggregated market depth data can be appropriately fetched from IBKR API.

  2. If approach 1 is not possible, write logic to aggregate market depth data from the full data fetched from IBKR API.

  3. Expose both full data and aggregated data for consumption in the frontend.

High Level Milestones

Month 1 - Develop alpha version for Idris to use and share with other traders
Month 2 - Develop rules execution
Month 3 - Do a rewrite from scratch for the launchable version with subscription

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.