Skip to main content
POST
/
api
/
trading
/
sales
/
partner
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/trading/sales/partner \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{
    "goldAmount": 1.0,
    "minimumUsdcAmount": 4800
  }'
{
  "success": true,
  "data": {
    "sellId": "uuid-sale-id",
    "goldAmount": 1.0,
    "quoteUsdcAmount": 5086.20,
    "minimumUsdcAmount": 4800,
    "quotedGoldPrice": 5086.2,
    "status": "pending_signature",
    "transaction": {
      "serializedTx": "base64-encoded-transaction",
      "signingInstructions": {
        "walletType": "PARTNER_AUTHORITY",
        "signers": ["ExecutiveAuthorityAddress"],
        "expiresAt": "2024-01-15T10:35:00.000Z"
      }
    },
    "createdAt": "2024-01-15T10:30:00.000Z"
  }
}

Overview

Creates a sell transaction for the partner to convert gold tokens from their reserves (PDA) back to USDC. Authorization Required: PARTNER_EXECUTIVE_AUTHORITY

Headers

x-api-key
string
required
Your API key for authentication

Request Body

goldAmount
number
required
Amount of gold to sell (in troy ounces)
minimumUsdcAmount
number
required
Minimum USDC to accept (slippage protection)
metadata
object
Optional transaction metadata

Response

success
boolean
Whether the request was successful
data
object

Notes

Transaction Type

This endpoint returns a Legacy Transaction which is compatible with all wallet libraries.

Fund Flow

  • Gold is deducted FROM the partner’s PDA (centralVaultAddress)
  • USDC is deposited TO the partner’s PDA
  • Requires gold to be available in the PDA

Signing

Only the executive authority wallet signs this transaction.
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/trading/sales/partner \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{
    "goldAmount": 1.0,
    "minimumUsdcAmount": 4800
  }'
{
  "success": true,
  "data": {
    "sellId": "uuid-sale-id",
    "goldAmount": 1.0,
    "quoteUsdcAmount": 5086.20,
    "minimumUsdcAmount": 4800,
    "quotedGoldPrice": 5086.2,
    "status": "pending_signature",
    "transaction": {
      "serializedTx": "base64-encoded-transaction",
      "signingInstructions": {
        "walletType": "PARTNER_AUTHORITY",
        "signers": ["ExecutiveAuthorityAddress"],
        "expiresAt": "2024-01-15T10:35:00.000Z"
      }
    },
    "createdAt": "2024-01-15T10:30:00.000Z"
  }
}