Getting 66: insufficient priority. when trying to push transaction

814 Views Asked by At

Basically I getting 66: insufficient priority. Code:-26 when I trying to push transaction

I already tried to increase fees manually. AMOUNT_TOSEND is in satoshis

  1. I take total_received value from https://api.blockcypher.com/v1/btc/test3/addrs/ + address + '/full?limit=50' and multiply it by 100000000
  2. I take fee from here: https://test-insight.bitpay.com/api/utils/estimatefee and multiply it by 100000000
  3. Here is how I calculate outputs: tx.addOutput(ADDRESS_BENEFICIARY, Number(AMOUNT_TOSEND)) tx.addOutput(ADDRESS_BENEFICIARY, Number(balance) - (Number(AMOUNT_TOSEND) + Number(fee)))
  4. Pasting on https://test-insight.bitpay.com/tx/send and getting 66: insufficient priority. Code:-26
1

There are 1 best solutions below

1
On

Was able to fix after I started to use transaction amount instead of the total balance, also multiply fee by transaction size in bytes, but not sure I exactly need it