iqoptionapi icon indicating copy to clipboard operation
iqoptionapi copied to clipboard

Error when try buy no OTC active

Open l4p4 opened this issue 6 years ago • 5 comments

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":{}}}

l4p4 avatar Jun 09 '18 02:06 l4p4

@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”

Lu-Yi-Hsun avatar Jun 09 '18 03:06 Lu-Yi-Hsun

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

l4p4 avatar Jun 09 '18 03:06 l4p4

@LarryPavanery In holiday only have OTC

Lu-Yi-Hsun avatar Jun 09 '18 04:06 Lu-Yi-Hsun

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:

  • 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.

l4p4 avatar Jun 13 '18 22:06 l4p4

  • 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

TheHolsback avatar Dec 14 '21 18:12 TheHolsback