Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions iqoptionapi/stable_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,12 +928,16 @@ def buy_digital_spot(self, active, amount, action, duration):
# And need to be on GMT time

#Type - P or C
if action == 'put':
action = 'P'
elif action == 'call':
action = 'C'
if isinstance(action,string):
if action.lower() == 'put':
action = 'P'
elif action.lower() == 'call':
action = 'C'
else:
logging.error('buy_digital_spot active error')
return -1
else:
logging.error('buy_digital_spot active error')
logging.error('buy_digital_spot active error: need action as text')
return -1
# doEURUSD201907191250PT5MPSPT
timestamp = int(self.api.timesync.server_timestamp)
Expand Down