Yes sir, you can definitely do that.
The Custom Bridge is designed exactly for these kinds of integrations.
You simply need to send a webhook request from your Python code whenever your trading conditions are satisfied.
The important part is:
-UP โ Executes the configured Upside Execution
-DOWN โ Executes the configured Downside Execution
-EXIT โ Squares off the existing position
Below is a simple Python example:
import requests
WEBHOOK_URL = "https://apiv4.algodelta.com/api/v4/users/bridge/webhook/151841/Test123"
def send_signal(signal):
response = requests.post(
WEBHOOK_URL,
data=signal,
headers={
"Content-Type": "text/plain"
}
)
print(response.status_code)
print(response.text)
# Buy Signal
send_signal("UP")
# Sell Signal
send_signal("DOWN")
# Exit Existing Position
send_signal("EXIT")
Now you just have to call the function wherever your strategy conditions are met.ย
Example:
if buy_signal:
send_signal("UP")
elif sell_signal:
send_signal("DOWN")
elif exit_signal:
send_signal("EXIT")
That’s it.
Whenever your Python strategy sends:
-UP โ AlgoDelta executes the Upside configuration
-DOWN โ AlgoDelta executes the Downside configuration
-EXIT โ AlgoDelta exits the active position
This is one of the easiest ways to integrate Python strategies with AlgoDelta’s Custom Bridge.