API binance script

Job ID: 37594044

Budget: $10 – $30 USD

I want a python code for binance, futures, cross mod.
Coins = [ BTC, ETH ]
I want to globally set 2 RSI values
The value in usdt for making a trade
The levrage
The timeframe in which to check.

If it meets the necessary conditions from the RSI, if it is within the indicated global threshold, to make a market buy.
Once he buys, he should place a Tp at 0.5% compared to the entry price, and a SL at 0.5% compared to the entry price.
If it reaches TP, close half the position, the sl should be cancelled. But in the meantime, open another TP2 order at 1% compared to the Entry Price with a sl at 0.2% above the entry price.


I thought of this logic to be able to place One-Cancels-the-Other limit orders.


(So I logically want this: At market order, we should have:

TP1 set at 0.5% compared to the entry price
TP2 set at 1% compared to the entry price
SL set at 0.5% compared to the entry price.

when it reaches TP1, SL will automatically adjust and be above the entry price at 0.2%)


Important!
If the RSI condition is met, but there is already an active trade, do not place another trade, and wait for the active trade to close.