Comments (5)
i'm trying to do the following
Do describe (not in code) on what it is you're trying to do - the code shows what you're actually doing.
What is the output of krakenex.version.__version__
?
Tentatively an issue with OSX decoding the JSON?.. I.e., system-related, not package-related.
Other than that, the code is likely to fail - in krakencom()
, you're accessing cur['c']
, where cur
is the query response received previously from getEthEur()
... As far as I remember, the response doesn't have a 'c'
key.
from python3-krakenex.
Does the (updated) depth.py
example give this error? (If so, post it here.)
from python3-krakenex.
I've been getting this too. Using Mac Sierra 10.12.5, Python3.5, krakenex 0.1.4.
Background on my problem: I'm trying to pull all ticker data for all assetpairs at a particular time. I initialize the API as k
and use k.query_public(method="Ticker", req={"pair":pair})
for each pair
in a list of assetpairs. Sometimes when I run the request on the entire list of 64 assetpairs (from DASHEUR
to XZECZUSD
), I receive the following error:
Traceback (most recent call last):
.
.
.
File "/Users/MYUSER/anaconda/envs/python3/lib/python3.5/site-packages/krakenex/api.py", line 148, in query_public
return self._query(urlpath, req, conn)
File "/MYUSER/anaconda/envs/python3/lib/python3.5/site-packages/krakenex/api.py", line 131, in _query
return json.loads(ret)
File "/Users/MYUSER/anaconda/envs/python3/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/Users/MYUSER/anaconda/envs/python3/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/MYUSER/anaconda/envs/python3/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
As an aside, the issue of c
as a key should be fine according to Kraken's API:
<pair_name> = pair name
a = ask array(, , ),
b = bid array(, , ),
c = last trade closed array(, ),
v = volume array(, <last 24 hours>),
p = volume weighted average price array(, <last 24 hours>),
t = number of trades array(, <last 24 hours>),
l = low array(, <last 24 hours>),
h = high array(, <last 24 hours>),
o = today's opening price
and from my testing of the c
key with ticker data, it works except for the above error.
from python3-krakenex.
@jacob-roth See if PR #17 helps with what you describe.
It's available in current master
, and release v1.0.0a0
(not on PyPI, though, since alpha).
EDIT: shorten, said wrong version
from python3-krakenex.
In short: the error probably stems from krakenex
not (previously) handling a connection error, and passing bogus (non-JSON) response from Connection
to API
.
Closing as stale.
Request reopen, or open separate issue, if present in latest v1.0.0
alphas.
Otherwise, wait for for v1.0.0
(probably at least a month out); or (if using v0.1.4
, which is the current stable ATM) try/except for the JSONDecodeError
(ugly and improper, I know - sorry).
from python3-krakenex.
Related Issues (20)
- addorder take profit HOT 1
- No module named 'krakenex' after install on python 3.7 HOT 5
- Adding 'close' order doesn't work: EAPI:Invalid key HOT 6
- Channel that lists krakenex on Anaconda? HOT 1
- Unknown asset pair HOT 2
- Can't expire a websocket token received through GetWebSocketsToken HOT 2
- How to get available balance information? HOT 1
- Authenticator or wrong key? HOT 2
- Handling ConnectionError, HTTPError thrown during a query HOT 3
- Unexpected Response from 'Balances' Endpoint HOT 1
- Add Order Broken HOT 1
- Add order giving me invalid Key error. HOT 5
- why is fetching of balance returning error? HOT 2
- deposit addresses HOT 1
- CancelOrderBatch
- post requests no longer accepted for market data endpoint HOT 2
- GET request params in data are ignored HOT 5
- Staking vs. Earn HOT 1
- Why set default value of dictionary parameters to None, but then change them to {} at beginning of method?
- How to turn off debug level in krakenex / requests module? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python3-krakenex.