erhan / pybtcturk Goto Github PK
View Code? Open in Web Editor NEWPython client for the Btcturk api
License: MIT License
Python client for the Btcturk api
License: MIT License
Nice wrapper, thanks for sharing this with community.
I cannot get to run most of private requests such as get_open_orders. I have read a similar issue posted above and I confirm my private & public keys are correct because I can run client.get_balances() with no issues.
from btcturk import Btcturk
client = Btcturk('XXX-914b78f84fc3', 'XXX')
client.get_balances()
{'btc_available': 0.0,
'btc_balance': 0.0,
'btc_reserved': 0.0,
'btctry_maker_fee_percentage': 0.001694915,
'btctry_taker_fee_percentage': 0.002542373,
'eth_available': 0.0,
'eth_balance': 0.0,
'eth_reserved': 0.0,
'ethbtc_maker_fee_percentage': 0.001694915,
'ethbtc_taker_fee_percentage': 0.002542373,
'ethtry_maker_fee_percentage': 0.0,
'ethtry_taker_fee_percentage': 0.001694915,
'ltc_available': 0.0,
'ltc_balance': 0.0,
'ltc_reserved': 0.0,
'ltctry_maker_fee_percentage': 0.001694915,
'ltctry_taker_fee_percentage': 0.002542373,
'try_available': 288.11,
'try_balance': 789.11,
'try_reserved': 500.99,
'usdt_available': 0.0,
'usdt_balance': 0.0,
'usdt_reserved': 0.0,
'usdttry_maker_fee_percentage': 0.001694915,
'usdttry_taker_fee_percentage': 0.002542373,
'xlm_available': 0.0,
'xlm_balance': 0.0,
'xlm_reserved': 0.0,
'xlmtry_maker_fee_percentage': 0.001694915,
'xlmtry_taker_fee_percentage': 0.002542373,
'xrp_available': 0.0,
'xrp_balance': 0.0,
'xrp_reserved': 0.0,
'xrptry_maker_fee_percentage': 0.001694915,
'xrptry_taker_fee_percentage': 0.002542373}
client.get_open_orders("ETHTRY")
Traceback (most recent call last):
File "", line 1, in
client.get_open_orders("ETHTRY")
File "C:\Users\fizbe\Anaconda3\envs\arbitrage\lib\site-packages\btcturk\btcturk.py", line 155, in get_open_orders
return self._make_request(method="GET", path="openOrders", params=params)
File "C:\Users\fizbe\Anaconda3\envs\arbitrage\lib\site-packages\btcturk\btcturk.py", line 41, in _make_request
return resp.json()
File "C:\Users\fizbe\Anaconda3\envs\arbitrage\lib\site-packages\requests\models.py", line 896, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\fizbe\Anaconda3\envs\arbitrage\lib\json_init_.py", line 319, in loads
return _default_decoder.decode(s)
File "C:\Users\fizbe\Anaconda3\envs\arbitrage\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\fizbe\Anaconda3\envs\arbitrage\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
JSONDecodeError: Expecting value
how can we call or get the latest trade transaction???
kodum:
from btcturk import Btcturk
client = Btcturk()
client.ticker()
hata:
client.ticker()
Traceback (most recent call last):
File "C:\Users\ENES\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 960, in json
return complexjson.loads(self.content.decode(encoding), **kwargs)
File "C:\Users\ENES\AppData\Local\Programs\Python\Python310\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\ENES\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ENES\AppData\Local\Programs\Python\Python310\lib\site-packages\btcturk\btcturk.py", line 66, in ticker
return self._make_request(method="GET", path="ticker", protection=False)
File "C:\Users\ENES\AppData\Local\Programs\Python\Python310\lib\site-packages\btcturk\btcturk.py", line 41, in _make_request
return resp.json()
File "C:\Users\ENES\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 968, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Hi;
When I try to use og
sniplet:
from btcturk import Btcturk
client = Btcturk()
client = Btcturk("yyyyyyyyyyyy6-4824-a36a-xxxxxxxxxx", "yWVvDiZJxxxxxxxxxxxxxaaaaaaa")
print(client.get_open_orders("BTCTRY"))
error:
Traceback (most recent call last):
File "paribu_read.py", line 17, in
print(client.get_open_orders("BTCTRY"))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/btcturk/btcturk.py", line 154, in get_open_orders
return self._make_request(method="GET", path="openOrders", params=params)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/btcturk/btcturk.py", line 40, in _make_request
return resp.json()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 2)
Yo
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.