POST
https://api.stableyard.fi
/
sdk
/
v1
/
quote
curl -X POST https://api.stableyard.fi/sdk/v1/quote \
  -H "x-sdk-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user_abc123",
    "partnerId": "your_partner_id",
    "amount": "100.00",
    "destinationPaymentAddress": "merchant@stableyard"
  }'
{
  "success": true,
  "data": {
    "quoteData": {
      "inputAmount": "100.00",
      "outputAmount": "99.50",
      "outputAmountRaw": "99500000",
      "fee": "0.50",
      "feePercent": "0.5",
      "exchangeRate": "1.0000",
      "expiresAt": "2024-01-15T10:35:00Z",
      "payload": {
        "quoteId": "quote_xyz789",
        "nonce": "123456",
        "deadline": 1705315200
      }
    }
  },
  "requestId": "req_xyz789"
}
Generate a payment quote that locks in exchange rates and prepares settlement.

Authentication

x-sdk-key
string
required
Your API authentication key

Body Parameters

userId
string
required
Payer’s user ID
partnerId
string
required
Your partner ID
amount
string
required
Payment amount (e.g., “100.00”)
destinationUserId
string
Recipient’s user ID. One of destinationUserId, destinationPaymentAddress, or destinationWalletAddress required.
destinationPaymentAddress
string
Recipient’s payment address (e.g., merchant@stableyard)
destinationWalletAddress
string
Recipient’s wallet address
destinationChainID
number
Target chain ID for settlement
destinationToken
string
Target token symbol (e.g., “USDC”)

Response

success
boolean
Indicates if the request was successful
data
object
Quote data
curl -X POST https://api.stableyard.fi/sdk/v1/quote \
  -H "x-sdk-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user_abc123",
    "partnerId": "your_partner_id",
    "amount": "100.00",
    "destinationPaymentAddress": "merchant@stableyard"
  }'
{
  "success": true,
  "data": {
    "quoteData": {
      "inputAmount": "100.00",
      "outputAmount": "99.50",
      "outputAmountRaw": "99500000",
      "fee": "0.50",
      "feePercent": "0.5",
      "exchangeRate": "1.0000",
      "expiresAt": "2024-01-15T10:35:00Z",
      "payload": {
        "quoteId": "quote_xyz789",
        "nonce": "123456",
        "deadline": 1705315200
      }
    }
  },
  "requestId": "req_xyz789"
}
Quotes expire after a few minutes. Always check expiresAt before settling.