Giter VIP home page Giter VIP logo

python-bittrex's Introduction

python-bittrex

Build Status PyPI version

Python bindings for bittrex. I am Not associated -- use at your own risk, etc.

Installation

for most recent stable release

pip install python-bittrex

for bleeding edge development

pip install git+https://github.com/ericsomdahl/python-bittrex.git

API Documentation

API 1.1 is considered stable

Official API Documentation

API 2.0 is BETA, use at your own risk

Unofficial 2.0 API Documentation - The golang guys have been diligently following the rapid changes to the 2.0 Beta, but use at your own risk.

Example Usage for Bittrex API

from bittrex.bittrex import Bittrex, API_V2_0

my_bittrex = Bittrex(None, None, api_version=API_V2_0)  # or defaulting to v1.1 as Bittrex(None, None)
my_bittrex.get_markets()

This call to get_markets returns an object such as the following:

{'success': True, 'message': '', 'result': [{'MarketCurrency': 'LTC', ...

API_V2_0 and API_V1_1 are constants that can be imported from Bittrex.

To access account methods, an API key for your account is required and can be generated on the Settings then API Keys page. Make sure you save the secret, as it will not be visible after navigating away from the page.

from bittrex.bittrex import *

my_bittrex = Bittrex("<my_api_key>", "<my_api_secret>", api_version="<API_V1_1> or <API_V2_0>")

my_bittrex.get_balance('ETH')

This call to get_balance returns an object such as the following:

{'success': True, 
 'message': '',
 'result': {'Currency': 'ETH', 'Balance': 0.0, 'Available': 0.0, 
            'Pending': 0.0, 'CryptoAddress': None}
}

v1.1 constants of interest:

BUY_ORDERBOOK = 'buy'
SELL_ORDERBOOK = 'sell'
BOTH_ORDERBOOK = 'both'

v2.0 constants of interest

These are used by get_candles()

TICKINTERVAL_ONEMIN = 'oneMin'
TICKINTERVAL_FIVEMIN = 'fiveMin'
TICKINTERVAL_HOUR = 'hour'
TICKINTERVAL_THIRTYMIN = 'thirtyMin'
TICKINTERVAL_DAY = 'Day'

these are used by trade_sell() and trade_buy()

ORDERTYPE_LIMIT = 'LIMIT'
ORDERTYPE_MARKET = 'MARKET'

TIMEINEFFECT_GOOD_TIL_CANCELLED = 'GOOD_TIL_CANCELLED'
TIMEINEFFECT_IMMEDIATE_OR_CANCEL = 'IMMEDIATE_OR_CANCEL'
TIMEINEFFECT_FILL_OR_KILL = 'FILL_OR_KILL'

CONDITIONTYPE_NONE = 'NONE'
CONDITIONTYPE_GREATER_THAN = 'GREATER_THAN'
CONDITIONTYPE_LESS_THAN = 'LESS_THAN'
CONDITIONTYPE_STOP_LOSS_FIXED = 'STOP_LOSS_FIXED'
CONDITIONTYPE_STOP_LOSS_PERCENTAGE = 'STOP_LOSS_PERCENTAGE'

Testing

In order to run the integration tests, a file called "secrets.json" must be added to the test folder. Structure it as follows, adding your API keys:

{
  "key": "mykey",
  "secret": "mysecret"
}

python-bittrex's People

Contributors

alainfonhof avatar ayy1337 avatar bitcrab avatar cdgriffith avatar ericsomdahl avatar flepied avatar forgetso avatar grantwwoodford avatar hurlenko avatar jwdev-wr avatar lancechua avatar llazzaro avatar lookfwd avatar marjinal1st avatar meister245 avatar omergulen avatar peter-ha avatar psychopenguin avatar robaleman avatar sanderbrauwers avatar scottie avatar scribilicious avatar segfault42 avatar skyl avatar slazarov avatar space-cat avatar talhaasmal avatar thierryderuyttere avatar vyttieri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-bittrex's Issues

CURRENCY_NOT_PROVIDED

Hi
I don t understand but when i do :
get_balance('BTC')
it say to me :
{u'message': u'CURRENCY_NOT_PROVIDED', u'result': None, u'success': False}
don t understand why ...
I starting coding in python maybe i do something wrong ...
If you can have a look it will be great
Thanks.

Buy_Limit broken?

Why is the Buy_Limit allways use the highest price?

Buy_Marked is disbaled...

I want buy by the API

bid + x% = Y
Y = MAXMIMUM

But i buy with the highest price, not filled up till the highest price is reached...

the uper was buyd by hand, the lower with api
Coin was at 68000 - so i wonder why it buy at such high price?!
http://imgur.com/aVcqev2

Poloniex works fine... they try to buy with lowest price, and fill up, till maxprice ore wanted coins is reached...

APISIGN not provided

Perhaps Im being an idiot. Ive got the secrets.json file created. If i run Bittrex_tests or any call involving the API. I get {"success":false,"message":"APISIGN_NOT_PROVIDED","result":null}

I could not find a solution anywhere but most people not complaining about it either so I presume its something stupid Im doing. Can you please help?

utf8 encoding issue with cypher

Hello,
I ran into encoding issue using encrypt/decrypt in bittrex.py, because json.dumps does not support raw encoding of cypher.encrypt.
The "encoding" parameter of json.dumps/json.loads still make python complaining when using latin1 instead of utf8.
I found an alternative solution using base64 encoding/decoding. Can you please update bittrex.py with the changes to fix the issue.
bittrex.zip

How to get fresh ticker values?

According to bittrex's documentation much queries (which take place every second) to get ticker values leading to ban IP. We should use SignalR-client technology using node.js for example to avoid ban.

Is it possible to get fresh ticker values every second using python?

API 2.0 trade_buy or trade_sell gives an error from bittrex

Hi guy!

Maybe problem not in this lib (or even I am sure it works properly) but maybe you face the same issue.

When I am sending request to tradesell or tradebuy endpoints using this lib:

buy_limit(market=USDT-ZEC, quantity=0.01, rate=216)

I get error message from bittrex:

{u'message': u'There was a problem processing your request. If this problem persists, please email [email protected] with this error id - d70a2af0-1281-4320-b3d9-f2070f5e79de', u'result': None, u'success': False}

Maybe somebody could confirm that this API does not work from their side or it works?
Thanks
Sergii

Unable to install using git repository

After cloning and running python setup.py install -- I get the bittrex directory and .egg in site-packages -- but bittrex module contains no code. So from bittrex import Bittrex produces error "Can't import Bittrex" -- So I tried using pip install git+https//github... ( after uninstalling by hand) and the same thing happens, pip installs the code but the referred bittrex module is apparently empty. However the bittrex.py file is correct in the bittrex directory of site-packages.

So I am going to just use the bittrex.py file locally and import it that way..

ImportError: cannot import name 'Bittrex'

Hi,

not sure why import error pops after install setup.py

'import bittrex' works fine but

'from bittrex import Bittrex' doesn't work
ImportError: cannot import name 'Bittrex'

Python 3.6.0 |Anaconda 4.3.1 (64-bit)

Cannot get buy limit to work

I cannot figure out what I am doing wrong to not be able to do buy_limit, any help is appreciated!

from bittrex import Bittrex

api = Bittrex('0c7axxxxxx197d4ac5aa', 'fce8a5xxxxx245a4d81ac10')
#getting BTCBalance
trade = 'BTC'
pumpcurrency = raw_input('which currency would you like to pump?')
market = '{0}-{1}'.format(trade, pumpcurrency)

BTCbalance = api.get_balance(trade)['result']['Available']
print "Your balance is {0} {1}.".format(BTCbalance, trade)

Getting the BTC price for your pumpable currency

cryptosummary = api.getmarketsummary(market)
currencyprice = cryptosummary['result'][0]['Last']
print 'The price for {0} is {1:.8f} {2}.'.format(pumpcurrency, currencyprice, trade)

Amount of coins to buy

amount = BTCbalance/currencyprice

How big of a profit you want to make

multiplier = 1+ float(raw_input("How much profit would you like to make? (input percentage as integer)"))/100
print ("Selling at "+str(multiplier) +"x profit")

Buying the pump currency for BTC

api.buy_limit(market, amount, currencyprice)
print ('Buying ' +str(amount)+" "+ pumpcurrency + ' at ' + str(currencyprice) + " each.")

getorderhistory

I have added getorderhistory

def getorderhistory(self, market=None, count=None):
    """
    """
    parameters={}
    if market: parameters["market"]=market
    if count:  parameters["count"]=count

    return self.api_query('getorderhistory', parameters)

This is a test:

key="1b..."
secret="c2..."

from pprint import pprint

from Bittrex     import Bittrex as B1
Exchange = B1(key, secret)

OH = Exchange.getorderhistory()["result"]
print len(OH) 
print OH[0].keys()
print 

OH = Exchange.getorderhistory(count=4)["result"]
print len(OH)
print

OH = Exchange.getorderhistory("BTC-SLS")["result"]
ohtable=lambda OH : ["%10s %10.8f BTC" %(oh["Exchange"], oh["PricePerUnit"]) for oh in OH]
pprint (ohtable(OH))
print

OH = Exchange.getorderhistory("BTC-SLS", count=3)["result"]
pprint (ohtable(OH))

from Bittrex_new import Bittrex as B2
print len( B2(key, secret).getorderhistory()["result"] )

and the results are:

14 [u'OrderUuid', u'QuantityRemaining', u'ImmediateOrCancel', u'IsConditional', u'Exchange', u'TimeStamp', u'Price', u'ConditionTarget', u'Commission', u'Limit', u'Closed', u'OrderType', u'PricePerUnit', u'Condition', u'Quantity']

14

(7,
 [u'   BTC-SLS 0.00042042 BTC',
  u'   BTC-SLS 0.00079879 BTC',
  u'   BTC-SLS 0.00073332 BTC',
  u'   BTC-SLS 0.00065151 BTC',
  u'   BTC-SLS 0.00039815 BTC',
  u'   BTC-SLS 0.00039858 BTC',
  u'   BTC-SLS 0.00028519 BTC'])

(7,
 [u'   BTC-SLS 0.00042042 BTC',
  u'   BTC-SLS 0.00079879 BTC',
  u'   BTC-SLS 0.00073332 BTC',
  u'   BTC-SLS 0.00065151 BTC',
  u'   BTC-SLS 0.00039815 BTC',
  u'   BTC-SLS 0.00039858 BTC',
  u'   BTC-SLS 0.00028519 BTC'])

14 [u'OrderUuid', u'QuantityRemaining', u'ImmediateOrCancel', u'IsConditional', u'Exchange', u'TimeStamp', u'Price', u'ConditionTarget', u'Commission', u'Limit', u'Closed', u'OrderType', u'PricePerUnit', u'Condition', u'Quantity']

14

(7,
 [u'   BTC-SLS 0.00042042 BTC',
  u'   BTC-SLS 0.00079879 BTC',
  u'   BTC-SLS 0.00073332 BTC',
  u'   BTC-SLS 0.00065151 BTC',
  u'   BTC-SLS 0.00039815 BTC',
  u'   BTC-SLS 0.00039858 BTC',
  u'   BTC-SLS 0.00028519 BTC'])

(7,
 [u'   BTC-SLS 0.00042042 BTC',
  u'   BTC-SLS 0.00079879 BTC',
  u'   BTC-SLS 0.00073332 BTC',
  u'   BTC-SLS 0.00065151 BTC',
  u'   BTC-SLS 0.00039815 BTC',
  u'   BTC-SLS 0.00039858 BTC',
  u'   BTC-SLS 0.00028519 BTC'])

site-packages\simplejson\decoder.py:398: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
Traceback (most recent call last):
  File "testing.py", line 59, in <module>
    github_issue_2()
  File "testing.py", line 54, in github_issue_2
    print len( B2(key, secret).getorderhistory()["result"] )
  File "Bittrex_new.py", line 367, in getorderhistory
    return self.api_query('getorderhistory', parameters)
  File "Bittrex_new.py", line 89, in api_query
    headers={"apisign": hmac.new(self.api_secret, request_url, hashlib.sha512).hexdigest()}
  File "site-packages\requests\models.py", line 808, in json
    return complexjson.loads(self.text, **kwargs)
  File "site-packages\simplejson\__init__.py", line 516, in loads
    return _default_decoder.decode(s)
  File "site-packages\simplejson\decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "site-packages\simplejson\decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

So:

  • bittrex seems to ignore the count parameter?
  • an old version of ericsomdahl/python-bittrex is working well with this added subroutine
  • the current version throws some decoder error when calling hmac.new. Perhaps that is related to #9 ?

Anyways, feel free to include my little extension into your codebase.

Thanks for this repo again,

:-)

Did Bittrex just block requests?

I've been using this library successfully for a few weeks. All of a sudden, I can't get any api call to return. Interestingly, I can't make a vanilla call via requests either.

I can GET this with a browser: https://bittrex.com/api/v1.1/public/getcurrencies

OTOH, I can't get it using this python-bittrex library. But, also, this is hanging for me right now:

In [1]: import requests

In [2]: res = requests.get('https://bittrex.com/api/v1.1/public/getcurrencies')
# ... hangs forever ...

I don't know if you can see this:

https://support.bittrex.com/hc/en-us/requests/151188?page=1

How to get historical data?

Hi there,
Thanks for the wrapper. Its nicely designed and easy to understand.

I was going through the api page on Bittrex's site and then this python wrapper here. They have nothing to fetch historical OHLC data for any period, do they?

Is there any way?

Regards,

Malformed request_url

You are missing an & in the request url for market and accounts, this was causing errors for me, the following code fixes it.

       elif method in self.market_set:
            request_url = (base_url % 'market') + method + '?apikey=' + self.api_key + "&nonce=" + nonce + "&"
        elif method in self.account_set:
            request_url = (base_url % 'account') + method + '?apikey=' + self.api_key + "&nonce=" + nonce + "&"

Set of Altcoins valuations to BTC

I am building a bot, looking into using Bittrex API, wonder how can I get a list of a set of altcoins. Like:

myset.json { 'btc', 'ltc', 'rby', 'efl', 'dash' ..}
$python yourscript.py myset.json
LTC: 0.0001
RBY: 0.000023
EFL: 0.000012
....

Is this possible with your calls?

UserWarning: Unknown distribution option: 'modules'

hello dear coder
first of all thank you this project

but i couldnt run it. i install python3.6 and pip install request but when i run the setup.py i have an error like this "

Warning (from warnings module):
File "C:\Users\Enes\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 261
warnings.warn(msg)
UserWarning: Unknown distribution option: 'modules'

Websocket support

For some reason someone asked me on the nodejs package how to do websockets in python, they provided some code to get started and I was able to fix it so I thought you guys might be interested in using it dparlevliet/node.bittrex.api#24

new version somehow incorrect

I had been using an older version of your code (some 2015, dunno when exactly), which worked fine (THANKS!). Now I tried updating, but your new code fails. Here is a test:

key="1b....."
secret="c2...."

from pprint import pprint

from Bittrex     import Bittrex as B1
from Bittrex_new import Bittrex as B2

Exchange = B1(key, secret)
print len( Exchange.get_balances() )
pprint (Exchange.get_balance("BTC"))
print

Exchange = B2(key, secret)
print len( Exchange.get_balances() )
pprint (Exchange.get_balance("BTC"))

This is what comes out:

3
{u'message': u'',
 u'result': {u'Available': 0.0,
             u'Balance': x.xxxxxxxx,
             u'CryptoAddress': u'1L.....',
             u'Currency': u'BTC',
             u'Pending': 0.0},
 u'success': True}

3
{u'message': u'INVALID_SIGNATURE', u'result': None, u'success': False}

So, without any parameters, it is fine, but as soon as I want to send a parameter with it, the wrong signature is calculated.

SSL handshake error

running tests I get an SSL error. Support told me "Please make sure you are disabling all ECDHE ciphers as they will lead to this error.". Didn't find any EC in the code, so no idea how to fix.

Traceback (most recent call last):
  File "/Users/ben/trading/python-bittrex/bittrex/test/bittrex_tests.py", line 31, in test_handles_none_key_or_secret
    actual = self.bittrex.get_markets()
  File "/Users/ben/trading/python-bittrex/bittrex/bittrex.py", line 78, in get_markets
    return self.api_query('getmarkets')
  File "/Users/ben/trading/python-bittrex/bittrex/bittrex.py", line 67, in api_query
    headers={"apisign": hmac.new(self.api_secret.encode(), request_url.encode(), hashlib.sha512).hexdigest()}
  File "/Library/Python/2.7/site-packages/requests/api.py", line 71, in get
    return request('get', url, params=params, **kwargs)
  File "/Library/Python/2.7/site-packages/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Library/Python/2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/Library/Python/2.7/site-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Python/2.7/site-packages/requests/adapters.py", line 477, in send
    raise SSLError(e, request=request)
SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)


JSONDecodeError

I had been running into this error intermittently and in different API requests. The problem got a lot worse once I threw my code up onto a server. I've run my code for thousands of iterations without throwing this error, but now that it's on this server, it happens every time I call the

Bittrex.getorder()

method. Here is where the error message goes from there:

line 67, in api_query
headers={"apisign": hmac.new(self.api_secret.encode(), request_url.encode(), hashlib.sha512).hexdigest()}
File "/usr/lib/python3/dist-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.5/json/init.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/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)

I've printed out the passed-through "uuid" value and it looks valid, but maybe it needs to be formatted a specific way..? The api_query method is called by all of the Bittrex requests, so it's just kinda strange.

Does anyone understand what conditions cause this JSONDecodeError?

The code is running more reliably on my Mac OS device and my server is Ubuntu 16.04 x64. Both machines are running Python 3.5.

Is this repo still being maintained?

Is this repo still being maintained? Just want to check before using it in my code.

On the Bittrex API page it says: "V1 will be deprecated on 7/20. Please move to V1.1 immediately". Does that affect this code at all or has it been transitioned?

AttributeError: module 'urllib' has no attribute 'urlencode'

Seems to be having python3 trouble.
This stackoverflow issue presents fix: https://stackoverflow.com/questions/28906859/module-has-no-attribute-urlencode

btrx.get_balance("ETH")
File "/usr/local/lib/python3.6/site-packages/bittrex/bittrex.py", line 292, in get_balance
return self.api_query('getbalance', {'currency': currency})
File "/usr/local/lib/python3.6/site-packages/bittrex/bittrex.py", line 62, in api_query
request_url += urllib.urlencode(options)
AttributeError: module 'urllib' has no attribute 'urlencode'

/public/getorderbook

I find the method get_orderbook(self, market, depth_type, depth=20) which can be called with parameter depth, but finally find out it does not control the length of response.

v2.0 get_order_history does not use market argument.

v1.1 returns only orders from the passed market. v2.0 returns a mixed bag of orders.

In [24]: bittrex.api_version
Out[24]: 'v1.1'

In [25]: bittrex.get_order_history('BTC-ZEC')['result'][0]
Out[25]: 
{
 'Exchange': 'BTC-ZEC',
 ....
}

In [26]: bittrex.api_version = 'v2.0'

In [27]: bittrex.get_order_history('BTC-ZEC')['result'][0]
Out[27]: 
{
 'Exchange': 'BTC-XZC',
 ...
}

Publish to pypi

Hello,

Thanks for this lib! It would be of great help if you published it to Pypi.

Best,
Mihnea

INVALID_SIGNATURE

The program below (with 'key' and 'secret' as provided by bittrex) produces as output INVALID_SIGNATURE. Any idea why?

Here is the program:

#!/usr/bin/env python
from bittrex import bittrex
api = bittrex('key', 'secret')
balance = api.getbalance('BTC')
print balance

SOS help getOpenOrders

Hello i am a young developer this is my first time with the api of bittrex, I am developing a python bot for bittrex, but is all the day that i try to make a request to get the open order.
My code is very similar to your but I dont know, why it dosent works the request status is 200 but this is the reply:
{'success': False, 'message': 'INVALID_SIGNATURE', 'result': None}
this is my code:

def getOpenOrders(self,url, market):

        nonce = int(time.time())
        urlrequest = url + '?apikey=' + self.apiKey + '&nonce=' +str(nonce)


        signature = hmac.new(self.Secret.encode(), urlrequest.encode(), hashlib.sha512).hexdigest()

        parameter = {
            'market':market,        
        }
        headers = {
            'apisign': signature
        }
        self.r = requests.get(urlrequest,parameter, headers= headers)
        print(self.r.url)
        print(self.r.json())

Could you please help me?

insufficient funds

did you have 'insufficient funds' message when you use buy_limit() ?
I have btc balance , but i had insufficient funds message from the result of buy_limit()

Cannot import name 'Bittrex'

I tried executing this small example and I'm getting the following error:

ImportError: cannot import name 'Bittrex'

Is it something I'm doing wrong?

This is my code:

from bittrex import Bittrex

btx = Bittrex(<key>, <key_secret>)

print(btx.get_balance("BTC"))

Error in Fedora 25 [ImportError: No module named requests]

Hi,

I have this error:

[blade@fedora-home-gateway bittrex]$ ./bittrex.py
Traceback (most recent call last):
  File "./bittrex.py", line 15, in <module>
    import requests
ImportError: No module named requests

my python version is:

[blade@fedora-home-gateway bittrex]$ python
Python 2.7.13 (default, May 10 2017, 20:04:28) 
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2

How can i fix/use this?
Thanks

APIKEY_INVALID

Whenever I try to make a MARKET_SET or ACCOUNT_SET (i.e. a non "public" request) I am just getting back APIKEY_INVALID. Is anyone else having this issue? Something seems to be going wrong in the authentication process with the API key and the secret.

buy_market

Hey,

First off, thank you for taking the time to develop this wrapper and share it,

For some reason when I try to make market_buy's I get a response that market_buy is not enabled for my API key even though it is. I wondered if anyone has encountered this problem?

Also, what do you pass as the argument for rate since its not necessary for market_buy, I put None.

INVALID SIGNATURE

I'm not sure why I seem to be having this issue. But I followed the code and instructions on bittrex and have been receiving this message for the past week: {'result': None, 'message': 'INVALID_SIGNATURE', 'success': False}
Any ideas why?

Python3.5?

Does this work in python3? I have it running great in python2.7 but i want to take advantage of async with python3.

I get this error when trying to do a simple get_market_summaries()

Traceback (most recent call last):
File "orderBook.py", line 33, in
order = my_bittrex.get_market_summaries()
File "/usr/local/lib/python3.5/dist-packages/bittrex/bittrex.py", line 110, in get_market_summaries
return self.api_query('getmarketsummaries')
File "/usr/local/lib/python3.5/dist-packages/bittrex/bittrex.py", line 62, in api_query
request_url += urllib.urlencode(options)
AttributeError: module 'urllib' has no attribute 'urlencode'

get_order_history() doesn't load entire history

I use a simple python script that pulls my orders every couple hours and counts them. I noticed that over the last hour my cumulative orders have somehow started going down. I'm simply pulling get_order_history() and counting up the result array.

If I go on Bittrex to my orders page and download my full order history it's different than what i'm getting from get_order_history(). Is there some sort of cap or limit on the amount of data pulled?

Can someone else test this for their own trade history?

secrets.json present but "No json object could be decoded

EE...

ERROR: test_get_balance (main.TestBittrexAccountAPI)

Traceback (most recent call last):
File "bittrex_tests.py", line 67, in setUp
self.secrets = json.load(secrets_file)
File "C:\ProgramData\Anaconda2\envs\py2\lib\json_init_.py", line 291, in load
**kw)
File "C:\ProgramData\Anaconda2\envs\py2\lib\json_init_.py", line 339, in loads
return _default_decoder.decode(s)
File "C:\ProgramData\Anaconda2\envs\py2\lib\json\decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\ProgramData\Anaconda2\envs\py2\lib\json\decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

