An Olymptrade API
Budget: ₹750 – ₹1,250 INR
import time
from olymptrade_api import Api
# Enter your Olymp Trade API token and email
api = Api('<your-api-token>', '<your-email>')
# Define the trade parameters
asset = 'USD/OTC'
amount = 10
duration = 15
direction = 'up'
# Place the trade
response = api.buy(amount=amount, duration=duration, direction=direction, pair=asset)
# Print the response
print(response)
# Wait for the trade to expire
time.sleep(duration * 60)
# Get the trade result
result = api.get_options_closed_v2(response['id'])
print(result)
from olymptrade_api import Api
# Enter your Olymp Trade API token and email
api = Api('<your-api-token>', '<your-email>')
# Define the trade parameters
asset = 'USD/OTC'
amount = 10
duration = 15
direction = 'up'
# Place the trade
response = api.buy(amount=amount, duration=duration, direction=direction, pair=asset)
# Print the response
print(response)
# Wait for the trade to expire
time.sleep(duration * 60)
# Get the trade result
result = api.get_options_closed_v2(response['id'])
print(result)