Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: buy_limit() missing 2 required positional arguments: 'quantity' and 'rate' #148

Open
tunage opened this issue Mar 28, 2018 · 1 comment

Comments

@tunage
Copy link

tunage commented Mar 28, 2018

I am trying to make a buy limit purchase via the bittrex api and I am getting an error that my arguments are in the wrong place.

from bittrex.bittrex import API_V2_0, Bittrex
import json

my_bittrex = Bittrex("zzzzz", "zzzzz", api_version=API_V2_0)

trade = 'BTC'
currency = 'TRX'
market = '{0}-{1}'.format(trade, currency)

b = (my_bittrex.buy_limit({market, 100, float(0.00005550)}))

error:

Traceback (most recent call last):
File "bittrex/apitest.py", line 17, in
b = (my_bittrex.buy_limit({market, 100, float(0.00005550)}))
TypeError: buy_limit() missing 2 required positional arguments: 'quantity' and 'rate'

How do I properly position my arguments for bittrex?

I also tried:

b = (my_bittrex.trade_buy({market, 100, float(0.00005550)}))

and

b = my_bittrex.trade_buy(market=market, quantity=100, rate=float(0.00005550))

and

params = {'market': market, 'quantity': 100, 'rate': float(0.00005550)}
#b = my_bittrex.trade_buy(**params)
print (b)

error output from session:

{'result': None, 'success': False, 'message': 'There was a problem processing your request. If this problem persists, please email [email protected] with this error id - 4feb00b8-fbe9-4dd3-b11f-95fd7bf5250f'}
root@raspberrypi3:/var/www/html/jango# nano -c bittrex/apitest.py
root@raspberrypi3:/var/www/html/jango# python3 bittrex/apitest.py
{'message': 'There was a problem processing your request. If this problem persists, please email [email protected] with this error id - e0396c8d-8a4c-41c5-b6c4-6842c31386e2', 'success': False, 'result': None}
root@raspberrypi3:/var/www/html/jango# nano -c bittrex/apitest.py
root@raspberrypi3:/var/www/html/jango# python3 bittrex/apitest.py
{'success': False, 'result': None, 'message': 'NO_API_RESPONSE'}
root@raspberrypi3:/var/www/html/jango# python3 bittrex/apitest.py
{'message': 'NO_API_RESPONSE', 'success': False, 'result': None}
root@raspberrypi3:/var/www/html/jango# nano -c bittrex/apitest.py

@tunage
Copy link
Author

tunage commented Mar 30, 2018

resolved with

b= my_bittrex.trade_buy(market='BTC-TRX', order_type='LIMIT', quantity=100, rate=float(0.00000555), time_in_effect='GOOD_TIL_CANCELLED',condition_type='None', target=float(0.0))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant