Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: lib3rat0r on October 29, 2019, 08:35:09 PM



Title: bitcoin rpc createrawtransaction error
Post by: lib3rat0r on October 29, 2019, 08:35:09 PM
Hello everyone,

I am calling bitcoin RPC createrawtransaction command with the following args:

arg 1:
Code:
[{"txid":"TXID","vout":19,"address":"ADDR","label":"","scriptPubKey":"PUB_KEY","amount":0.0002,"confirmations":139242,"spendable":true,"solvable":true,"desc":"...","safe":true,"priority":27.8484}]

arg 2:
Code:
ADDR => 0.00005
ADDR => 0.00015000000000000001

Getting the following error: Request error: {"code":-3,"message":"Invalid amount"}

This code used to work around ~1 month ago and I'm wondering if anything has changed... any help is appreciated.


Title: Re: bitcoin rpc createrawtransaction error
Post by: achow101 on October 29, 2019, 08:53:20 PM
arg 2:
Code:
ADDR => 0.00005
ADDR => 0.00015000000000000001

Getting the following error: Request error: {"code":-3,"message":"Invalid amount"}

This code used to work around ~1 month ago and I'm wondering if anything has changed... any help is appreciated.
This shouldn't have ever worked. There are way too many decimal places in your second output. Bitcoin only goes down to 8 decimal places, anything beyond that is invalid.


Title: Re: bitcoin rpc createrawtransaction error
Post by: lib3rat0r on October 29, 2019, 11:51:08 PM
thank you very much! that solved it!