Skip to main content
POST
/
api
/
trading
/
withdrawals
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/trading/withdrawals \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{
    "amount": 100,
    "tokenType": "USDC"
  }'
{
  "success": true,
  "data": {
    "withdrawalId": "uuid-withdrawal-id",
    "amount": 100,
    "tokenType": "USDC",
    "status": "pending_signature",
    "transaction": {
      "serializedTx": "base64-encoded-transaction",
      "signingInstructions": {
        "walletType": "WITHDRAWAL_AUTHORITY",
        "signers": ["WithdrawalAuthorityAddress"],
        "expiresAt": "2024-01-15T10:35:00.000Z"
      }
    },
    "createdAt": "2024-01-15T10:30:00.000Z"
  }
}

Overview

Creates a withdrawal transaction to move funds from the partner’s PDA (centralVaultAddress) to the partner’s withdrawal authority wallet. The destination is automatically determined from the authenticated partner’s configured withdrawalAuthorityAddress. Authorization Required: PARTNER_WITHDRAWAL_AUTHORITY

Headers

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

Request Body

amount
number
required
Amount to withdraw
tokenType
string
required
Type of token to withdraw: USDC or GOLD
metadata
object
Optional metadata for the transaction

Response

success
boolean
Whether the request was successful
data
object
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/trading/withdrawals \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{
    "amount": 100,
    "tokenType": "USDC"
  }'
{
  "success": true,
  "data": {
    "withdrawalId": "uuid-withdrawal-id",
    "amount": 100,
    "tokenType": "USDC",
    "status": "pending_signature",
    "transaction": {
      "serializedTx": "base64-encoded-transaction",
      "signingInstructions": {
        "walletType": "WITHDRAWAL_AUTHORITY",
        "signers": ["WithdrawalAuthorityAddress"],
        "expiresAt": "2024-01-15T10:35:00.000Z"
      }
    },
    "createdAt": "2024-01-15T10:30:00.000Z"
  }
}

Notes

Transaction Type

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

Signing

Only the withdrawal authority wallet signs this transaction.