Lu-Yi-Hsun / iqoptionapi

IQ Option API
372 stars 288 forks source link

Error when try buy no OTC active #20

Open l4p4 opened 6 years ago

l4p4 commented 6 years ago

Hi, someone having the following problem? Working when active is OTC.

Im try: api.buy(100, "EURUSD", "call", 1, False) so I get the follow message No se puede crear la opción (de bienes)

LOG:

...
2018-06-08 23:26:02:DEBUG: {"msg": {"direction": "call", "price": 50, "act": 1, "exp": 1528511220, "time": 1528511160, "type": "turbo"}, "name": "buyV2"}
2018-06-08 23:26:02:DEBUG: {"name":"timeSync","msg":1528511162577}
2018-06-08 23:26:03:DEBUG: {"name":"buyComplete","request_id":"","msg":{"isSuccessful":false,"message":["No se puede crear la opción (de bienes)"],"result":{}}}
Lu-Yi-Hsun commented 6 years ago

@LarryPavanery Here have name https://github.com/Lu-Yi-Hsun/iqoptionapi/blob/master/ACTIVE_CODE.txt

Today is holiday so you need otc

“EURUSD-OTC”

l4p4 commented 6 years ago

Hi @Lu-Yi-Hsun, The active EURUSD don't work? I have the same problem with EOSUSD.

Lu-Yi-Hsun commented 6 years ago

@LarryPavanery In holiday only have OTC

l4p4 commented 6 years ago

Hi @Lu-Yi-Hsun , I checked that the error occurs when the asset is closed.

captura de tela 2018-06-13 as 19 22 59

Suggestion:

TheHolsback commented 2 years ago
  • Maybe throw an exception and handle the message. Then, in the case of a Bot, it could get the time for the asset to open again and create a schedule.

I'm looking for this function