Send BTC from SUBTC Testnet Wallet

permalink SUBTC
#btc#send#subtc#testnet#wallet

After funding your testnet wallet, you can send BTC to another address.
Always use idempotency headers to prevent duplicate transactions.

Command:

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\":\"tb1qjcr7lcucmwudwqscew4r078gxkw549ruq5r97w\",\"amount_sat\":50000}"

Example response:
{
 "ok": true,
 "request_id": "7403dfc25cb1c458",
 "result": {
  "coin": "btc",
  "fee_addr": "tb1q2dn34v7l3jmn30zuwgkzry23td949qtrre46cw",
  "fee_bps": 300,
  "net": "test",
  "network_fee_by": "service_fee",
  "requested_sat": 50000,
  "send_method": "sendmany",
  "sent_sat": 48500,
  "service_fee_sat": 1500,
  "txid": "299e90821d0d089d48efe139a9cdb0b20bb3db58902900d5d5cbc2331fad6acc",
  "wallet_id": "w_cf21a601a3f461a92699e5b5dac80ad6d9d66de4592d"
 }
}

What happened:

- 50,000 SAT were requested to send
- 1,500 SAT was deducted as the 3% service fee
- 48,500 SAT were sent to the recipient

- Transaction ID: 299e90821d0d089d48efe139a9cdb0b20bb3db58902900d5d5cbc2331fad6acc

API Base:
https://subtc.net/api