> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Raw Transaction

> Broadcast a pre-signed raw Bitcoin transaction to the network.

`DynamicSDK.instance.bitcoin.sendRawTransaction` broadcasts a raw transaction hex (or a finalized PSBT) to the Bitcoin network. Use it as the final step after [building](/flutter/wallets/bitcoin/build-psbt) and [signing](/flutter/wallets/bitcoin/sign-psbt) a PSBT yourself, or to relay a transaction that was signed elsewhere.

## Example

```dart theme={"system"}
import 'package:dynamic_sdk/dynamic_sdk.dart';

final sdk = DynamicSDK.instance;
final wallet = sdk.wallets.userWallets.firstWhere(
  (w) => w.chain == 'BTC',
);

final txId = await sdk.bitcoin.sendRawTransaction(
  walletId: wallet.id,
  rawTransaction: '0200000001...', // raw tx hex (or finalized PSBT)
);
print('Broadcasted: $txId');
```

## Parameters

| Parameter        | Type     | Description                                          |
| ---------------- | -------- | ---------------------------------------------------- |
| `walletId`       | `String` | The id of a wallet whose `chain == 'BTC'`.           |
| `rawTransaction` | `String` | Raw transaction hex (or a fully signed PSBT base64). |

## Returns

`Future<String>` — the broadcasted transaction id (txid).

<Tip>
  If you just want to send BTC without managing the PSBT, [`sendBitcoin`](/flutter/wallets/bitcoin/send-bitcoin) builds, signs, and broadcasts in a single call.
</Tip>
