there 我使用python從Oanda API中獲取數據,並以如下格式獲取數據:,我不知道如何解壓縮它,所以我可以得到一個時間序列,是有人可以幫助我嗎?謝謝!Python如何解壓http響應數據
{
"instrument" : "EUR_USD",
"granularity" : "M15",
"candles" : [
{
"time" : "2015-10-01T19:15:00.000000Z",
"openBid" : 1.11833,
"openAsk" : 1.11846,
"highBid" : 1.1186,
"highAsk" : 1.11874,
"lowBid" : 1.11825,
"lowAsk" : 1.1184,
"closeBid" : 1.1184,
"closeAsk" : 1.11857,
"volume" : 205,
"complete" : true
},
{
"time" : "2015-10-01T19:30:00.000000Z",
"openBid" : 1.11844,
"openAsk" : 1.1186,
"highBid" : 1.11924,
"highAsk" : 1.1194,
"lowBid" : 1.11839,
"lowAsk" : 1.11857,
"closeBid" : 1.11908,
"closeAsk" : 1.11926,
"volume" : 290,
"complete" : true
},
{
"time" : "2015-10-01T19:45:00.000000Z",
"openBid" : 1.11906,
"openAsk" : 1.11922,
"highBid" : 1.11933,
"highAsk" : 1.1195,
"lowBid" : 1.11868,
"lowAsk" : 1.11883,
"closeBid" : 1.11868,
"closeAsk" : 1.11883,
"volume" : 206,
"complete" : true
},
{
"time" : "2015-10-01T20:00:00.000000Z",
"openBid" : 1.11865,
"openAsk" : 1.11879,
"highBid" : 1.11884,
"highAsk" : 1.119,
"lowBid" : 1.11827,
"lowAsk" : 1.11844,
"closeBid" : 1.11833,
"closeAsk" : 1.11848,
"volume" : 114,
"complete" : true
}]
}
這僅僅是JSON。 Python有一個內置的json庫。 –
我是新來的蟒蛇,感謝您的提示 – louis