PocketOption API Integration in Python
Budget: $10 – $30 USD
I'm looking for a Python expert to implement an API for PocketOption. The API will be used to retrieve complete details of open trades in real-time.
Key requirements:
- Proficient in Python
- Experience with API integration
- Familiarity with trading platforms, preferably PocketOption
- Ability to handle real-time data updates
- Capability to return and process complete trade details
Below the is github page:
https://github.com/iqoptionapi/iqoptionapi/
I am looking for someone to give me the output of placed trade from the account and also placed a trade to account.
I tried but I am not getting :
api = pocketoption(ssid, True)
# Get current balance
print(f"GET BALANCE: {api.GetBalance()}")
# Fetch candle data
#df = api.GetCandles("EURUSD_otc", 1, count=420)
#print(df)
def get_open_orders():
open_orders = api.GetOpenOrders() # Replace with the correct method if different
print(f"Open Orders: {open_orders}")
return open_orders
def buy(self, amount, active, action, expirations):
self.api.buy_multi_option = {}
self.api.buy_successful = None
req_id = "buy"
try:
if req_id not in self.api.buy_multi_option:
self.api.buy_multi_option[req_id] = {"id": None}
else:
self.api.buy_multi_option[req_id]["id"] = None
except Exception as e:
logging.error(f"Error initializing buy_multi_option: {e}")
return False, None
global_value.order_data = None
global_value.result = None
self.api.buyv3(amount, active, action, expirations, req_id)
start_t = time.time()
while True:
if global_value.result is not None and global_value.order_data is not None:
break
if time.time() - start_t >= 5:
if isinstance(global_value.order_data, dict) and "error" in global_value.order_data:
logging.error(global_value.order_data["error"])
else:
logging.error("Unknown error occurred during buy operation")
return False, None
time.sleep(0.1) # Sleep for a short period to prevent busy-waiting
return global_value.result, global_value.order_data.get("id", None)
I have already installed all packages for python and system is ready to use at my side.
Key requirements:
- Proficient in Python
- Experience with API integration
- Familiarity with trading platforms, preferably PocketOption
- Ability to handle real-time data updates
- Capability to return and process complete trade details
Below the is github page:
https://github.com/iqoptionapi/iqoptionapi/
I am looking for someone to give me the output of placed trade from the account and also placed a trade to account.
I tried but I am not getting :
api = pocketoption(ssid, True)
# Get current balance
print(f"GET BALANCE: {api.GetBalance()}")
# Fetch candle data
#df = api.GetCandles("EURUSD_otc", 1, count=420)
#print(df)
def get_open_orders():
open_orders = api.GetOpenOrders() # Replace with the correct method if different
print(f"Open Orders: {open_orders}")
return open_orders
def buy(self, amount, active, action, expirations):
self.api.buy_multi_option = {}
self.api.buy_successful = None
req_id = "buy"
try:
if req_id not in self.api.buy_multi_option:
self.api.buy_multi_option[req_id] = {"id": None}
else:
self.api.buy_multi_option[req_id]["id"] = None
except Exception as e:
logging.error(f"Error initializing buy_multi_option: {e}")
return False, None
global_value.order_data = None
global_value.result = None
self.api.buyv3(amount, active, action, expirations, req_id)
start_t = time.time()
while True:
if global_value.result is not None and global_value.order_data is not None:
break
if time.time() - start_t >= 5:
if isinstance(global_value.order_data, dict) and "error" in global_value.order_data:
logging.error(global_value.order_data["error"])
else:
logging.error("Unknown error occurred during buy operation")
return False, None
time.sleep(0.1) # Sleep for a short period to prevent busy-waiting
return global_value.result, global_value.order_data.get("id", None)
I have already installed all packages for python and system is ready to use at my side.