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
52 stars 54 forks source link

How to get the current value of an option ????? #51

Closed MightyMaxSaviorOfTheUniverse closed 5 years ago

MightyMaxSaviorOfTheUniverse commented 5 years ago

Hello

In order to determine what the trend intensity of an option is, I need to know what that option's current market value is.

I tried using the 'EURUSD.subscribe_to_candle_interval_sync(60)' but none of those values are the current market value of the stock. The ask and bid do not chance as often as the graph you get in IQoptions

'iqoption.portfolio.items()' and 'item.value' only work once you have already placed a bet which doesn't help much if you are trying to determine in which direction you want to go.

How do I gain the current market value of the stock?

MightyMaxSaviorOfTheUniverse commented 5 years ago
data=str(Stock.candles).split("'close': ")
C=float(data[len(data)-1].split(",")[0])# Current value of stock