'How to run a python code in android device? The code is for stock market and is supposed to run everyday from 9.15 AM to 3.30 PM Indian Standard Time

Here is the problem:

I have an infinite loop in my python file. This loop checks for While(time>=9.30 AM & time <= 3.30 PM).

In this loop I perform a variety of tasks and have many API calls and even a live market data feed (tick based).

I want to be able to run this file from my android.

I want to start this program at 9.12 AM (to establish authentication with the external servers before 9.15 AM).

This code must stop execution at 3.30 PM.

The code should also run everyday from Monday to Friday.

Why Python - The market APIs provided by the broker are in python SDK.

What I am trying to achieve - Bot trading based on some strategy.

Why my Android Phone - I am a working professional and want to run the bot trading in python directly from my android device. I cannot carry my laptop all day everywhere/everyday. This is to generate passive income for me. I want my computer (android) to make small amounts of money everyday for me.

I tried Microsoft Azure functions as well. But before I could deploy the code there, I came across some posts saying that there is an execution limitation of 30 mins in the development account.

So, if, somehow I can make this running in my android phone (without hanging the device) I can save on a lot in cloud costs since this is for my personal consumption.

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source