Can't send tx with the insight send API?


(Joe Han) #1

Can’t send tx with the insight send api. I tried using both Curl and Postman but I get the same error.
For example the following 'curl -d {"rawtx":"mytx"} https://insight.bitpay.com/api/tx/send', gives me the error 'parameter must be hexadecimal string (not '') (code -8)'


(FedFranz) #2

As it says… tx should be hexadecimal, not a string.

You should prepare the transaction object (for example via bitcore-lib), sign it and then submit it to the API

See here: Insight API - Transaction Broadcasting