The objetive is to extract the XBT/USD value from this website: https://www.bitmex.com/ I got this code from another question and tried to edit it for the need but it returns the QTUMU17 value.
Option Explicit
Sub BitMEX_BTC_USD()
'Open website
Dim IE As New SHDocVw.InternetExplorer
IE.Visible = True
IE.Navigate "https://www.bitmex.com/"
Do While IE.ReadyState <> READYSTATE_COMPLETE
Loop
'Extract USD value
Dim kfc As String
Dim oHTML_Element As IHTMLElement
For Each oHTML_Element In IE.Document.getElementsByTagName("span")
If oHTML_Element.className = "PlusTick" Then
kfc = oHTML_Element.innerText
End If
Next
'Value
Debug.Print kfc
End Sub
HTML code according to inspect element:
<i class="price">2765.3</i>
Thanks in advance for your valuable help.