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"
}
Trades
Submit Sell
Broadcasts the fully-signed sell transaction to Solana. Pure passthrough — no database write.
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 theTrade row asynchronously after on-chain confirmation.
Headers
string
required
A valid
PARTNER scope key.Path Parameters
string
required
Trade identifier (prefixed
trd_) returned by Quote Sell.Request Body
string
required
Base64-encoded, fully-signed Solana transaction (GRAIL’s partial sig + partner + user).
Response
string
Echo of the path parameter.
string
Solana transaction signature (base58).
Errors
| HTTP | error | When |
|---|---|---|
| 400 | invalid_request | Missing or non-string signed_tx |
| 400 | broadcast_failed | Solana 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"
}
