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

# Submit Sell

> Broadcasts the fully-signed sell transaction to Solana. Pure passthrough — no database write.

## Overview

Broadcasts the fully-signed sell transaction and returns the on-chain signature. Semantics are identical to [Submit Buy](/api-reference/trades/submit-buy) — pure passthrough, no database write; the indexer writes the `Trade` row asynchronously after on-chain confirmation.

## Headers

<ParamField header="x-api-key" type="string" required>
  A valid `PARTNER` scope key.
</ParamField>

## Path Parameters

<ParamField path="trade_id" type="string" required>
  Trade identifier (prefixed `trd_`) returned by [Quote Sell](/api-reference/trades/quote-sell).
</ParamField>

## Request Body

<ParamField body="signed_tx" type="string" required>
  Base64-encoded, fully-signed Solana transaction (GRAIL's partial sig + partner + user).
</ParamField>

## Response

<ResponseField name="trade_id" type="string">
  Echo of the path parameter.
</ResponseField>

<ResponseField name="tx_hash" type="string">
  Solana transaction signature (base58).
</ResponseField>

## Errors

| HTTP | `error`            | When                                                     |
| ---- | ------------------ | -------------------------------------------------------- |
| 400  | `invalid_request`  | Missing or non-string `signed_tx`                        |
| 400  | `broadcast_failed` | Solana RPC rejected the transaction — message has reason |

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST \
    https://grail-stack-dev.onrender.com/v1/sell/trd_8b21d7f3-2a4c-4b5e-9d1f-3e8a7c6b5d4e/submit \
    -H "x-api-key: grail_partner_<hex>" \
    -H "Content-Type: application/json" \
    -d '{
      "signed_tx": "AQAAAAABAAEC...<base64>..."
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "trade_id": "trd_8b21d7f3-2a4c-4b5e-9d1f-3e8a7c6b5d4e",
    "tx_hash": "3xJk9Pq2n...base58"
  }
  ```
</ResponseExample>
