Sub httppost()
Dim xmlhttp As Object, myurl As String, body As String, auth As String
Set xmlhttp = CreateObject("MSXML2.serverXMLHTTP")
myurl = "https://console.developer.deutsche-boerse.com/apis/accesstot7-referencedata/1.1.0/"
auth = "{ " & """X-DBP-APIKEY""" & " : " & """68cdafd2-c5c1-49be-8558-37244ab4f513""" & " }"
contype = """{ application/json }"""
xmlhttp.Open "POST", myurl, False
xmlhttp.setRequestHeader "Content-Type", contype
xmlhttp.setRequestHeader "Authorization", "Basic " + auth
body = """query {" & vbCrLf & _
"ProductInfos{" & vbCrLf & _
"data {" & vbCrLf & _
"ProductType" & vbCrLf & _
"}}}"""
xmlhttp.Send body
ThisWorkbook.Worksheets("Tabelle1").Range("A1").Value = xmlhttp.getAllResponseHeaders()
End Sub
Sub httppost()
Dim xmlhttp As Object, myurl As String, body As String, auth As String
Set xmlhttp = CreateObject("MSXML2.serverXMLHTTP")
myurl = "https://console.developer.deutsche-boerse.com/apis/accesstot7-referencedata/1.1.0/"
auth = "{ " & """X-DBP-APIKEY""" & " : " & """68cdafd2-c5c1-49be-8558-37244ab4f513""" & " }"
MsgBox auth
contype = """{ application/json }"""
xmlhttp.Open "POST", myurl, False
xmlhttp.setRequestHeader "Content-Type", contype
xmlhttp.setRequestHeader auth, "Basic"
body = """query {" & vbCrLf & _
"ProductInfos{" & vbCrLf & _
"data {" & vbCrLf & _
"ProductType" & vbCrLf & _
"}}}"""
xmlhttp.Send body
ThisWorkbook.Worksheets("Tabelle1").Range("A3").Value = xmlhttp.responseText()
ThisWorkbook.Worksheets("Tabelle1").Range("A1").Value = xmlhttp.getAllResponseHeaders()
End Sub
Sub httppost()
'Verweise:
'Microsoft Scripting Runtime
'Microsoft XML, V6.0
Dim myurl As String, body As String
Dim xmlhttp As New MSXML2.XMLHTTP60
myurl = "https://api.developer.deutsche-boerse.com/accesstot7-referencedata-1-1-0/"
xmlhttp.Open "POST", myurl, False
Debug.Print myurl
xmlhttp.setRequestHeader "X-DBP-APIKEY", "68cdafd2-c5c1-49be-8558-37244ab4f513"
xmlhttp.setRequestHeader "Content-Type", "{application/json}"
body = "{ ""query"": ""query { ProductInfos" & _
"{data{ProductType}}}"" }"
xmlhttp.Send body
Debug.Print xmlhttp.ResponseText
Debug.Print xmlhttp.Status, xmlhttp.statusText
End Sub
Sub httppost()
'Verweise:
'Microsoft Scripting Runtime
'Microsoft XML, V6.0
Dim myurl As String, body As String, strResponse As String
Dim xmlhttp As New MSXML2.XMLHTTP60
myurl = "https://api.developer.deutsche-boerse.com/accesstot7-referencedata-1-1-0/"
body = "{ ""query"": ""query {ProductInfos{data{ProductType}}}"" }"
With xmlhttp
.Open "POST", myurl, False
.setRequestHeader "X-DBP-APIKEY", "68cdafd2-c5c1-49be-8558-37244ab4f513"
.setRequestHeader "Content-Type", "{application/json}"
.Send body
strResponse = .ResponseText
End With
'hier sollte man vielleicht noch den Status abfragen und im Fehlerfall mit Msg abbrechen.
'ansonsten müsste das JSON dann ggf. verarbeitet werden, also z.B. geparsed und ggf. in eine Tabelle geschrieben werden.
Debug.Print strResponse
End Sub
Set httpreq = CreateObject("MSXML2.serverXMLHTTP")
ein Objekt erstelle.
body = "{ ""query"": ""{ProductInfos{data{ProductType}}}"" }"
body = "{""query"": ""query{ProductInfos(filter:{ProductType:{eq:""SINGLE STOCK OPTIONS""}}){date data{UnderlyingName, UnderlyingISIN, Product, ProductType, Currency}}}"" }"
body = "{""query"": ""query{ProductInfos{date data{UnderlyingName, UnderlyingISIN, Product, ProductType, Currency}}}"" }"
body = "{""query"": ""{ProductInfos(filter:{ProductType:{eq:\""SINGLE STOCK OPTIONS\""}}){date data{UnderlyingName, UnderlyingISIN, Product, ProductType, Currency}}}"" }"
body = "{ ""query"": ""{Contracts(filter:{Product:{eq: \""FDAX\""}}) {date,data {ISIN,Contract,ExpirationDate}}}"" }"
Sub httppost()
Dim xmlhttp As Object, myurl As String, body As String, auth As String, coll
Set coll = New Collection
Set xmlhttp = CreateObject("MSXML2.serverXMLHTTP")
myurl = "https://console.developer.deutsche-boerse.com/apis/accesstot7-referencedata/1.1.0/"
auth = "{ " & """X-DBP-APIKEY""" & " : " & """68cdafd2-c5c1-49be-8558-37244ab4f513""" & " }"
xmlhttp.Open "POST", myurl, False
xmlhttp.setRequestHeader "Content-Type", "application/json"
xmlhttp.setRequestHeader auth, "Basic"
body = "query {" & vbCrLf & _
"ProductInfos{" & vbCrLf & _
"data {" & vbCrLf & _
"ProductType" & vbCrLf & _
"}}}"
MsgBox body
xmlhttp.Send body
coll = xmlhttp.responseText
End Sub
Sub httppost()
Dim xmlhttp As Object, myurl As String, body As String, auth As String, coll
Set coll = New Collection
Set xmlhttp = CreateObject("MSXML2.serverXMLHTTP")
myurl = "https://api.developer.deutsche-boerse.com/prod/accesstot7-referencedata/1.1.0/"
auth = "{ " & """X-DBP-APIKEY""" & " : " & """68cdafd2-c5c1-49be-8558-37244ab4f513""" & " }"
xmlhttp.Open "POST", myurl, False
xmlhttp.setRequestHeader "Content-Type", "application/json"
xmlhttp.setRequestHeader auth, "Basic"
body = "query {" & vbCrLf & _
"ProductInfos{" & vbCrLf & _
"data {" & vbCrLf & _
"ProductType" & vbCrLf & _
"}}}"
MsgBox body
xmlhttp.Send body
coll = xmlhttp.responseText
ThisWorkbook.Worksheets("Tabelle1").Range("A1").Value = xmlhttp.getAllResponseHeaders
ThisWorkbook.Worksheets("Tabelle1").Range("A3").Value = xmlhttp.responseText
End Sub