Coder Social home page Coder Social logo

anurag-roy / shoonya-option-chain Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 5.0 397 KB

Live Option Chain for Equity Derivatives using Finvasia Shoonya APIs and Next.js

License: MIT License

JavaScript 0.55% TypeScript 98.93% CSS 0.51%
finvasia nextjs nse option-chain options-trading shoonya stock-market tailwindcss

shoonya-option-chain's Introduction

Option Chain

Live Option Chain for Equity Derivatives using Finvasia (Shoonya) APIs and Next.js

option-chain

Features

  • Grouped stocks for easily monitoring relevant stocks
  • Connect from multiple tabs to monitor different groups of stocks
  • Vertically resizable and scrollable tables to adjust views when needed
  • Prices displayed - First Bid and First Ask for options and LTP for equities along with change from previous day's close
  • Options displayed
    • CE: Only Call options with strikes lesser than the LTP
    • PE: Only Put options with strikes greater than the LTP
    • A percentage of options close to the LTP on both sides are ignored. See DIFF_PERCENT
  • Place Sell orders directly from the UI

Screenshots

initial-view

all-view

group-view

order-with-cash

order-with-shortfall

Setup

Install dependencies. (npm or yarn is recommended)1

npm install

Setup environment secrets in an env.json file by copying the example.env.json file. For further customisation, see configuration.

cd src
cp example.env.json env.json
# Populate env.json secrets

Populate the SQLite DB with instrument data.

npm run data:prepare

Usage

Start in development mode

npm run dev

Build and start production server.

npm run build
npm start

Configuration

Port

The default port is 3000. To change it, update the dev and start scripts in package.json.

config.ts

Edit src/config.ts to:

  • GROUPS - Update stock dropdown options and relevant grouping
  • EXPIRY_OPTION_LENGTH - Expiry dropdown options
  • DIFF_PERCENT - Control the range of strikes to ignore (depending on the LTP of the equity instrument).

Related

Contact

License

MIT © 2023 Anurag Roy

Footnotes

  1. The app uses this Next.js plugin to maintain a WebSocket Server, which patches some files in node_modules. I have tried using pnpm but it does not work reliably. See other caveats here.

shoonya-option-chain's People

Contributors

anurag-roy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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