> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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](https://docs.dynamic.xyz/docs/flutter/wallets/bitcoin/build-psbt.md) and [signing](https://docs.dynamic.xyz/docs/flutter/wallets/bitcoin/sign-psbt.md) 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`](https://docs.dynamic.xyz/docs/flutter/wallets/bitcoin/send-bitcoin) builds, signs, and broadcasts in a single call.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.