Created
March 10, 2018 23:45
-
-
Save kizbitz/d888de2e5774ffea33b7df86c8766b76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
import time | |
import json | |
request1 = requests.get('https://api.gdax.com/products/LTC-USD/candles?granularity=3600') | |
time.sleep(3) | |
request2 = requests.get('https://api.gdax.com/products/LTC-USD/candles?granularity=3600') | |
r1text = json.loads(request1.text) | |
r2text = json.loads(request2.text) | |
r1text.sort() | |
r2text.sort() | |
for i in range(len(r1text)): | |
# remove volume column | |
r1 = r1text[i][:-1] | |
r2 = r2text[i][:-1] | |
# compare results | |
if r1 != r2: | |
print('-' * 75) | |
print(r1) | |
print(r2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment