Hi, 

I'm trying to copy the CustomDataBitcoinAlgorithm.py script to integrate Kraken ticker data. The issue I've got is the data is returned as either Today or Last 24 Hours and I'm not sure which I should use to integrate property?

Thanks,

Tim

last_24_hours = 1
# Today's opening price
# "o":"48787.70000"
coin["Open"] = float(ticker["o"])
# High [<today>, <last 24 hours>]
# "h":["48900.00000","49475.00000"]
coin["High"] = float(ticker["h"][last_24_hours])
# Low [<today>, <last 24 hours>]
# "l":["47422.80000","47422.80000"]
coin["Low"] = float(ticker["l"][last_24_hours])
# Last trade closed [<price>, <lot volume>]
# "c":["47603.40000","0.00928278"]
coin["Close"] = float(ticker["c"][0])
# Ask [<price>, <whole lot volume>, <lot volume>]
# "a":["47603.40000","1","1.000"]
coin["Ask"] = float(ticker["a"][0])
# Bid [<price>, <whole lot volume>, <lot volume>]
# "b":["47603.30000","10","10.000"]
coin["Bid"] = float(ticker["b"][0])
# Volume [<today>, <last 24 hours>]
# "v":["1115.61680272","1886.16868058"]
coin["VolumeBTC"] = float(ticker["v"][last_24_hours])
# Volume weighted average price [<today>, <last 24 hours>]
# "p":["48021.32998","48400.74233"]
coin["WeightedPrice"] = float(ticker["p"][last_24_hours])
# Number of trades [<today>, <last 24 hours>]
# "t":[11754,20043]

 

Author