ndri / python-bittrex Goto Github PK
View Code? Open in Web Editor NEWPython library for the Bittrex API
Python library for the Bittrex API
To avoid this error, change line 36 to:
signature = hmac.new(self.secret.encode('utf-8'), url.encode('utf-8'), hashlib.sha512).hexdigest()
urlencode is python 2...
Why does it say it works with python 3?
Hi,
I'm trying to figure out how to place a market order, perhaps by using buymarket()
, where I specify the amount of bitcoins I'd like to spend instead of the currency amount, which is what the amount
parameter is I believe. Is there a way to do that? Thanks.
I'm calling api.getbalance('BTC') but it complains saying:
hmac.py", line 144, in new
return HMAC(key, msg, digestmod)
raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).name)
TypeError: key: expected bytes or bytearray, but got 'str'
I've tried changing 'BTC' to bytes with:
x = 'BTC'.encode()
and passing that in but same error. Any help would be appreciated.
Any Idea how to fix this?
File "trade.py", line 19, in <module>
ethereumsummary = api.getmarketsummary(market)
File "/home/user/Desktop/Projects/Bots/python-bittrex/bittrex/test/bittrex.py", line 62, in getmarketsummary
return self.query('getmarketsummary', {'market': market})
File "/home/user/Desktop/Projects/Bots/python-bittrex/bittrex/test/bittrex.py", line 41, in query
response = json.loads(urllib.request.urlopen(req).read())
File "/usr/lib/python3.4/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
I can not make changes because of the INVALID_PERMISSION error. Has anyone had this problem?
i use bittrex API 1.1 and 2.0 for trading client (Delphi).
how use method BuyLimit with "ConditionType" and "Target" parameters?
this sample dont work? :
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
THIS ERROR COMES OUT BY RUNING ANY REQUEST LIKE THIS:
dogesummary = api.getmarketsummary(market)
File "example.py", line 20
print 'The price for {0} is {1:.8f} {2}.'.format(currency, dogeprice, trade)
^
SyntaxError: invalid syntax
Hi,
Please,
How can I use : getmarkethistory to get history prices for many pairs between two dates ?
Thanks
def getmarkethistory(self, market, count=20):
return self.query('getmarkethistory', {'market': market, 'count': count})
Hey,
Would you have an example of the most efficient way of listening to a response from any of the functions? For eg. buylimitorder
You can request the last orders of all the cryptocurrencies at the same time, I have tested without putting market, but it has not been achieved.
I'm getting the following error:
TypeError: 'module' object is not callable
Not doing anything special yet, just trying to connect to Bittrex like so:
#!/usr/bin/env python
from bittrex import bittrex
api = bittrex(api_key, api_secret)
I have this code:
import requests
import json as JSON
import pandas as pd
item = "BTC-LTC"
url = "https://bittrex.com/Api/v2.0/pub/market/GetTicks?marketName="+item+"&tickInterval=fiveMin"
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
response = requests.get(url, headers=headers)
print (response.content)
this is the result:
{"success":true,"message":"","result":[{"O":0.00884499,"H":0.00884499,"L":0.00884499,"C":0.00884499,"V":4.93801966,"T":"2019-01-13T02:45:00","BV":0.04367673},{"O":0.00884499,"H":0.00884499,"L":0.00884499,"C":0.00884499,"V":2.06198034,"T":"2019-01-13T02:50:00","BV":0.01823818},{"O":0.00886499,"H":0.00887511,"L":0.00886499,"C":0.00887511,"V":7.10660996,"T":"2019-01-13T02:55:00","BV":0.06300412},
how do i convert this string to json format or pandas dataframe for later use ?
notice that this is a response<200> from html and give me a string, and i neet to conver it to a python dict JSON OR PANDAS
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.