I've been trying to create a raw transaction over JSON-RPC using Python and can't figure out why I receive this error:
>>> client.createrawtransaction([{'txid': 'e1e5775f467a2803a4ebc6e17f223617062d9a98a953d5eaef06ab9ae0b2a400', 'vout': 17.9995}], {'mtBA36egrarxkCuzu64e7EtuwUUphS8GWn': 17.999})
Traceback (most recent call last):
File "<pyshell#42>", line 1, in <module>
client.createrawtransaction([{'txid': 'e1e5775f467a2803a4ebc6e17f223617062d9a98a953d5eaef06ab9ae0b2a400', 'vout': 17.9995}], {'mtBA36egrarxkCuzu64e7EtuwUUphS8GWn': 17.999})
File "C:\Python27\lib\site-packages\jsonrpc\proxy.py", line 45, in __call__
raise JSONRPCException(resp['error'])
JSONRPCException
vout is an integer index into the transaction referenced by txid. It can't be 17.9995.
if you run:
you should get a list of unspent outputs that your wallet has the ability to spend.
Each unspent output will have a "txid" value and a "vout" value. These are the two pieces of information that you have to supply to createrawtransaction if you want to spend that output.