Open remarco opened 6 years ago
hello @remarco the complete script is: from iqoptionapi.api import IQOptionAPI import datetime import time import logging logging.basicConfig(format='%(asctime)s %(message)s')
api = IQOptionAPI("iqoption.com", "email", "Password")
api.connect() time.sleep(0.5) print 'Your current blance is: {:.2f}'.format(api.profile.balance)
api.getcandles(1, 60, 25)
time.sleep(0.25) data = api.candles.candles_data for candles in data: st = datetime.datetime.fromtimestamp(candles[0]+60).strftime('%Y-%m-%d %H:%M:%S') """ candles data 0th entry: timestamp of candle 1st entry: where candles starts in the interval 2nd entry: where candles finishes in the interval 3rd entry: upper wick 4th entry: lower wick """ print st, candles
while api.timesync.server_datetime.second != 48: print api.timesync.server_datetime.second
api.buy(1, 1, "turbo", "call") time.sleep(0.5)
work all but don't open a buy call position,i don't know
ty.
Your script work ? Please post your script
i not a programmer . i dont know if it work right now.
2018-02-14 01:46:43,888 {"msg": {"direction": "call", "price": 100, "act": 101, "exp": 1518565668.0, "time": 1518565608, "type": "turbo"}, "name": "buyV2"} 2018-02-14 01:46:43,947 {"name":"buyComplete","request_id":"","msg":{"isSuccessful":false,"message":["Invalid request"],"result":{}}} 2018-02-14 01:46:44,098 {"name":"timeSync","msg":1518565609114}
cant bay :(
remove the .0 from the exp value
api.buy(100, 101, "turbo", "call") there is not exp value... this must be in api :( i think
`def call(self, price, active, option, direction): """Method to send message to buyv2 websocket chanel. :param price: The buying price. :param active: The buying active. :param option: The buying option. :param direction: The buying direction. """ exp = self.api.timesync.expiration_timestamp
if datetime.datetime.now().second > 30:
exp = exp - (exp % 60) + 60
else:
exp = exp - (exp % 60)`
i dont know how to remove there .0
Hello, please help, here is my code:
import time from iqoptionapi.api import IQOptionAPI
if name == 'main':
api = IQOptionAPI("iqoption.com", "MyUsername", "MyPassword")
api.connect()
time.sleep(1)
api.setactives([1, 2])
api.getcandles(1, 60, 25)
time.sleep(1)
data = api.candles.candles_data
print(data)
But it prints "None". Where is my mistake?
put time.sleep after api.getcandles. and if you iqoptionapi install like pip install iqoptionapi it work without 3 parameter. beter download manualy and reinstall...
Did anyone find a solution to this problem?
@remarco
Its been such a long time since anyone has used this program, I hope that only means you have 1 year of experience with using this program and can help share your experties :)
st = datetime.datetime.fromtimestamp(candles[0]+60).strftime('%Y-$ ^ SyntaxError: EOL while scanning string literal
what must be at end of line?