Skip to content

Instantly share code, notes, and snippets.

@Nikasa1889
Last active October 10, 2017 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nikasa1889/9587cb5acfe21f526a45eef4595ae23d to your computer and use it in GitHub Desktop.
Save Nikasa1889/9587cb5acfe21f526a45eef4595ae23d to your computer and use it in GitHub Desktop.
url = "%s/timeseries/%s/typeClass/%d/resolution/%d/" \
% (endpoint, asset_id, type_class, resolution_id)
params = {'from': from_date, 'to': to_date}
url = url + "?" + urllib.urlencode(params)
# b64Val = base64.b64encode(username+":"+password)
# response.headers['Authorization'] = "Basic %s" %b64Val
resp = requests.get(url, params, auth=(username, password)).json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment