Bitcoin Forum
April 25, 2024, 09:00:10 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: -  (Read 2221 times)
johnsmithx (OP)
Hero Member
*****
Offline Offline

Activity: 589
Merit: 507

I don't buy nor sell anything here and never will.


View Profile
-
November 14, 2016, 06:57:52 PM
Last edit: September 08, 2017, 11:35:35 AM by johnsmithx
 #1

-

My list of 43(+3) reviewed Bitcoin forks | You don't have to download the pre-fork blockchain again for each fork! | Beware of fraudulent AWS accounts sellers and dangerous edu AWS codes! + My personal list of legit sellers and scammers | Never publicly reveal your btc addresses, ownership or any other details and stay very far away from anybody who asks you to! | The general rule of safe buying is: if the seller is a newbie, with no reputation, with no topic nor trust feedback, offering no vouches and/or selling from a locked or self-moderated topic and unwilling to go first or use escrow => AVOID. Always check the trust feedback first and make sure that you have enabled "Show untrusted feedback by default" in "Profile / Forum Profile Information".
1714035610
Hero Member
*
Offline Offline

Posts: 1714035610

View Profile Personal Message (Offline)

Ignore
1714035610
Reply with quote  #2

1714035610
Report to moderator
1714035610
Hero Member
*
Offline Offline

Posts: 1714035610

View Profile Personal Message (Offline)

Ignore
1714035610
Reply with quote  #2

1714035610
Report to moderator
1714035610
Hero Member
*
Offline Offline

Posts: 1714035610

View Profile Personal Message (Offline)

Ignore
1714035610
Reply with quote  #2

1714035610
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714035610
Hero Member
*
Offline Offline

Posts: 1714035610

View Profile Personal Message (Offline)

Ignore
1714035610
Reply with quote  #2

1714035610
Report to moderator
1714035610
Hero Member
*
Offline Offline

Posts: 1714035610

View Profile Personal Message (Offline)

Ignore
1714035610
Reply with quote  #2

1714035610
Report to moderator
Domanell
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
December 05, 2016, 02:06:52 PM
 #2

poloniex.py is ok
autosell.py
Code:
import signal, time, sys
import poloniex

APIKey = 'JH*****0U'
Secret = '9677****************************9e'
timefmt = '%Y-%m-%d %H:%M:%S UTC'

shutdown = False
def signal_handler(signal, frame):
    global shutdown
    shutdown = True
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)

p = poloniex.poloniex(APIKey, Secret)

while True:
    balance = float(p.returnBalances()['ZEC'])
    if balance >= 0.0001:
        lastprice = float(p.returnTicker()['BTC_ZEC']['last'])
        print '[%s] detected %s ZEC balance, selling at %s for BTC' % (time.strftime(timefmt, time.gmtime()), balance, lastprice)
        print '[%s] %s' % (time.strftime(timefmt, time.gmtime()), p.sell('BTC_ZEC', lastprice, balance))
    if shutdown:
        print '[%s] exiting' % time.strftime(timefmt, time.gmtime())
        sys.exit(1)
    time.sleep(1)

error
Code:
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
========================== RESTART: C:\autosell.py ==========================

Traceback (most recent call last):
  File "C:\autosell.py", line 18, in <module>
    balance = float(p.returnBalances()['ZEC'])
KeyError: 'ZEC'
>>>

Can you help me?
clipto
Member
**
Offline Offline

Activity: 311
Merit: 10


View Profile
April 18, 2017, 10:58:58 AM
 #3

What Python version is used? Looks like version 2?
Guess we need other commands for Python 3.5 to get this working?
clipto
Member
**
Offline Offline

Activity: 311
Merit: 10


View Profile
April 18, 2017, 10:48:13 PM
 #4

Thanks for responding.
Have you succesfully used this new script?
This is what I get:

c:\Autosell>python autosell.py zec
Traceback (most recent call last):
  File "autosell.py", line 2, in <module>
    import poloniex
  File "c:\_mining\_Autosell\poloniex.py", line 2, in <module>
    import urllib2
ImportError: No module named 'urllib2'

Changed the start of the poloniex.py file:
import urllib
import urllib2
import json
import time
import hmac,hashlib

to:
import urllib
import urllib3
import json
import time
import hmac,hashlib

Not sure if that's correct? Huh
But error is gone..

c:\Autosell>python autosell.py zec
Traceback (most recent call last):
  File "autosell.py", line 22, in <module>
    p = poloniexapi.poloniex(APIKey, Secret)
NameError: name 'poloniexapi' is not defined

Line 22 in autosell.py:
p = poloniexapi.poloniex(APIKey, Secret)

Old version was:
p = poloniex.poloniex(APIKey, Secret)

But that doesn't work either?  Huh
Don't see a recent api connection at Poloniex either.
clipto
Member
**
Offline Offline

Activity: 311
Merit: 10


View Profile
April 19, 2017, 06:16:54 PM
 #5

It's working, thanks!  Grin
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!