Bitcoin Forum
June 22, 2024, 05:25:31 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin rpc createrawtransaction error  (Read 127 times)
lib3rat0r (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile WWW
October 29, 2019, 08:35:09 PM
 #1

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.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
October 29, 2019, 08:53:20 PM
Merited by Foxpup (2), gmaxwell (1)
 #2

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.

lib3rat0r (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile WWW
October 29, 2019, 11:51:08 PM
 #3

thank you very much! that solved it!
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!