Live Equity and Future comparison (basis, basis percent) with order placement using Zerodha Kite APIs and Next.js
cash-vs-future.mp4
- Equity Ask and Future Bid comparisons with basis and basis percentage
- Sorted in descending order of basis percentage in real time
- Vertically resizable and scrollable table to adjust views when needed
- Prices displayed - First Ask for Equity stocks and First Bid for Future stocks
- Order placement for a single pair when the basis percent crosses the given entry basis percent
- Light and Dark theme
The default port is 8000
.
The default redirect route is /login
.
So, the application expects to get a redirect request at http://localhost:8000/login
after successful login. Either update your Redirect URL
in Kite Developer Portal or update the login handler route. To change the port, update the dev
and start
scripts in package.json
.
Edit src/config.ts
to configure:
STOCKS_TO_INCLUDE
- Update list of stocks which should be monitored
Install dependencies.
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
Start the app to login for the first time to get and cache your access token.
npm run dev
You should see a "Session Expired" message in the top right corner. Click on it and login After successful login, click on the refresh data button to fetch or update instrument data.
Start in development mode
npm run dev
Build and start production server.
npm run build
npm start
- Implementing an exit strategy for the stock pair that did enter
- Configurable number of pairs to enter/exit along with configurable entry basis percentages