Skip to content

Instantly share code, notes, and snippets.

@anthonyng2
Created August 4, 2017 01:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonyng2/35d435a9154519cee90a335d388db710 to your computer and use it in GitHub Desktop.
Save anthonyng2/35d435a9154519cee90a335d388db710 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import oandapyV20\n",
"import oandapyV20.endpoints.instruments as instruments"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"accountID = ''\n",
"access_token = ''"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"client = oandapyV20.API(access_token=access_token)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"http://developer.oanda.com/rest-live-v20/instrument-df/#CandlestickGranularity"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"params = {\n",
" \"count\": 250,\n",
" \"granularity\": \"D\"}"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"r = instruments.InstrumentsCandles(instrument=\"EUR_USD\",\n",
" params=params)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'candles': [{'complete': True,\n",
" 'mid': {'c': '1.11769', 'h': '1.11900', 'l': '1.11128', 'o': '1.11769'},\n",
" 'time': '2016-08-09T21:00:00.000000000Z',\n",
" 'volume': 15585},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11370', 'h': '1.11916', 'l': '1.11355', 'o': '1.11769'},\n",
" 'time': '2016-08-10T21:00:00.000000000Z',\n",
" 'volume': 14723},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11621', 'h': '1.12214', 'l': '1.11314', 'o': '1.11370'},\n",
" 'time': '2016-08-11T21:00:00.000000000Z',\n",
" 'volume': 16738},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11831', 'h': '1.12037', 'l': '1.11535', 'o': '1.11621'},\n",
" 'time': '2016-08-14T21:00:00.000000000Z',\n",
" 'volume': 10823},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12782', 'h': '1.13223', 'l': '1.11776', 'o': '1.11831'},\n",
" 'time': '2016-08-15T21:00:00.000000000Z',\n",
" 'volume': 24195},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12900', 'h': '1.13159', 'l': '1.12413', 'o': '1.12782'},\n",
" 'time': '2016-08-16T21:00:00.000000000Z',\n",
" 'volume': 21794},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13540', 'h': '1.13664', 'l': '1.12862', 'o': '1.12900'},\n",
" 'time': '2016-08-17T21:00:00.000000000Z',\n",
" 'volume': 24391},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13254', 'h': '1.13596', 'l': '1.13043', 'o': '1.13540'},\n",
" 'time': '2016-08-18T21:00:00.000000000Z',\n",
" 'volume': 20219},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13210', 'h': '1.13305', 'l': '1.12712', 'o': '1.13254'},\n",
" 'time': '2016-08-21T21:00:00.000000000Z',\n",
" 'volume': 18662},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13052', 'h': '1.13555', 'l': '1.13034', 'o': '1.13210'},\n",
" 'time': '2016-08-22T21:00:00.000000000Z',\n",
" 'volume': 16858},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12636', 'h': '1.13114', 'l': '1.12453', 'o': '1.13052'},\n",
" 'time': '2016-08-23T21:00:00.000000000Z',\n",
" 'volume': 17975},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12861', 'h': '1.12976', 'l': '1.12593', 'o': '1.12636'},\n",
" 'time': '2016-08-24T21:00:00.000000000Z',\n",
" 'volume': 14361},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11966', 'h': '1.13410', 'l': '1.11806', 'o': '1.12861'},\n",
" 'time': '2016-08-25T21:00:00.000000000Z',\n",
" 'volume': 34929},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11889', 'h': '1.12078', 'l': '1.11583', 'o': '1.11966'},\n",
" 'time': '2016-08-28T21:00:00.000000000Z',\n",
" 'volume': 18468},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11428', 'h': '1.11922', 'l': '1.11321', 'o': '1.11889'},\n",
" 'time': '2016-08-29T21:00:00.000000000Z',\n",
" 'volume': 18285},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11582', 'h': '1.11655', 'l': '1.11233', 'o': '1.11428'},\n",
" 'time': '2016-08-30T21:00:00.000000000Z',\n",
" 'volume': 19483},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11966', 'h': '1.12052', 'l': '1.11275', 'o': '1.11582'},\n",
" 'time': '2016-08-31T21:00:00.000000000Z',\n",
" 'volume': 21748},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11553', 'h': '1.12522', 'l': '1.11506', 'o': '1.11966'},\n",
" 'time': '2016-09-01T21:00:00.000000000Z',\n",
" 'volume': 29889},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11472', 'h': '1.11823', 'l': '1.11393', 'o': '1.11553'},\n",
" 'time': '2016-09-04T21:00:00.000000000Z',\n",
" 'volume': 10354},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12550', 'h': '1.12632', 'l': '1.11408', 'o': '1.11472'},\n",
" 'time': '2016-09-05T21:00:00.000000000Z',\n",
" 'volume': 20463},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12396', 'h': '1.12719', 'l': '1.12292', 'o': '1.12550'},\n",
" 'time': '2016-09-06T21:00:00.000000000Z',\n",
" 'volume': 18372},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12613', 'h': '1.13272', 'l': '1.12346', 'o': '1.12396'},\n",
" 'time': '2016-09-07T21:00:00.000000000Z',\n",
" 'volume': 29660},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12323', 'h': '1.12849', 'l': '1.11987', 'o': '1.12613'},\n",
" 'time': '2016-09-08T21:00:00.000000000Z',\n",
" 'volume': 22543},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12356', 'h': '1.12689', 'l': '1.12106', 'o': '1.12323'},\n",
" 'time': '2016-09-11T21:00:00.000000000Z',\n",
" 'volume': 28277},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12210', 'h': '1.12604', 'l': '1.12040', 'o': '1.12356'},\n",
" 'time': '2016-09-12T21:00:00.000000000Z',\n",
" 'volume': 23499},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12499', 'h': '1.12740', 'l': '1.12108', 'o': '1.12210'},\n",
" 'time': '2016-09-13T21:00:00.000000000Z',\n",
" 'volume': 20289},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12437', 'h': '1.12841', 'l': '1.12191', 'o': '1.12499'},\n",
" 'time': '2016-09-14T21:00:00.000000000Z',\n",
" 'volume': 25365},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11574', 'h': '1.12503', 'l': '1.11496', 'o': '1.12437'},\n",
" 'time': '2016-09-15T21:00:00.000000000Z',\n",
" 'volume': 22102},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11747', 'h': '1.11980', 'l': '1.11510', 'o': '1.11574'},\n",
" 'time': '2016-09-18T21:00:00.000000000Z',\n",
" 'volume': 13626},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11507', 'h': '1.12135', 'l': '1.11501', 'o': '1.11747'},\n",
" 'time': '2016-09-19T21:00:00.000000000Z',\n",
" 'volume': 16807},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11899', 'h': '1.11968', 'l': '1.11232', 'o': '1.11507'},\n",
" 'time': '2016-09-20T21:00:00.000000000Z',\n",
" 'volume': 33984},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12084', 'h': '1.12572', 'l': '1.11850', 'o': '1.11899'},\n",
" 'time': '2016-09-21T21:00:00.000000000Z',\n",
" 'volume': 19324},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12254', 'h': '1.12406', 'l': '1.11941', 'o': '1.12084'},\n",
" 'time': '2016-09-22T21:00:00.000000000Z',\n",
" 'volume': 16068},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12538', 'h': '1.12792', 'l': '1.12211', 'o': '1.12254'},\n",
" 'time': '2016-09-25T21:00:00.000000000Z',\n",
" 'volume': 16544},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12160', 'h': '1.12590', 'l': '1.11912', 'o': '1.12538'},\n",
" 'time': '2016-09-26T21:00:00.000000000Z',\n",
" 'volume': 17059},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12171', 'h': '1.12369', 'l': '1.11821', 'o': '1.12160'},\n",
" 'time': '2016-09-27T21:00:00.000000000Z',\n",
" 'volume': 17915},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12232', 'h': '1.12498', 'l': '1.11969', 'o': '1.12171'},\n",
" 'time': '2016-09-28T21:00:00.000000000Z',\n",
" 'volume': 19001},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12425', 'h': '1.12506', 'l': '1.11535', 'o': '1.12232'},\n",
" 'time': '2016-09-29T21:00:00.000000000Z',\n",
" 'volume': 27639},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12110', 'h': '1.12447', 'l': '1.12054', 'o': '1.12425'},\n",
" 'time': '2016-10-02T21:00:00.000000000Z',\n",
" 'volume': 14782},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12048', 'h': '1.12389', 'l': '1.11380', 'o': '1.12110'},\n",
" 'time': '2016-10-03T21:00:00.000000000Z',\n",
" 'volume': 26736},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12056', 'h': '1.12333', 'l': '1.11898', 'o': '1.12048'},\n",
" 'time': '2016-10-04T21:00:00.000000000Z',\n",
" 'volume': 18796},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11509', 'h': '1.12125', 'l': '1.11401', 'o': '1.12056'},\n",
" 'time': '2016-10-05T21:00:00.000000000Z',\n",
" 'volume': 17766},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12013', 'h': '1.12049', 'l': '1.11045', 'o': '1.11509'},\n",
" 'time': '2016-10-06T21:00:00.000000000Z',\n",
" 'volume': 43707},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11394', 'h': '1.12046', 'l': '1.11315', 'o': '1.12013'},\n",
" 'time': '2016-10-09T21:00:00.000000000Z',\n",
" 'volume': 16346},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10538', 'h': '1.11424', 'l': '1.10491', 'o': '1.11394'},\n",
" 'time': '2016-10-10T21:00:00.000000000Z',\n",
" 'volume': 21766},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10066', 'h': '1.10678', 'l': '1.10045', 'o': '1.10538'},\n",
" 'time': '2016-10-11T21:00:00.000000000Z',\n",
" 'volume': 25430},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10564', 'h': '1.10577', 'l': '1.09854', 'o': '1.10066'},\n",
" 'time': '2016-10-12T21:00:00.000000000Z',\n",
" 'volume': 23944},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09712', 'h': '1.10586', 'l': '1.09705', 'o': '1.10564'},\n",
" 'time': '2016-10-13T21:00:00.000000000Z',\n",
" 'volume': 22131},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09995', 'h': '1.10080', 'l': '1.09638', 'o': '1.09712'},\n",
" 'time': '2016-10-16T21:00:00.000000000Z',\n",
" 'volume': 14634},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09800', 'h': '1.10265', 'l': '1.09704', 'o': '1.09995'},\n",
" 'time': '2016-10-17T21:00:00.000000000Z',\n",
" 'volume': 16336},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09738', 'h': '1.10049', 'l': '1.09551', 'o': '1.09800'},\n",
" 'time': '2016-10-18T21:00:00.000000000Z',\n",
" 'volume': 15843},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09292', 'h': '1.10392', 'l': '1.09159', 'o': '1.09738'},\n",
" 'time': '2016-10-19T21:00:00.000000000Z',\n",
" 'volume': 26664},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08849', 'h': '1.09298', 'l': '1.08592', 'o': '1.09292'},\n",
" 'time': '2016-10-20T21:00:00.000000000Z',\n",
" 'volume': 15786},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08814', 'h': '1.08996', 'l': '1.08598', 'o': '1.08849'},\n",
" 'time': '2016-10-23T21:00:00.000000000Z',\n",
" 'volume': 13139},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08881', 'h': '1.09053', 'l': '1.08510', 'o': '1.08814'},\n",
" 'time': '2016-10-24T21:00:00.000000000Z',\n",
" 'volume': 18833},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09090', 'h': '1.09468', 'l': '1.08744', 'o': '1.08881'},\n",
" 'time': '2016-10-25T21:00:00.000000000Z',\n",
" 'volume': 19137},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08972', 'h': '1.09422', 'l': '1.08826', 'o': '1.09090'},\n",
" 'time': '2016-10-26T21:00:00.000000000Z',\n",
" 'volume': 19405},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09875', 'h': '1.09919', 'l': '1.08930', 'o': '1.08972'},\n",
" 'time': '2016-10-27T21:00:00.000000000Z',\n",
" 'volume': 25914},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09820', 'h': '1.09921', 'l': '1.09359', 'o': '1.09875'},\n",
" 'time': '2016-10-30T21:00:00.000000000Z',\n",
" 'volume': 16008},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10552', 'h': '1.10690', 'l': '1.09601', 'o': '1.09820'},\n",
" 'time': '2016-10-31T21:00:00.000000000Z',\n",
" 'volume': 18446},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10977', 'h': '1.11230', 'l': '1.10499', 'o': '1.10552'},\n",
" 'time': '2016-11-01T21:00:00.000000000Z',\n",
" 'volume': 27070},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11058', 'h': '1.11260', 'l': '1.10596', 'o': '1.10977'},\n",
" 'time': '2016-11-02T21:00:00.000000000Z',\n",
" 'volume': 22434},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11403', 'h': '1.11415', 'l': '1.10799', 'o': '1.11058'},\n",
" 'time': '2016-11-03T21:00:00.000000000Z',\n",
" 'volume': 21233},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10404', 'h': '1.11403', 'l': '1.10276', 'o': '1.11403'},\n",
" 'time': '2016-11-06T22:00:00.000000000Z',\n",
" 'volume': 20079},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10256', 'h': '1.10670', 'l': '1.10090', 'o': '1.10404'},\n",
" 'time': '2016-11-07T22:00:00.000000000Z',\n",
" 'volume': 15968},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09088', 'h': '1.12998', 'l': '1.09071', 'o': '1.10256'},\n",
" 'time': '2016-11-08T22:00:00.000000000Z',\n",
" 'volume': 135442},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08918', 'h': '1.09537', 'l': '1.08649', 'o': '1.09088'},\n",
" 'time': '2016-11-09T22:00:00.000000000Z',\n",
" 'volume': 44840},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08563', 'h': '1.09234', 'l': '1.08306', 'o': '1.08918'},\n",
" 'time': '2016-11-10T22:00:00.000000000Z',\n",
" 'volume': 41093},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07376', 'h': '1.08563', 'l': '1.07092', 'o': '1.08563'},\n",
" 'time': '2016-11-13T22:00:00.000000000Z',\n",
" 'volume': 47305},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07222', 'h': '1.08166', 'l': '1.07143', 'o': '1.07376'},\n",
" 'time': '2016-11-14T22:00:00.000000000Z',\n",
" 'volume': 40061},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06910', 'h': '1.07596', 'l': '1.06664', 'o': '1.07222'},\n",
" 'time': '2016-11-15T22:00:00.000000000Z',\n",
" 'volume': 36740},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06251', 'h': '1.07454', 'l': '1.06200', 'o': '1.06910'},\n",
" 'time': '2016-11-16T22:00:00.000000000Z',\n",
" 'volume': 38769},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05894', 'h': '1.06430', 'l': '1.05692', 'o': '1.06251'},\n",
" 'time': '2016-11-17T22:00:00.000000000Z',\n",
" 'volume': 44405},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06287', 'h': '1.06491', 'l': '1.05788', 'o': '1.05894'},\n",
" 'time': '2016-11-20T22:00:00.000000000Z',\n",
" 'volume': 34830},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06276', 'h': '1.06580', 'l': '1.05836', 'o': '1.06287'},\n",
" 'time': '2016-11-21T22:00:00.000000000Z',\n",
" 'volume': 29852},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05519', 'h': '1.06438', 'l': '1.05261', 'o': '1.06276'},\n",
" 'time': '2016-11-22T22:00:00.000000000Z',\n",
" 'volume': 35507},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05533', 'h': '1.05853', 'l': '1.05181', 'o': '1.05519'},\n",
" 'time': '2016-11-23T22:00:00.000000000Z',\n",
" 'volume': 29521},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05933', 'h': '1.06274', 'l': '1.05386', 'o': '1.05533'},\n",
" 'time': '2016-11-24T22:00:00.000000000Z',\n",
" 'volume': 37993},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06119', 'h': '1.06859', 'l': '1.05637', 'o': '1.05933'},\n",
" 'time': '2016-11-27T22:00:00.000000000Z',\n",
" 'volume': 32325},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06497', 'h': '1.06545', 'l': '1.05650', 'o': '1.06119'},\n",
" 'time': '2016-11-28T22:00:00.000000000Z',\n",
" 'volume': 28708},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05894', 'h': '1.06664', 'l': '1.05527', 'o': '1.06497'},\n",
" 'time': '2016-11-29T22:00:00.000000000Z',\n",
" 'volume': 39317},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06617', 'h': '1.06690', 'l': '1.05846', 'o': '1.05894'},\n",
" 'time': '2016-11-30T22:00:00.000000000Z',\n",
" 'volume': 35043},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06665', 'h': '1.06900', 'l': '1.06253', 'o': '1.06617'},\n",
" 'time': '2016-12-01T22:00:00.000000000Z',\n",
" 'volume': 32333},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07640', 'h': '1.07963', 'l': '1.05056', 'o': '1.06665'},\n",
" 'time': '2016-12-04T22:00:00.000000000Z',\n",
" 'volume': 60841},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07172', 'h': '1.07855', 'l': '1.06985', 'o': '1.07640'},\n",
" 'time': '2016-12-05T22:00:00.000000000Z',\n",
" 'volume': 26751},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07533', 'h': '1.07683', 'l': '1.07100', 'o': '1.07172'},\n",
" 'time': '2016-12-06T22:00:00.000000000Z',\n",
" 'volume': 19853},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06144', 'h': '1.08745', 'l': '1.05976', 'o': '1.07533'},\n",
" 'time': '2016-12-07T22:00:00.000000000Z',\n",
" 'volume': 58060},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05610', 'h': '1.06297', 'l': '1.05310', 'o': '1.06144'},\n",
" 'time': '2016-12-08T22:00:00.000000000Z',\n",
" 'volume': 27161},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06355', 'h': '1.06518', 'l': '1.05255', 'o': '1.05610'},\n",
" 'time': '2016-12-11T22:00:00.000000000Z',\n",
" 'volume': 28031},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06261', 'h': '1.06671', 'l': '1.06039', 'o': '1.06355'},\n",
" 'time': '2016-12-12T22:00:00.000000000Z',\n",
" 'volume': 25228},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05357', 'h': '1.06700', 'l': '1.04963', 'o': '1.06261'},\n",
" 'time': '2016-12-13T22:00:00.000000000Z',\n",
" 'volume': 42104},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04136', 'h': '1.05398', 'l': '1.03666', 'o': '1.05357'},\n",
" 'time': '2016-12-14T22:00:00.000000000Z',\n",
" 'volume': 52373},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04513', 'h': '1.04744', 'l': '1.04007', 'o': '1.04136'},\n",
" 'time': '2016-12-15T22:00:00.000000000Z',\n",
" 'volume': 32732},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04021', 'h': '1.04795', 'l': '1.03926', 'o': '1.04513'},\n",
" 'time': '2016-12-18T22:00:00.000000000Z',\n",
" 'volume': 27031},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.03876', 'h': '1.04181', 'l': '1.03524', 'o': '1.04021'},\n",
" 'time': '2016-12-19T22:00:00.000000000Z',\n",
" 'volume': 23381},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04237', 'h': '1.04511', 'l': '1.03825', 'o': '1.03876'},\n",
" 'time': '2016-12-20T22:00:00.000000000Z',\n",
" 'volume': 21350},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04370', 'h': '1.04994', 'l': '1.04237', 'o': '1.04237'},\n",
" 'time': '2016-12-21T22:00:00.000000000Z',\n",
" 'volume': 23280},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04554', 'h': '1.04693', 'l': '1.04267', 'o': '1.04370'},\n",
" 'time': '2016-12-22T22:00:00.000000000Z',\n",
" 'volume': 13703},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04570', 'h': '1.04634', 'l': '1.04323', 'o': '1.04554'},\n",
" 'time': '2016-12-26T22:00:00.000000000Z',\n",
" 'volume': 10337},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04129', 'h': '1.04798', 'l': '1.03723', 'o': '1.04570'},\n",
" 'time': '2016-12-27T22:00:00.000000000Z',\n",
" 'volume': 18288},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04914', 'h': '1.04941', 'l': '1.04085', 'o': '1.04129'},\n",
" 'time': '2016-12-28T22:00:00.000000000Z',\n",
" 'volume': 24421},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05198', 'h': '1.06570', 'l': '1.04852', 'o': '1.04914'},\n",
" 'time': '2016-12-29T22:00:00.000000000Z',\n",
" 'volume': 49452},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04049', 'h': '1.05198', 'l': '1.03405', 'o': '1.05198'},\n",
" 'time': '2017-01-02T22:00:00.000000000Z',\n",
" 'volume': 32813},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.04892', 'h': '1.05000', 'l': '1.03899', 'o': '1.04049'},\n",
" 'time': '2017-01-03T22:00:00.000000000Z',\n",
" 'volume': 34501},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06069', 'h': '1.06153', 'l': '1.04808', 'o': '1.04892'},\n",
" 'time': '2017-01-04T22:00:00.000000000Z',\n",
" 'volume': 52627},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05323', 'h': '1.06224', 'l': '1.05251', 'o': '1.06069'},\n",
" 'time': '2017-01-05T22:00:00.000000000Z',\n",
" 'volume': 40707},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05713', 'h': '1.05829', 'l': '1.05109', 'o': '1.05323'},\n",
" 'time': '2017-01-08T22:00:00.000000000Z',\n",
" 'volume': 29607},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05543', 'h': '1.06273', 'l': '1.05511', 'o': '1.05713'},\n",
" 'time': '2017-01-09T22:00:00.000000000Z',\n",
" 'volume': 35745},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05823', 'h': '1.06230', 'l': '1.04539', 'o': '1.05543'},\n",
" 'time': '2017-01-10T22:00:00.000000000Z',\n",
" 'volume': 61512},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06126', 'h': '1.06848', 'l': '1.05716', 'o': '1.05823'},\n",
" 'time': '2017-01-11T22:00:00.000000000Z',\n",
" 'volume': 49908},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06434', 'h': '1.06739', 'l': '1.05962', 'o': '1.06126'},\n",
" 'time': '2017-01-12T22:00:00.000000000Z',\n",
" 'volume': 38956},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06006', 'h': '1.06434', 'l': '1.05794', 'o': '1.06434'},\n",
" 'time': '2017-01-15T22:00:00.000000000Z',\n",
" 'volume': 25706},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07138', 'h': '1.07194', 'l': '1.05978', 'o': '1.06006'},\n",
" 'time': '2017-01-16T22:00:00.000000000Z',\n",
" 'volume': 49280},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06293', 'h': '1.07157', 'l': '1.06288', 'o': '1.07138'},\n",
" 'time': '2017-01-17T22:00:00.000000000Z',\n",
" 'volume': 34142},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06644', 'h': '1.06766', 'l': '1.05895', 'o': '1.06293'},\n",
" 'time': '2017-01-18T22:00:00.000000000Z',\n",
" 'volume': 47134},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07011', 'h': '1.07095', 'l': '1.06252', 'o': '1.06644'},\n",
" 'time': '2017-01-19T22:00:00.000000000Z',\n",
" 'volume': 43916},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07640', 'h': '1.07695', 'l': '1.07011', 'o': '1.07011'},\n",
" 'time': '2017-01-22T22:00:00.000000000Z',\n",
" 'volume': 36443},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07314', 'h': '1.07751', 'l': '1.07204', 'o': '1.07640'},\n",
" 'time': '2017-01-23T22:00:00.000000000Z',\n",
" 'volume': 27883},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07483', 'h': '1.07698', 'l': '1.07112', 'o': '1.07314'},\n",
" 'time': '2017-01-24T22:00:00.000000000Z',\n",
" 'volume': 28624},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06824', 'h': '1.07656', 'l': '1.06579', 'o': '1.07483'},\n",
" 'time': '2017-01-25T22:00:00.000000000Z',\n",
" 'volume': 30854},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06981', 'h': '1.07251', 'l': '1.06583', 'o': '1.06824'},\n",
" 'time': '2017-01-26T22:00:00.000000000Z',\n",
" 'volume': 29190},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06956', 'h': '1.07404', 'l': '1.06204', 'o': '1.06981'},\n",
" 'time': '2017-01-29T22:00:00.000000000Z',\n",
" 'volume': 28475},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07975', 'h': '1.08124', 'l': '1.06846', 'o': '1.06956'},\n",
" 'time': '2017-01-30T22:00:00.000000000Z',\n",
" 'volume': 42940},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07689', 'h': '1.08074', 'l': '1.07309', 'o': '1.07975'},\n",
" 'time': '2017-01-31T22:00:00.000000000Z',\n",
" 'volume': 35995},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07583', 'h': '1.08289', 'l': '1.07561', 'o': '1.07689'},\n",
" 'time': '2017-02-01T22:00:00.000000000Z',\n",
" 'volume': 32335},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07850', 'h': '1.07976', 'l': '1.07125', 'o': '1.07583'},\n",
" 'time': '2017-02-02T22:00:00.000000000Z',\n",
" 'volume': 36782},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07503', 'h': '1.07914', 'l': '1.07056', 'o': '1.07850'},\n",
" 'time': '2017-02-05T22:00:00.000000000Z',\n",
" 'volume': 26266},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06829', 'h': '1.07506', 'l': '1.06562', 'o': '1.07503'},\n",
" 'time': '2017-02-06T22:00:00.000000000Z',\n",
" 'volume': 24736},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06984', 'h': '1.07140', 'l': '1.06408', 'o': '1.06829'},\n",
" 'time': '2017-02-07T22:00:00.000000000Z',\n",
" 'volume': 26680},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06557', 'h': '1.07096', 'l': '1.06510', 'o': '1.06984'},\n",
" 'time': '2017-02-08T22:00:00.000000000Z',\n",
" 'volume': 26612},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06412', 'h': '1.06678', 'l': '1.06077', 'o': '1.06557'},\n",
" 'time': '2017-02-09T22:00:00.000000000Z',\n",
" 'volume': 25538},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05966', 'h': '1.06583', 'l': '1.05921', 'o': '1.06412'},\n",
" 'time': '2017-02-12T22:00:00.000000000Z',\n",
" 'volume': 20639},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05782', 'h': '1.06335', 'l': '1.05611', 'o': '1.05966'},\n",
" 'time': '2017-02-13T22:00:00.000000000Z',\n",
" 'volume': 25889},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06000', 'h': '1.06093', 'l': '1.05214', 'o': '1.05782'},\n",
" 'time': '2017-02-14T22:00:00.000000000Z',\n",
" 'volume': 27287},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06738', 'h': '1.06792', 'l': '1.05907', 'o': '1.06000'},\n",
" 'time': '2017-02-15T22:00:00.000000000Z',\n",
" 'volume': 27144},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06161', 'h': '1.06767', 'l': '1.06056', 'o': '1.06738'},\n",
" 'time': '2017-02-16T22:00:00.000000000Z',\n",
" 'volume': 21991},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06137', 'h': '1.06329', 'l': '1.06030', 'o': '1.06161'},\n",
" 'time': '2017-02-19T22:00:00.000000000Z',\n",
" 'volume': 14995},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05365', 'h': '1.06158', 'l': '1.05258', 'o': '1.06137'},\n",
" 'time': '2017-02-20T22:00:00.000000000Z',\n",
" 'volume': 19722},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05583', 'h': '1.05741', 'l': '1.04937', 'o': '1.05365'},\n",
" 'time': '2017-02-21T22:00:00.000000000Z',\n",
" 'volume': 30857},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05815', 'h': '1.05954', 'l': '1.05378', 'o': '1.05583'},\n",
" 'time': '2017-02-22T22:00:00.000000000Z',\n",
" 'volume': 23813},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05609', 'h': '1.06181', 'l': '1.05569', 'o': '1.05815'},\n",
" 'time': '2017-02-23T22:00:00.000000000Z',\n",
" 'volume': 22654},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05865', 'h': '1.06308', 'l': '1.05517', 'o': '1.05609'},\n",
" 'time': '2017-02-26T22:00:00.000000000Z',\n",
" 'volume': 22146},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05763', 'h': '1.06302', 'l': '1.05679', 'o': '1.05865'},\n",
" 'time': '2017-02-27T22:00:00.000000000Z',\n",
" 'volume': 26577},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05465', 'h': '1.05894', 'l': '1.05143', 'o': '1.05763'},\n",
" 'time': '2017-02-28T22:00:00.000000000Z',\n",
" 'volume': 33472},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05066', 'h': '1.05517', 'l': '1.04950', 'o': '1.05465'},\n",
" 'time': '2017-03-01T22:00:00.000000000Z',\n",
" 'volume': 22664},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06220', 'h': '1.06248', 'l': '1.05020', 'o': '1.05066'},\n",
" 'time': '2017-03-02T22:00:00.000000000Z',\n",
" 'volume': 31558},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05817', 'h': '1.06401', 'l': '1.05747', 'o': '1.06220'},\n",
" 'time': '2017-03-05T22:00:00.000000000Z',\n",
" 'volume': 23697},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05661', 'h': '1.06028', 'l': '1.05580', 'o': '1.05817'},\n",
" 'time': '2017-03-06T22:00:00.000000000Z',\n",
" 'volume': 17387},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05409', 'h': '1.05742', 'l': '1.05350', 'o': '1.05661'},\n",
" 'time': '2017-03-07T22:00:00.000000000Z',\n",
" 'volume': 20774},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05773', 'h': '1.06153', 'l': '1.05252', 'o': '1.05409'},\n",
" 'time': '2017-03-08T22:00:00.000000000Z',\n",
" 'volume': 36123},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06736', 'h': '1.06990', 'l': '1.05724', 'o': '1.05773'},\n",
" 'time': '2017-03-09T22:00:00.000000000Z',\n",
" 'volume': 34384},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06736', 'h': '1.06736', 'l': '1.06736', 'o': '1.06736'},\n",
" 'time': '2017-03-10T22:00:00.000000000Z',\n",
" 'volume': 1},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06780', 'h': '1.06867', 'l': '1.06722', 'o': '1.06736'},\n",
" 'time': '2017-03-11T22:00:00.000000000Z',\n",
" 'volume': 418},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06529', 'h': '1.07141', 'l': '1.06518', 'o': '1.06780'},\n",
" 'time': '2017-03-12T21:00:00.000000000Z',\n",
" 'volume': 39806},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06046', 'h': '1.06626', 'l': '1.06005', 'o': '1.06529'},\n",
" 'time': '2017-03-13T21:00:00.000000000Z',\n",
" 'volume': 35839},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07342', 'h': '1.07400', 'l': '1.06035', 'o': '1.06046'},\n",
" 'time': '2017-03-14T21:00:00.000000000Z',\n",
" 'volume': 57550},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07658', 'h': '1.07704', 'l': '1.07057', 'o': '1.07342'},\n",
" 'time': '2017-03-15T21:00:00.000000000Z',\n",
" 'volume': 52499},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07380', 'h': '1.07827', 'l': '1.07274', 'o': '1.07658'},\n",
" 'time': '2017-03-16T21:00:00.000000000Z',\n",
" 'volume': 41942},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07394', 'h': '1.07776', 'l': '1.07250', 'o': '1.07380'},\n",
" 'time': '2017-03-19T21:00:00.000000000Z',\n",
" 'volume': 27607},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08098', 'h': '1.08194', 'l': '1.07190', 'o': '1.07394'},\n",
" 'time': '2017-03-20T21:00:00.000000000Z',\n",
" 'volume': 44695},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07973', 'h': '1.08250', 'l': '1.07760', 'o': '1.08098'},\n",
" 'time': '2017-03-21T21:00:00.000000000Z',\n",
" 'volume': 40500},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07837', 'h': '1.08049', 'l': '1.07680', 'o': '1.07973'},\n",
" 'time': '2017-03-22T21:00:00.000000000Z',\n",
" 'volume': 39429},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07978', 'h': '1.08181', 'l': '1.07603', 'o': '1.07837'},\n",
" 'time': '2017-03-23T21:00:00.000000000Z',\n",
" 'volume': 35910},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08628', 'h': '1.09060', 'l': '1.07978', 'o': '1.07978'},\n",
" 'time': '2017-03-26T21:00:00.000000000Z',\n",
" 'volume': 37214},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08149', 'h': '1.08726', 'l': '1.07990', 'o': '1.08628'},\n",
" 'time': '2017-03-27T21:00:00.000000000Z',\n",
" 'volume': 31121},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07659', 'h': '1.08265', 'l': '1.07401', 'o': '1.08149'},\n",
" 'time': '2017-03-28T21:00:00.000000000Z',\n",
" 'volume': 39432},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06743', 'h': '1.07704', 'l': '1.06722', 'o': '1.07659'},\n",
" 'time': '2017-03-29T21:00:00.000000000Z',\n",
" 'volume': 36543},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06548', 'h': '1.07018', 'l': '1.06508', 'o': '1.06743'},\n",
" 'time': '2017-03-30T21:00:00.000000000Z',\n",
" 'volume': 35985},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06697', 'h': '1.06810', 'l': '1.06426', 'o': '1.06548'},\n",
" 'time': '2017-04-02T21:00:00.000000000Z',\n",
" 'volume': 28341},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06736', 'h': '1.06772', 'l': '1.06357', 'o': '1.06697'},\n",
" 'time': '2017-04-03T21:00:00.000000000Z',\n",
" 'volume': 24598},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06635', 'h': '1.06890', 'l': '1.06350', 'o': '1.06736'},\n",
" 'time': '2017-04-04T21:00:00.000000000Z',\n",
" 'volume': 32819},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06444', 'h': '1.06844', 'l': '1.06290', 'o': '1.06635'},\n",
" 'time': '2017-04-05T21:00:00.000000000Z',\n",
" 'volume': 31669},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05902', 'h': '1.06657', 'l': '1.05807', 'o': '1.06444'},\n",
" 'time': '2017-04-06T21:00:00.000000000Z',\n",
" 'volume': 42961},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.05956', 'h': '1.06068', 'l': '1.05698', 'o': '1.05902'},\n",
" 'time': '2017-04-09T21:00:00.000000000Z',\n",
" 'volume': 22385},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06043', 'h': '1.06300', 'l': '1.05784', 'o': '1.05956'},\n",
" 'time': '2017-04-10T21:00:00.000000000Z',\n",
" 'volume': 24727},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06655', 'h': '1.06750', 'l': '1.05890', 'o': '1.06043'},\n",
" 'time': '2017-04-11T21:00:00.000000000Z',\n",
" 'volume': 30818},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06134', 'h': '1.06780', 'l': '1.06089', 'o': '1.06655'},\n",
" 'time': '2017-04-12T21:00:00.000000000Z',\n",
" 'volume': 28400},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06129', 'h': '1.06300', 'l': '1.06057', 'o': '1.06134'},\n",
" 'time': '2017-04-13T21:00:00.000000000Z',\n",
" 'volume': 23534},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.06434', 'h': '1.06704', 'l': '1.06028', 'o': '1.06129'},\n",
" 'time': '2017-04-16T21:00:00.000000000Z',\n",
" 'volume': 17623},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07298', 'h': '1.07361', 'l': '1.06374', 'o': '1.06434'},\n",
" 'time': '2017-04-17T21:00:00.000000000Z',\n",
" 'volume': 33666},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07114', 'h': '1.07370', 'l': '1.07002', 'o': '1.07298'},\n",
" 'time': '2017-04-18T21:00:00.000000000Z',\n",
" 'volume': 24234},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07168', 'h': '1.07775', 'l': '1.07089', 'o': '1.07114'},\n",
" 'time': '2017-04-19T21:00:00.000000000Z',\n",
" 'volume': 26345},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.07268', 'h': '1.07380', 'l': '1.06824', 'o': '1.07168'},\n",
" 'time': '2017-04-20T21:00:00.000000000Z',\n",
" 'volume': 30363},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08673', 'h': '1.09063', 'l': '1.07268', 'o': '1.07268'},\n",
" 'time': '2017-04-23T21:00:00.000000000Z',\n",
" 'volume': 32281},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09265', 'h': '1.09499', 'l': '1.08515', 'o': '1.08673'},\n",
" 'time': '2017-04-24T21:00:00.000000000Z',\n",
" 'volume': 19534},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09039', 'h': '1.09508', 'l': '1.08558', 'o': '1.09265'},\n",
" 'time': '2017-04-25T21:00:00.000000000Z',\n",
" 'volume': 24695},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08726', 'h': '1.09329', 'l': '1.08516', 'o': '1.09039'},\n",
" 'time': '2017-04-26T21:00:00.000000000Z',\n",
" 'volume': 26428},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08962', 'h': '1.09472', 'l': '1.08572', 'o': '1.08726'},\n",
" 'time': '2017-04-27T21:00:00.000000000Z',\n",
" 'volume': 22867},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08990', 'h': '1.09238', 'l': '1.08842', 'o': '1.08962'},\n",
" 'time': '2017-04-30T21:00:00.000000000Z',\n",
" 'volume': 9211},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09308', 'h': '1.09331', 'l': '1.08884', 'o': '1.08990'},\n",
" 'time': '2017-05-01T21:00:00.000000000Z',\n",
" 'volume': 14843},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08852', 'h': '1.09367', 'l': '1.08828', 'o': '1.09308'},\n",
" 'time': '2017-05-02T21:00:00.000000000Z',\n",
" 'volume': 19717},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09842', 'h': '1.09871', 'l': '1.08750', 'o': '1.08852'},\n",
" 'time': '2017-05-03T21:00:00.000000000Z',\n",
" 'volume': 24002},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09989', 'h': '1.09996', 'l': '1.09500', 'o': '1.09842'},\n",
" 'time': '2017-05-04T21:00:00.000000000Z',\n",
" 'volume': 23295},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09237', 'h': '1.10237', 'l': '1.09165', 'o': '1.09989'},\n",
" 'time': '2017-05-07T21:00:00.000000000Z',\n",
" 'volume': 24891},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08743', 'h': '1.09336', 'l': '1.08636', 'o': '1.09237'},\n",
" 'time': '2017-05-08T21:00:00.000000000Z',\n",
" 'volume': 20694},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08676', 'h': '1.08982', 'l': '1.08533', 'o': '1.08743'},\n",
" 'time': '2017-05-09T21:00:00.000000000Z',\n",
" 'volume': 18415},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.08609', 'h': '1.08930', 'l': '1.08393', 'o': '1.08676'},\n",
" 'time': '2017-05-10T21:00:00.000000000Z',\n",
" 'volume': 16213},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09314', 'h': '1.09343', 'l': '1.08557', 'o': '1.08609'},\n",
" 'time': '2017-05-11T21:00:00.000000000Z',\n",
" 'volume': 18229},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.09751', 'h': '1.09894', 'l': '1.09228', 'o': '1.09314'},\n",
" 'time': '2017-05-14T21:00:00.000000000Z',\n",
" 'volume': 15066},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.10826', 'h': '1.10971', 'l': '1.09743', 'o': '1.09751'},\n",
" 'time': '2017-05-15T21:00:00.000000000Z',\n",
" 'volume': 19873},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11599', 'h': '1.11621', 'l': '1.10802', 'o': '1.10826'},\n",
" 'time': '2017-05-16T21:00:00.000000000Z',\n",
" 'volume': 26018},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11026', 'h': '1.11719', 'l': '1.10760', 'o': '1.11599'},\n",
" 'time': '2017-05-17T21:00:00.000000000Z',\n",
" 'volume': 34642},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12068', 'h': '1.12118', 'l': '1.10974', 'o': '1.11026'},\n",
" 'time': '2017-05-18T21:00:00.000000000Z',\n",
" 'volume': 19221},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12373', 'h': '1.12635', 'l': '1.11615', 'o': '1.12068'},\n",
" 'time': '2017-05-21T21:00:00.000000000Z',\n",
" 'volume': 21775},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11824', 'h': '1.12684', 'l': '1.11752', 'o': '1.12373'},\n",
" 'time': '2017-05-22T21:00:00.000000000Z',\n",
" 'volume': 30408},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12187', 'h': '1.12201', 'l': '1.11687', 'o': '1.11824'},\n",
" 'time': '2017-05-23T21:00:00.000000000Z',\n",
" 'volume': 27000},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12104', 'h': '1.12504', 'l': '1.11936', 'o': '1.12187'},\n",
" 'time': '2017-05-24T21:00:00.000000000Z',\n",
" 'volume': 19081},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11813', 'h': '1.12345', 'l': '1.11606', 'o': '1.12104'},\n",
" 'time': '2017-05-25T21:00:00.000000000Z',\n",
" 'volume': 20669},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11630', 'h': '1.11899', 'l': '1.11619', 'o': '1.11813'},\n",
" 'time': '2017-05-28T21:00:00.000000000Z',\n",
" 'volume': 9159},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11858', 'h': '1.12054', 'l': '1.11095', 'o': '1.11630'},\n",
" 'time': '2017-05-29T21:00:00.000000000Z',\n",
" 'volume': 24109},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12433', 'h': '1.12523', 'l': '1.11646', 'o': '1.11858'},\n",
" 'time': '2017-05-30T21:00:00.000000000Z',\n",
" 'volume': 23631},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12124', 'h': '1.12566', 'l': '1.12023', 'o': '1.12433'},\n",
" 'time': '2017-05-31T21:00:00.000000000Z',\n",
" 'volume': 18108},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12825', 'h': '1.12851', 'l': '1.12052', 'o': '1.12124'},\n",
" 'time': '2017-06-01T21:00:00.000000000Z',\n",
" 'volume': 19889},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12543', 'h': '1.12838', 'l': '1.12343', 'o': '1.12825'},\n",
" 'time': '2017-06-04T21:00:00.000000000Z',\n",
" 'volume': 15090},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12772', 'h': '1.12842', 'l': '1.12404', 'o': '1.12543'},\n",
" 'time': '2017-06-05T21:00:00.000000000Z',\n",
" 'volume': 17004},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12566', 'h': '1.12824', 'l': '1.12044', 'o': '1.12772'},\n",
" 'time': '2017-06-06T21:00:00.000000000Z',\n",
" 'volume': 24164},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12142', 'h': '1.12692', 'l': '1.11947', 'o': '1.12566'},\n",
" 'time': '2017-06-07T21:00:00.000000000Z',\n",
" 'volume': 32327},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11959', 'h': '1.12367', 'l': '1.11664', 'o': '1.12142'},\n",
" 'time': '2017-06-08T21:00:00.000000000Z',\n",
" 'volume': 30075},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11959', 'h': '1.11959', 'l': '1.11959', 'o': '1.11959'},\n",
" 'time': '2017-06-09T21:00:00.000000000Z',\n",
" 'volume': 1},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12035', 'h': '1.12320', 'l': '1.11919', 'o': '1.11959'},\n",
" 'time': '2017-06-11T21:00:00.000000000Z',\n",
" 'volume': 15570},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12105', 'h': '1.12250', 'l': '1.11854', 'o': '1.12035'},\n",
" 'time': '2017-06-12T21:00:00.000000000Z',\n",
" 'volume': 14425},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.12181', 'h': '1.12958', 'l': '1.11932', 'o': '1.12105'},\n",
" 'time': '2017-06-13T21:00:00.000000000Z',\n",
" 'volume': 36727},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11452', 'h': '1.12285', 'l': '1.11323', 'o': '1.12181'},\n",
" 'time': '2017-06-14T21:00:00.000000000Z',\n",
" 'volume': 25916},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11965', 'h': '1.12017', 'l': '1.11386', 'o': '1.11452'},\n",
" 'time': '2017-06-15T21:00:00.000000000Z',\n",
" 'volume': 15885},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11481', 'h': '1.12127', 'l': '1.11432', 'o': '1.11965'},\n",
" 'time': '2017-06-18T21:00:00.000000000Z',\n",
" 'volume': 14550},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11342', 'h': '1.11649', 'l': '1.11191', 'o': '1.11481'},\n",
" 'time': '2017-06-19T21:00:00.000000000Z',\n",
" 'volume': 16447},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11684', 'h': '1.11690', 'l': '1.11274', 'o': '1.11342'},\n",
" 'time': '2017-06-20T21:00:00.000000000Z',\n",
" 'volume': 14858},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11513', 'h': '1.11779', 'l': '1.11395', 'o': '1.11684'},\n",
" 'time': '2017-06-21T21:00:00.000000000Z',\n",
" 'volume': 13944},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11937', 'h': '1.12088', 'l': '1.11454', 'o': '1.11513'},\n",
" 'time': '2017-06-22T21:00:00.000000000Z',\n",
" 'volume': 11778},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11937', 'h': '1.11937', 'l': '1.11937', 'o': '1.11937'},\n",
" 'time': '2017-06-23T21:00:00.000000000Z',\n",
" 'volume': 1},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.11817', 'h': '1.12197', 'l': '1.11720', 'o': '1.11937'},\n",
" 'time': '2017-06-25T21:00:00.000000000Z',\n",
" 'volume': 16296},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13388', 'h': '1.13494', 'l': '1.11791', 'o': '1.11817'},\n",
" 'time': '2017-06-26T21:00:00.000000000Z',\n",
" 'volume': 25792},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13771', 'h': '1.13908', 'l': '1.12918', 'o': '1.13388'},\n",
" 'time': '2017-06-27T21:00:00.000000000Z',\n",
" 'volume': 39877},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14406', 'h': '1.14454', 'l': '1.13746', 'o': '1.13771'},\n",
" 'time': '2017-06-28T21:00:00.000000000Z',\n",
" 'volume': 27856},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14252', 'h': '1.14454', 'l': '1.13923', 'o': '1.14406'},\n",
" 'time': '2017-06-29T21:00:00.000000000Z',\n",
" 'volume': 25529},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14252', 'h': '1.14252', 'l': '1.14252', 'o': '1.14252'},\n",
" 'time': '2017-06-30T21:00:00.000000000Z',\n",
" 'volume': 1},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13640', 'h': '1.14270', 'l': '1.13551', 'o': '1.14252'},\n",
" 'time': '2017-07-02T21:00:00.000000000Z',\n",
" 'volume': 17699},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13460', 'h': '1.13769', 'l': '1.13362', 'o': '1.13640'},\n",
" 'time': '2017-07-03T21:00:00.000000000Z',\n",
" 'volume': 14050},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13514', 'h': '1.13684', 'l': '1.13126', 'o': '1.13460'},\n",
" 'time': '2017-07-04T21:00:00.000000000Z',\n",
" 'volume': 22237},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14233', 'h': '1.14248', 'l': '1.13299', 'o': '1.13514'},\n",
" 'time': '2017-07-05T21:00:00.000000000Z',\n",
" 'volume': 21886},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14001', 'h': '1.14397', 'l': '1.13797', 'o': '1.14233'},\n",
" 'time': '2017-07-06T21:00:00.000000000Z',\n",
" 'volume': 23783},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13994', 'h': '1.14181', 'l': '1.13817', 'o': '1.14001'},\n",
" 'time': '2017-07-09T21:00:00.000000000Z',\n",
" 'volume': 13366},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14672', 'h': '1.14797', 'l': '1.13829', 'o': '1.13994'},\n",
" 'time': '2017-07-10T21:00:00.000000000Z',\n",
" 'volume': 18992},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14117', 'h': '1.14894', 'l': '1.13919', 'o': '1.14672'},\n",
" 'time': '2017-07-11T21:00:00.000000000Z',\n",
" 'volume': 31894},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.13979', 'h': '1.14558', 'l': '1.13706', 'o': '1.14117'},\n",
" 'time': '2017-07-12T21:00:00.000000000Z',\n",
" 'volume': 29081},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14688', 'h': '1.14718', 'l': '1.13917', 'o': '1.13979'},\n",
" 'time': '2017-07-13T21:00:00.000000000Z',\n",
" 'volume': 23709},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.14782', 'h': '1.14871', 'l': '1.14350', 'o': '1.14688'},\n",
" 'time': '2017-07-16T21:00:00.000000000Z',\n",
" 'volume': 16083},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.15538', 'h': '1.15832', 'l': '1.14717', 'o': '1.14782'},\n",
" 'time': '2017-07-17T21:00:00.000000000Z',\n",
" 'volume': 30473},\n",
" {'complete': True,\n",
" 'mid': {'c': '1.15153', 'h': '1.15566', 'l': '1.15101', 'o': '1.15538'},\n",
" 'time': '2017-07-18T21:00:00.000000000Z',\n",
" 'volume': 18801},\n",
" {'complete': False,\n",
" 'mid': {'c': '1.16436', 'h': '1.16582', 'l': '1.14793', 'o': '1.15153'},\n",
" 'time': '2017-07-19T21:00:00.000000000Z',\n",
" 'volume': 39151}],\n",
" 'granularity': 'D',\n",
" 'instrument': 'EUR_USD'}"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"client.request(r)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'c': '1.11769', 'h': '1.11900', 'l': '1.11128', 'o': '1.11769'}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r.response['candles'][0]['mid']"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'2016-08-09T21:00:00.000000000Z'"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r.response['candles'][0]['time']"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"15585"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r.response['candles'][0]['volume']"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dat = []\n",
"for oo in r.response['candles']:\n",
" dat.append([oo['time'], oo['volume'], oo['mid']['o'], oo['mid']['h'], oo['mid']['l'], oo['mid']['c']])"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Volume</th>\n",
" <th>Open</th>\n",
" <th>High</th>\n",
" <th>Low</th>\n",
" <th>Close</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Time</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2016-08-09T21:00:00.000000000Z</th>\n",
" <td>15585</td>\n",
" <td>1.11769</td>\n",
" <td>1.11900</td>\n",
" <td>1.11128</td>\n",
" <td>1.11769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-08-10T21:00:00.000000000Z</th>\n",
" <td>14723</td>\n",
" <td>1.11769</td>\n",
" <td>1.11916</td>\n",
" <td>1.11355</td>\n",
" <td>1.11370</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-08-11T21:00:00.000000000Z</th>\n",
" <td>16738</td>\n",
" <td>1.11370</td>\n",
" <td>1.12214</td>\n",
" <td>1.11314</td>\n",
" <td>1.11621</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-08-14T21:00:00.000000000Z</th>\n",
" <td>10823</td>\n",
" <td>1.11621</td>\n",
" <td>1.12037</td>\n",
" <td>1.11535</td>\n",
" <td>1.11831</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016-08-15T21:00:00.000000000Z</th>\n",
" <td>24195</td>\n",
" <td>1.11831</td>\n",
" <td>1.13223</td>\n",
" <td>1.11776</td>\n",
" <td>1.12782</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Volume Open High Low Close\n",
"Time \n",
"2016-08-09T21:00:00.000000000Z 15585 1.11769 1.11900 1.11128 1.11769\n",
"2016-08-10T21:00:00.000000000Z 14723 1.11769 1.11916 1.11355 1.11370\n",
"2016-08-11T21:00:00.000000000Z 16738 1.11370 1.12214 1.11314 1.11621\n",
"2016-08-14T21:00:00.000000000Z 10823 1.11621 1.12037 1.11535 1.11831\n",
"2016-08-15T21:00:00.000000000Z 24195 1.11831 1.13223 1.11776 1.12782"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.DataFrame(dat)\n",
"df.columns = ['Time', 'Volume', 'Open', 'High', 'Low', 'Close']\n",
"df = df.set_index('Time')\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"***"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment