Convert my Pinescript into Python Code -- 2

Job ID: 35165909

Budget: ₹600 – ₹1,500 INR

I have some lines of pine script and would like to convert it to python code.
It should be able to use Binance api data and it would be executed when a new (in a chosen timeframe like 1H and coin like USDT/BTC) candle starts. It should have a configuration possibility, so I can put in my vars in the function. I want to have a function call executing with the buy(q:int) or sell(q:int) signal and amount instead of the alert that I put as placeholder.
Related categories: Python Software Architecture Pine Script Trading