anfederico / pypoloniex Goto Github PK
View Code? Open in Web Editor NEWPython wrapper for calling cryptocurrency data from Poloniex API
License: MIT License
Python wrapper for calling cryptocurrency data from Poloniex API
License: MIT License
Do we have a new coin?
ETH/GNT
returned by returnTicker by poloniex but not in list in TimerSeries.validPair()
I used exactly the code you provided:
from pypoloniex import LoadPairs
sess = LoadPairs()
LTC = sess.getPair(market = 'BTC', coin = 'LTC')
print LTC
ValueError Traceback (most recent call last)
in ()
2
3 # Load realtime data from Poloniex
----> 4 sess = LoadPairs()
5
6 # Returns coin object
/Users/mba011/anaconda/lib/python2.7/site-packages/pypoloniex/LoadPairs.pyc in init(self)
48
49 def init(self):
---> 50 self.pairs = self.load()
51
52 def load(self):
/Users/mba011/anaconda/lib/python2.7/site-packages/pypoloniex/LoadPairs.pyc in load(self)
52 def load(self):
53 data = requests.get('https://poloniex.com/public?command=returnTicker')
---> 54 data = data.json()
55 pairs = {}
56 for pair in data:
/Users/mba011/anaconda/lib/python2.7/site-packages/requests/models.pyc in json(self, **kwargs)
890 # used.
891 pass
--> 892 return complexjson.loads(self.text, **kwargs)
893
894 @Property
/Users/mba011/anaconda/lib/python2.7/json/init.pyc in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
337 parse_int is None and parse_float is None and
338 parse_constant is None and object_pairs_hook is None and not kw):
--> 339 return _default_decoder.decode(s)
340 if cls is None:
341 cls = JSONDecoder
/Users/mba011/anaconda/lib/python2.7/json/decoder.pyc in decode(self, s, _w)
362
363 """
--> 364 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
365 end = _w(s, end).end()
366 if end != len(s):
/Users/mba011/anaconda/lib/python2.7/json/decoder.pyc in raw_decode(self, s, idx)
380 obj, end = self.scan_once(s, idx)
381 except StopIteration:
--> 382 raise ValueError("No JSON object could be decoded")
383 return obj, end
ValueError: No JSON object could be decoded
And when I used the other:
from pypoloniex import TimeSeries
sess = TimeSeries()
pair = ('BTC', 'LTC') # (market, coin)
period = 86400 # candle stick period in seconds
start = '4/2/2014' # dd/mm/year
end = '11/2/2014' # dd/mm/year
sess = getData(self,pair, period, start, end)
show(sess)
NameError Traceback (most recent call last)
in ()
9
10 # Get time series data from Poloniex and load into pandas dataframe
---> 11 sess = getData(self,pair, period, start, end)
12
13 # Show dataframe with parameters
NameError: name 'getData' is not defined
Please help me. Thanks in advance
Installed with pip. It seems this version is changed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.