Hello All from a newbie
As per a suggestion from Xeroc to use pybitshares for Bot type functions ( since I couldn't get stakemachine permisions eror solved : see
https://bitsharestalk.org/index.php/topic,23939.msg304190.html#msg304190 ) I have started trying out the scripts in
http://docs.pybitshares.com/en/latest/tutorials.html to see what can be done there.
In particular after installing as per the intro I tried the Simple Sell script modified for the testnet account "AAB-12345" .
but get bitshares.exceptions.NoWalletException .
I have looked at the pybitshares documentation but its not clear how to specify what wallet is being used?
That is how do you get Python to access a particular wallet on a Ubuntu VM that I am testing on?
Thanks for any help
Cheers John
=========================================================
from bitshares import BitShares
from bitshares.market import Market
from bitshares.price import Price
from bitshares.amount import Amount
#
# Instanciate BitShares (pick network via API node)
#
bitshares = BitShares(
"wss://node.testnet.bitshares.eu",
nobroadcast=False # <<--- set this to False when you want to fire!
)
#
# Unlock the Wallet
#
bitshares.wallet.unlock("AAB-12345")
#
# This defines the market we are looking at.
# The first asset in the first argument is the *quote*
# Sell and buy calls always refer to the *quote*
#
market = Market(
"GOLD:TEST",
bitshares_instance=bitshares
)
#
# Sell an asset for a price with amount (quote)
#
print(market.sell(
Price(10.0, "TEST/GOLD"),
Amount("0.01 GOLD")
))
=========================================================
vagrant@vagrant-ubuntu-trusty-64:~/py$ python3 ./ssell.py
Traceback (most recent call last):
File "./ssell.py", line 17, in <module>
bitshares.wallet.unlock("AAB-12345")
File "/usr/local/lib/python3.4/dist-packages/bitshares/wallet.py", line 107, in unlock
raise NoWalletException
bitshares.exceptions.NoWalletException