Send BTC from a Mainnet Wallet

permalink SUBTC
#btc#mainnet#send#wallet

Once a wallet has confirmed balance, you can send BTC to another address using wallet_send.

Command:<br>

curl -sS -X POST "https://api.subtc.net/v1/btc?mode=wallet_send" \
-H "X-SUBTC-KEY: $KEY" \
-H "X-SUBTC-IDEMPOTENCY: send-$(date +%s)" \
-H "Content-Type: application/json" \
-d "{\"wallet_id\":\"$WID\",\"to\":\"bc1q9z7mhf2lhhyhultlqc0q3elnttalscyfddyqzy\",\"amount_sat\":30000}"
<br>Example response:<br>
{
 "ok": true,
 "request_id": "b10b876689083d8f",
 "result": {
  "coin": "btc",
  "net": "main",
  "requested_sat": 30000,
  "sent_sat": 29100,
  "service_fee_sat": 900,
  "fee_bps": 300,
  "send_method": "sendmany",
  "txid": "2ffcae3cae63a96ef69089f9f47f5d013e2099302a70381b8a958abc7599517d",
  "wallet_id": "w_87d2a561cdd665948c1d756106f7b2179327927c3b8c"
 }
}
<br>What happened:

The wallet attempted to send 30,000 SAT.

Service fee (3%) = 900 SAT<br>Amount delivered to the destination = 29,100 SAT

Transaction ID:<br>

2ffcae3cae63a96ef69089f9f47f5d013e2099302a70381b8a958abc7599517d
<br>The idempotency header ensures the request cannot create duplicate transactions if retried.

API Base:<br>https://subtc.net/api