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

# POST /submit-transaction

> Send a signed Solana or Bitcoin transaction through RAVN.

Only for a `TRANSACTION` that carries `submit`, which appears only on quotes sent with
[`broadcastViaRavn: true`](https://docs.ravn.exchange/bitcoin-and-solana#broadcastviaravn).

> [!WARNING]
>
> **Never broadcast a transaction that came with `submit`.** Sign `transaction.serialized` (Bitcoin:
> `transaction.psbt`) without sending it, and post it here. RAVN checks it, then sends it (or hands it to Jupiter to land).
> Broadcast yourself, it can fail to land, or the funds can end up stuck at the venue.

* A Layerswap memo payment: the wallet must already hold the amount and SOL for fees. Post it
  within about a minute, before its blockhash expires.
* A Jupiter order: post it within seconds (market makers hold a price about 20 seconds), and let the
  call run up to 2 minutes while it lands.
* A Bitcoin payment: sign every input and post it within 30 minutes. RAVN sends only the exact
  transaction it built.

## Request

**quoteToken** `string` *required*

The one `/execute` returned with this transaction.

**signedTransaction** `string` *required*

`transaction.serialized` signed by the user's wallet, base64, or for Bitcoin `transaction.psbt` with every input signed, as a PSBT (base64) or the signed transaction (hex). Sign it as returned: any change is refused.

```bash theme={null}
curl -s -X POST https://app.ravn.exchange/api/v1/submit-transaction \
  -H 'content-type: application/json' \
  -d '{ "quoteToken": "<from /execute>", "signedTransaction": "<base64>" }'
```

## Response

**txHash** `string`

The Solana signature once landed, or the Bitcoin txid once sent. Poll `/status` with the execution's `statusRef`, or with this `txHash` when there was none.

```json theme={null}
{ "data": { "txHash": "5igSig…" } }
```

Posting the same `signedTransaction` again is always safe: it lands once, and a retry returns the
same `txHash`.

## Errors

| Code | Fix |
| - | - |
| `400 INVALID_REQUEST` | Nothing was sent. The transaction isn't signed, was changed, or a smart-contract wallet rewrote it (sign with a standard wallet). Or `quoteToken` isn't the one from this `/execute` answer |
| `410 QUOTE_EXPIRED` | Nothing was sent: the 30 minutes to send a Bitcoin payment passed. Call `/execute` again and send only the new one |
| `422 ORDER_REJECTED` | Nothing was sent (expired blockhash, too little SOL, Jupiter refused, or the Bitcoin swap no longer awaits this payment). Call `/execute` again, or quote again if past `expiresAt` |
| `502 BUILD_FAILED` | It may already have been sent. Retry with the **same** `signedTransaction` until you get `200`, `410` or `422`. Don't sign a new one before then |


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