Skip to main content
POST
/
v1
/
sell
/
{trade_id}
/
submit
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>..."
  }'
{
  "trade_id": "trd_8b21d7f3-2a4c-4b5e-9d1f-3e8a7c6b5d4e",
  "tx_hash": "3xJk9Pq2n...base58"
}

Overview

Broadcasts the fully-signed sell transaction and returns the on-chain signature. Semantics are identical to Submit Buy — pure passthrough, no database write; the indexer writes the Trade row asynchronously after on-chain confirmation.

Headers

x-api-key
string
required
A valid PARTNER scope key.

Path Parameters

trade_id
string
required
Trade identifier (prefixed trd_) returned by Quote Sell.

Request Body

signed_tx
string
required
Base64-encoded, fully-signed Solana transaction (GRAIL’s partial sig + partner + user).

Response

trade_id
string
Echo of the path parameter.
tx_hash
string
Solana transaction signature (base58).

Errors

HTTPerrorWhen
400invalid_requestMissing or non-string signed_tx
400broadcast_failedSolana RPC rejected the transaction — message has reason
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>..."
  }'
{
  "trade_id": "trd_8b21d7f3-2a4c-4b5e-9d1f-3e8a7c6b5d4e",
  "tx_hash": "3xJk9Pq2n...base58"
}