0% found this document useful (0 votes)
6 views1 page

My Bot

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

My Bot

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

import deriv_api

# Replace with your Deriv API token


token = "YOUR_API_TOKEN"

# Initialize the API


client = deriv_api.Client(token)

# Basic Strategy: Place a "Matches" trade on the last digit


def place_matches_trade(last_digit, expiration_time):
params = {
"contract_type": "DIGITMATCH",
"purchase_amount": 10, # Adjust the stake as needed
"digit": last_digit,
"expiry_time": expiration_time
}
response = client.send("buy", params)
print(response)

# Get the last digit of a specific market


def get_last_digit(market_id):
response = client.send("proposal", {"symbol": market_id})
last_digit = int(response["proposal"]["tick_count"] % 10)
return last_digit

# Main loop
while True:
# Replace with your desired market ID
market_id = "FX_EURUSD"
last_digit = get_last_digit(market_id)
expiration_time = 60 # Adjust the expiration time as needed

place_matches_trade(last_digit, expiration_time)

# Adjust the sleep time to control the frequency of trades


time.sleep(60)

You might also like