Skip to content

store tick data timeseries as python pandas dataframe with redis

License

Notifications You must be signed in to change notification settings

mindis/timeseries2redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timeseries2redis

python pandas timeseries store of tick data to redis

>>> from timeseries2redis import TickData
>>> ts = TickData("B")

>>> date = datetime.datetime.fromtimestamp(int(time.time()))
>>> price = random.randint(10,100)
>>> data = {"date": date,
>>>      "bid": price,
>>>      "ask": price,
>>>      "volume": 1000,
>>>      "count": 1}
>>> ts.set(data)

>>> ts.get(-5)
ask	bid	count	volume
date				
2016-04-20 13:02:32	31	31	1	1000
2016-04-20 13:02:32	34	34	1	1000
2016-04-20 13:02:32	48	48	1	1000
2016-04-20 13:02:32	11	11	1	1000
2016-04-20 13:02:32	35	35	1	1000

About

store tick data timeseries as python pandas dataframe with redis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published