Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Algotrading strategies for Indian Stock Markets

License

NotificationsYou must be signed in to change notification settings

aakashlpin/kha-ching

Repository files navigation

SignalX is a trading app for anyone looking to diversify their funds into systematic and algorithmic intraday trading strategies.

✅ Read everything about SignalXhere.

Once you've gone through the Notion doc above, come back here for instructions to setup SignalX!

Setup Prerequisites:

  1. Sign up on DigitalOcean using this link. You'd receive $100 in new signup credits valid for 2 months. Running this app costs $10/month. So you'd be able to run it FREE for first 2 months.
  1. Gotohttps://kite.trade and sign up for Kite Connect. Create an app and pay Zerodha the ₹2000/month fee.

    • Ignore theRedirect URL andPostback URL fields for now.
    • CopyAPI Key andAPI Secret fields and keep them handy somewhere.
  2. Gotohttps://redislabs.com/try-free/ and sign up for a "Cloud" redis account.

    • Activate your database and name itsignalx
    • Copy theEndpoint andUser Password fields to construct the following Redis URL -redis://:{User Password}@{Endpoint}. Keep this handy. (remove the curly braces)

Update - Redislabs free tier drops connections very often. Recommend upgrading to a paid tier for a seamless trading experience.

1-click Installation

Deploy to Render

or, deploy the application on DigitalOcean's (DO) apps platform.

Deploy to DO

Environment variables

Environment variables are private setting variables that configures this application to run on your Zerodha account.

KITE_API_KEY

Paste the Kite API key that you copied from Step #1. Ensure to tickEncrypt.

KITE_API_SECRET

Paste the Kite Secret key that you copied from Step #1. Ensure to tickEncrypt.

SECRET_COOKIE_PASSWORD

Thismust be a 32 digit alphanumeric string. Generate a 32 digit password from here -https://1password.com/password-generator/. Ensure to tickEncrypt.

REDIS_URL

Paste the Redis URL generated from Step #2. Ensure to tickEncrypt.

MOCK_ORDERS

Set it totrue if you'd simulate orders but not actually place them on Zerodha. Comes in handy if you're looking to develop this application locally. Ignore it otherwise.

NEXT_PUBLIC_DEFAULT_LOTS

Default lots that you trade on a regular basis. This is only the default initial value in the form and is changeable before taking the trade.

for e.g. If you regularly trade150 quantity of Nifty Options, you'd enter2 lots here.

NEXT_PUBLIC_DEFAULT_SKEW_PERCENT

Default skew that you're okay with when selling straddles. Anywhere between 5-15 is a good value. The value here only serves as a default and can be changed before setting up daily trades.

NEXT_PUBLIC_DEFAULT_SQUARE_OFF_TIME

Default square off time of the strategy. The value here only serves as a default and can be changed per strategy during the strategy setup when taking daily trades. Format is 24 hours hh:mm. i.e. enter15:20 as value if you mean 3.20pm.

NEXT_PUBLIC_APP_URL

Enter${APP_URL} here or leave this value as it is if you're doing a fresh setup as the value will be correctly prefilled for you.

SIGNALX_API_KEY

Upgrade toSignalX Premium to receive your API key. SignalX Premium gives you access to technical indicators required to trade certain strategies.

DATABASE_HOST_URL

DATABASE_USER_KEY

DATABASE_API_KEY

Follow the upgrade guide here to get values for all these 3 variables.

NEXT_PUBLIC_DEFAULT_SLM_PERCENT

Default percent of SLM BUY orders to be placed after initial order goes through. The value here only serves as a default and can be changed before setting up daily trades.

NEXT_PUBLIC_GIT_HASH

Leave the value in this field as it-is. This'll inform if there's an app update available in the app UI. If there's an update available, you can hit the "Deploy" button in your DigitalOcean app to install the new build for yourself.

Next Steps

  • DigitalOcean Step 2: After entering all environment variables in setup Step 1, proceed to the next step and selectBangalore as region.
  • DigitalOcean Step 3: Select$5/mo container size from theBasic size dropdown. Ensure you see$5 as theMonthy App Cost.
  • Click onLaunch Basic App.
  • Give it 5mins, let the application get build.
  • Once successfully built, GotoSettings of this app, and copy the URL where DigitalOcean hosted this application for you.
  • Go back to thekite app, and now enter Redirect URL as follows:{url_from_digitalocean}/api/redirect_url_kite. It should look something like thishttps://qwe-qwerty-gex5y.ondigitalocean.app/api/redirect_url_kite (only an example - yours will differ). PressSave!

Using the application

  • Bookmark the URL, or save it to your homescreen. You'd need it every trading day!
  • Zerodha automatically expires the authentication token required to access the APIs at around 7.35am. You're required to login to this app every day after 7.45am to generate a new access token.
  • Once logged in, you'd need to setup your trades for the day.This needs to be done everyday!.Trades setup after market hours will fail the next day as the API access token would have expired.

Data and Security

  • All access tokens are saved via a first-party cookie in your browser and are encrypted via theSECRET_COOKIE_PASSWORD environment variable. Whatever you do,DO NOT share this with anyone!
  • Redis is used for scheduling the tasks or running them on spot.DO NOT share your redis URL with anyone as it contains your Zerodha profile details alongwith API access tokens.

Develop locally

In case you'd like to contribute, you can run the development server like so

yarnyarn dev

Openhttp://localhost:3000 with your browser to see the result.

License

SignalX isMIT licensed.

About

Algotrading strategies for Indian Stock Markets

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp