Skip to content

prodipta/kite-postback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kite-postback

A basic web-hook postback handler for handling postback/ webhook from Zerodha Kite API trades. You can use the systemd (or similar) service to daemonize this python app.

sudo touch /etc/systemd/system/kite-postback.service
sudo chmod 664 /etc/systemd/system/kite-postback.service
sudo vi /etc/systemd/system/kite-postback.service

Inside the file define the followings

[Unit]
Description=Kite Order Postback webhook service
After=multi-user.target

[Service]
Type=simple
User=yourpreferredusername
WorkingDirectory=/path/to/the/code
ExecStart=/usr/bin/python /path/to/the/code/postback.py

[Install]
WantedBy=multi-user.target

Save and exit. Then reload systemd and start the service

sudo systemctl daemon-reload
sudo systemctl start kite-postback

By default the service will run on localhost at port 9000. Change these in the config file. If you are running this app from localhost, you would need to set up a reverse proxy so that the postback actually reaches the app.

For the specification of the postback data and interpretation, see here

About

A basic web-hook postback handler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages