Bitcoin Forum
July 15, 2018, 09:37:02 PM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Problem Creating Simple Bittrex Bot in Python  (Read 1027 times)
virtfund
Sr. Member
****
Offline Offline

Activity: 504
Merit: 251



View Profile
May 31, 2015, 02:31:51 PM
 #1

Wrote a simple bot to automate a task for Bittrex trading. Here is the source code:

from Bittrex import Bittrex
import time

trader = Bittrex(APIKEYS)

while True:
   while trader.get_balance('LDOGE')['result']['Available'] is None:
      time.sleep(15)
      print "1"

   bal=trader.get_balance('LDOGE')['result']['Available']
   print '2'
   trader.sell_limit('BTC-LDOGE', 0.00000004, bal)
   print '3'

whenever I run each command through the command line I get this output from trader.sell_limit (and .buy_limit just to see if that was the problem):

{u'message': u'ZERO_OR_NEGATIVE_NOT_ALLOWED', u'result': None, u'success': False}

Any ideas why? I have a high enough balance for the trade.

                                                                               
                                                                               
                                                                               
            ,,▄▄▄▄▄▄w,                                    ,╓▄▄▄▄▄▄w,           
         ╓▄█▓▓▓▓▓▓▓▓▓▓▓█▄,                             a▓█▓▓▓▓▓▓▓▓▓▓▓▓▄         
       ▄█▓▓▓▓█▀▀▀▀▀▀█▓▓▓▓▓▓,                         ▄█▓▓▓▓█▀▀▀▀▀▀█▓▓▓▓▓▄       
     ,█▓▓▓█▀          ╙▀▓▓▓▓▄                      a█▓▓▓█▀          ╙▓▓▓▓█╕     
     █▓▓▓▀              `▓▓▓▓█                    ▓▓▓▓▓▀              ╙▓▓▓▓L   
    ▐▓▓▓█     ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╖                ,█▓▓▓▓▌                ▐▓▓▓█   
    ▓▓▓▓L     ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄              ╓█▓▓▓▓▓C                 ▓▓▓▓   
    ▓▓▓▓▌      `````````````└█▓▓▓▌            ▄▓▓▓▓▓▓▓▌                ╒▓▓▓▓   
    └▓▓▓▓▄                    █▓▓▓█          ▄▓▓▓▓▀▓▓▓▓Ç              ,█▓▓▓▌   
     ╙▓▓▓▓▄,           ▄██Ç    ▀▓▓▓█▄      ,█▓▓▓█` ▀▓▓▓▓▄            ▄█▓▓▓▀     
      `▓▓▓▓▓█▄w,,,,,▄▓█▓▓▓▓     ╙█▓▓▓█▄,,╓▓▓▓▓▓▀    "█▓▓▓▓█▄w,,,,╓▄▓▓▓▓▓█╜     
        "▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▀        ▀▓▓▓▓▓▓▓▓▓▓▀'       ╙▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓█╜       
           "▀▀▀█████▀▀'             "▀▓███▀▀             "▀▀▀█████▀▀╙           
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                            ]╢╢╢╖              ,╢╢╢@                           
                             ╙▒▒▒╢╖          ╓╢▒▒▒╜                             
                               ╙╢▒▒▒▒╢H╥╥╥╢╢▒▒▒▒╜                               
                                  ╙╜╢▒▒▒▒▒▒╢╨╜                                 
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
THE WORLD OF SELF-DEVELOPMENT
            EVO         
...
Blockchain platform for assessing and developing human skills
  Telegram    Facebook    evo.live    Github    Twitter    ANN 
The World's Betting Exchange

Bet with play money. Win real Bitcoin. 5BTC Prize Fund for World Cup 2018.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1531690623
Hero Member
*
Offline Offline

Posts: 1531690623

View Profile Personal Message (Offline)

Ignore
1531690623
Reply with quote  #2

1531690623
Report to moderator
1531690623
Hero Member
*
Offline Offline

Posts: 1531690623

View Profile Personal Message (Offline)

Ignore
1531690623
Reply with quote  #2

1531690623
Report to moderator
1531690623
Hero Member
*
Offline Offline

Posts: 1531690623

View Profile Personal Message (Offline)

Ignore
1531690623
Reply with quote  #2

1531690623
Report to moderator
tidus1097
Sr. Member
****
Offline Offline

Activity: 406
Merit: 252


View Profile
May 31, 2015, 05:55:56 PM
 #2

I'm not sure why you posted this in currency exchange. This is just for trading currencies with someone. You probably will have better luck if you move this to the appropriate board. Maybe try Technical Discussion. I'm not even sure thats the right board, but you'll probably get more hits there than in here. You can move the topic at the bottom left of the page.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!