======================================================================
ERROR: test_handles_invalid_key_or_secret (main.TestBittrexAccountAPI)

Traceback (most recent call last):
File "bittrex_tests.py", line 67, in setUp
self.secrets = json.load(secrets_file)
File "C:\ProgramData\Anaconda2\envs\py2\lib\json_init_.py", line 291, in load
**kw)
File "C:\ProgramData\Anaconda2\envs\py2\lib\json_init_.py", line 339, in loads
return _default_decoder.decode(s)
File "C:\ProgramData\Anaconda2\envs\py2\lib\json\decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\ProgramData\Anaconda2\envs\py2\lib\json\decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded


Ran 5 tests in 0.953s

FAILED (errors=2)

JSON file is present, setup ran fine.
running in a python 2.7 envelope.
tried in a py3 envelope and same error.
.JSON file was made in Spyder....running Anaconda on windows.

getting an error with buy_limit

btx.buy_limit(bmName, bcCount, markets[bmName].ask)
KeyError: 'BTC-LUN'

and when I have it just as
btx.buy_limit(bmName, bcCount)
TypeError: buy_limit() takes exactly 4 arguments (3 given)

i get that error

get_marketsummary returning type list?

According to the commenting the get_marketsummary should return a dict, but it's returning a list for me. This is making getting the info into a dataframe difficult. Does anyone have a solution for this?

Version question

Hi Eric and everyone.

I installed a version of the module using pip install. It is different, but works after looking at the code and leaving out the api version. I believe this is an older version but I wanted to be sure. Is the pip repository older ?

Thank you,

Jack

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.