> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.finrock.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit an On-Chain Transaction — POST /dac/v1/transaction

> Submit an on-chain transfer from your Finrock wallet. Supports single withdrawals, bulk UTXO payouts, exchange transfers, and internal sub-account moves.

The Create Transaction endpoint submits an on-chain transfer from your Finrock wallet to an internal or external destination. It supports single-output withdrawals, bulk UTXO payouts to multiple recipients in one call, transfers to exchange accounts, and internal moves between sub-accounts. Pass a `sequence_id` to make your request idempotent — Finrock returns the original transaction if the same sequence ID is submitted more than once. For AML tracking, include the `aml_cid` corresponding to the external customer associated with the withdrawal.

## Request

<ParamField header="x-api-key" type="string" required>
  Your Finrock API key.
</ParamField>

<ParamField header="Authorization" type="string" required>
  Your JWT bearer token in the format `Token {JWT}`.
</ParamField>

<ParamField body="asset" type="string" required>
  The asset to transfer. Use the `asset_name` value from the [Supported Assets](/api-reference/utilities/supported-assets) list (e.g. `BTC`, `ETH`, `USDT_ETH`).
</ParamField>

<ParamField body="amount" type="double" required>
  The amount to transfer, expressed in the asset's native unit. Maximum precision is 8 decimal places. Ignored when `max_amount` is `true`.
</ParamField>

<ParamField body="source_type" type="string" required>
  Defines the spending source. Refer to the [Transaction Types](/reference/transaction-types) reference for the full list of allowed values.
</ParamField>

<ParamField body="source_id" type="string">
  An address string or address label to spend from. When omitted, Finrock selects the source automatically from available funds in the wallet.
</ParamField>

<ParamField body="source_tag" type="string">
  The `address_tag` value of the source address. Required when spending from a specific address on XRP or XLM blockchains that use destination tags.
</ParamField>

<ParamField body="destination_type" type="string" required>
  Defines the destination category. Allowed values: `INTERNAL`, `EXTERNAL`, `SUBACCOUNT`, `EXCHANGE`. Refer to the [Transaction Types](/reference/transaction-types) reference for details on each value.
</ParamField>

<ParamField body="destination_id" type="string">
  The destination address, label, or identifier. Either `destination_id` **or** `destinations` (bulk array) is required — do not supply both.
</ParamField>

<ParamField body="destination_tag" type="string">
  The destination tag or memo for the recipient address. Required when sending to XRP or XLM addresses that specify a destination tag.
</ParamField>

<ParamField body="destinations" type="array of objects">
  For UTXO chains only — provide an array of recipient objects to create a bulk payout in a single transaction. Cannot be used together with `destination_id`.

  <Expandable title="destinations object">
    <ParamField body="address" type="string" required>
      The recipient blockchain address.
    </ParamField>

    <ParamField body="amount" type="double" required>
      The amount to send to this recipient, in the asset's native unit.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="memo" type="string">
  A free-text note attached to the transaction record in Finrock. Useful for internal reconciliation. The memo is not broadcast on-chain.
</ParamField>

<ParamField body="sequence_id" type="string">
  A client-generated unique identifier for idempotency. If a transaction with this `sequence_id` already exists in your sub-account, Finrock returns the existing transaction rather than creating a duplicate. See [Request Idempotency](/reference/idempotency) for details.
</ParamField>

<ParamField body="max_amount" type="boolean" default="false">
  When `true`, Finrock sends the maximum possible balance after deducting the network fee, ignoring the `amount` field. Useful for emptying an address.
</ParamField>

<ParamField body="aml_cid" type="string">
  Your external customer ID for AML compliance tracking. When provided, Finrock associates this transaction with the AML record for the specified customer. Required if your account has AML screening enabled.
</ParamField>

## Example Request

```bash theme={null}
curl --request POST \
     --url https://api.finrock.io/dac/v1/transaction \
     --header 'Authorization: Token {JWT}' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: {{api_key}}' \
     --data '{
       "asset": "ETH",
       "amount": 0.5,
       "source_type": "INTERNAL",
       "destination_type": "EXTERNAL",
       "destination_id": "0xRecipientAddress1234567890abcdef1234567890",
       "memo": "withdrawal-order-1042",
       "sequence_id": "seq_order_1042",
       "max_amount": false
     }'
```

## Response

A successful request returns HTTP `200` with the created transaction object.

<ResponseField name="id" type="string">
  The Finrock-assigned unique transaction identifier.
</ResponseField>

<ResponseField name="hash" type="string">
  The on-chain transaction hash once broadcast. `null` while the transaction is still being signed or queued.
</ResponseField>

<ResponseField name="asset" type="string">
  The asset being transferred.
</ResponseField>

<ResponseField name="amount" type="number">
  The transfer amount in the asset's native unit.
</ResponseField>

<ResponseField name="fee" type="number">
  Estimated or actual network fee in the blockchain's native unit.
</ResponseField>

<ResponseField name="status" type="string">
  Initial transaction status. Typical value on creation: `pending`.
</ResponseField>

<ResponseField name="sequence_id" type="string">
  The `sequence_id` you provided, echoed back for confirmation.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of when the transaction was created.
</ResponseField>

```json theme={null}
{
  "id": "txn_withdrawal_1042",
  "hash": null,
  "asset": "ETH",
  "amount": 0.5,
  "fee": 0.00042,
  "status": "pending",
  "sequence_id": "seq_order_1042",
  "created_at": "2024-06-01T14:00:00Z"
}
```

<ResponseField name="401" type="object">
  Returned when the `x-api-key` or `Authorization` header is missing or invalid.
</ResponseField>

```json theme={null}
{
  "error": "Unauthorized",
  "message": "Invalid or missing authentication credentials."
}
```

<Note>
  Poll the [List Transactions](/api-reference/transactions/list-transactions) endpoint using the returned `id` to track the transaction through to on-chain confirmation.
</Note>
