Jump to content

WYTrade

Community Member
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi! Anyone got any tools / ideas on how to modify IG's excel sample to download data by historical range? Currently the excel sample is only able to download by a set number of data points from the latest date. I am not very good with VBA, I tried (but it didn't work) to modify the VBA code in the excel sample: For Public Function ("price") in IGApiRestClient: From: Public Function prices(epic As String, resolution As String, numPoints As String) As Collection Call oXMLHTTP.Open("GET", IG_API_HOST + "/prices/" + epic + "/" + resolution + "/" + numPoints, False) To: Public Function prices(epic As String, resolution As String, startDate As String, endDate As String) As Collection Call oXMLHTTP.Open("GET", IG_API_HOST + "/prices/" + epic + "/" + resolution + "/" + startDate + "/" + endDate, False) For Private Sub priceHistoryButton_Click() in Sheet1: From: Set prices = restClient.prices(epicTextBox.value, priceResolutionComboBox.value, numPointsTextBox.value) To: Set prices = restClient.prices(epicTextBox.value, priceResolutionComboBox.value, Range("K2").value, Range("K3").value) I tried to key in the dates (in "YYYY-MM-DD HH:MM:SS") in cells K2 & K3 but it doesn't work. Any ideas/help on how to make it work?
×
×