harwee / IQOption-Api

** Unmaintained ** I have rewritten some of the functionality using async if you are want to use the updated code you can use the code from `async` branch
Apache License 2.0
53 stars 54 forks source link

Question #4

Closed gelsas closed 5 years ago

gelsas commented 6 years ago

Hello! I saw you just Startern this api. May I ask on how I can open a trade/position with your api on iqoption ?

Kind regards, Gelsas

gelsas commented 6 years ago

Just saw that it is what you want to implement next, may I ask you when that update will come? Thanks!

Kind regards, Gelsas

harwee commented 6 years ago

I haven't implemented the part to open the trade, but that will be the next thing I am going to add when I get some free time, maybe in a day or two most probably!

gelsas commented 6 years ago

Thank you for the quick answer. I will wait patiently for your update! Are we possible then to check the status of the trade aswell? I mean to check if won or lost ?

Kind regards, Gelsas

harwee commented 6 years ago

Yes you can check the status, when you open a position it's status will be stored in IQOption.positions, when the position is closed status is updated as well and you can check if it's a win or lose,

gelsas commented 6 years ago

Ah okay, what will IQoption.position return when there would be more then one position open?

Thanks for the answers! Really appreciate it!

Kind regards, Gelsas

harwee commented 6 years ago

It will be a dictionary with position id's as keys and it's details as values, mostly for now those will be raw values I receive from server example mostly like this

{3476462611 : [{'amount': 1000000000, 'id': 3476462611, 'refund': 0, 'currency': 'USD', 'currency_char': '$', 'active_id': 76, 'active': 'EURUSD-OTC', 'value': 1.178595, 'exp_value': 1.178595, 'dir': 'call', 'created': 1511087921, 'expired': 1511088000, 'exp_time': 1511088000, 'type_name': 'turbo', 'type': 'front.TU', 'profit': 100, 'profit_amount': 1000, 'win_amount': 1830, 'loose_amount': 0, 'sum': 1000, 'win': 'equal', 'now': 1511087921, 'user_id': 25071253, 'game_state': 0, 'profit_income': 183, 'profit_return': 0, 'option_type_id': 3, 'site_id': 1, 'is_demo': False, 'user_balance_id': 43426144, 'client_platform_id': 9, 're_track': ''}]}
gelsas commented 6 years ago

Ah okay i understand! Thank you.

harwee commented 6 years ago

I was busy and couldn't get free time, I implemented the method to place binary positions, for now, I will implement the digital and forex positions in a few days.

gelsas commented 6 years ago

Is there a connection to Metatrader 4 planned? (https://www.metatrader4.com/en) I could really need such a bridge.

harwee commented 6 years ago

I think this project is going to concentrate on IQOption, for now at least, so not in the near future

mamia77 commented 6 years ago

Could you give me a json msg for digital and buyback?

harwee commented 6 years ago

I didn't get you, what kind of message do you want?

mamia77 commented 6 years ago

Thanks for quick reply, I would like a structure message to open_position(put/call) of digital