user85749: I want to calculate the fees of a blocktrail transaction with blocktrail SDK, before making the transaction, in order to let the recipient pay fees.
Here is what I tried:
$FEES = $wallet->coinSelection(\Blocktrail\SDK\Wallet::normalizeOutputsStruct(['66f4dec6ab29cd056ce1814c6fdfee05e1524b36' =>'100000']),false,false,\Blocktrail\SDK\Wallet::FEE_STRATEGY_LOW_PRIORITY;
echo "$FEES";
$fee = $FEES['fee'];
echo "$fee";

But this don't work, it says this: Fatal error: Uncaught Blocktrail\SDK\Exceptions\BlocktrailSDKException: Address not recognized
How can I fix this error?

user43738: I am not sure as have not used their api system but it could be down to the format of your bitcoin address you are passing in.
66f4dec6ab29cd056ce1814c6fdfee05e1524b36 is read as a valid bitcoin address using this service
However when I search that address under a block explorer I get the following address which starts with the more common 1 1APPGSyMsPaBUAHtjEm6tPqV9U54JRzmd6
66f is not a start of a bitcoin address i recognise, though there are many out but no mention on the wiki
Thus I would suggest trying your code with the more common bitcoin address format
$FEES = $wallet->coinSelection(\Blocktrail\SDK\Wallet::normalizeOutputsStruct(['1APPGSyMsPaBUAHtjEm6tPqV9U54JRzmd6' =>'100000']),false,false,\Blocktrail\SDK\Wallet::FEE_STRATEGY_LOW_PRIORITY['fee'];
echo "$FEES";

And see if that works

user51948: 66f4dec6ab29cd056ce1814c6fdfee05e1524b36 is not a valid Bitcoin address.
Valid Bitcoin addresses on mainnet start with a 1 (P2PKH), 3 (P2SH), or bc1 (segwit).
On testnet, the addresses start with m or n (P2PKH), 2 (P2SH), or tb1 (segwit).

85749: <p>I want to calculate the fees of a blocktrail transaction with blocktrail SDK, before making the transaction, in order to let the recipient pay fees.</p>
<p>Here is what I tried:</p>
<pre><code>$FEES = $wallet-&gt;coinSelection(\Blocktrail\SDK\Wallet::normalizeOutputsStruct(['66f4dec6ab29cd056ce1814c6fdfee05e1524b36' =&gt;'100000']),false,false,\Blocktrail\SDK\Wallet::FEE_STRATEGY_LOW_PRIORITY;
echo &quot;$FEES&quot;;
$fee = $FEES['fee'];
echo &quot;$fee&quot;;
</code></pre>
<p>But this don't work, it says this: <code>Fatal error: Uncaught Blocktrail\SDK\Exceptions\BlocktrailSDKException: Address not recognized</code></p>
<p>How can I fix this error?</p>
 43738: <p>I am not sure as have not used their api system but it could be down to the format of your bitcoin address you are passing in.</p>

<p><code>66f4dec6ab29cd056ce1814c6fdfee05e1524b36</code> is read as a valid bitcoin address using <a href="https://thomas.vanhoutte.be/tools/validate-bitcoin-address.php?address=66f4dec6ab29cd056ce1814c6fdfee05e1524b36&amp;submit=" rel="nofollow noreferrer">this service</a></p>

<p>However when I <a href="https://www.blockchain.com/btc/address/1APPGSyMsPaBUAHtjEm6tPqV9U54JRzmd6" rel="nofollow noreferrer">search that address under a block explorer</a> I get the following address which starts with the more common 1 <code>1APPGSyMsPaBUAHtjEm6tPqV9U54JRzmd6</code></p>

<p>66f is not a start of a bitcoin address i recognise, though there are many out but <a href="https://en.bitcoin.it/wiki/List_of_address_prefixes" rel="nofollow noreferrer">no mention on the wiki</a></p>

<p>Thus I would suggest trying your code with the more common bitcoin address format</p>

<pre><code>$FEES = $wallet-&gt;coinSelection(\Blocktrail\SDK\Wallet::normalizeOutputsStruct(['1APPGSyMsPaBUAHtjEm6tPqV9U54JRzmd6' =&gt;'100000']),false,false,\Blocktrail\SDK\Wallet::FEE_STRATEGY_LOW_PRIORITY['fee'];
echo "$FEES";
</code></pre>

<p>And see if that works</p>
 51948: <p><code>66f4dec6ab29cd056ce1814c6fdfee05e1524b36</code> is not a valid Bitcoin address.</p>
<p>Valid Bitcoin addresses on mainnet start with a <code>1</code> (P2PKH), <code>3</code> (P2SH), or <code>bc1</code> (segwit).</p>
<p>On testnet, the addresses start with <code>m</code> or <code>n</code> (P2PKH), <code>2</code> (P2SH), or <code>tb1</code> (segwit).</p>
