Skip to main content

Pre-requisites

  • Active Conduit account with API access
  • API credentials (API Key and Secret)
  • Familiarity with the following core concepts:
In this guide, you’ll learn how to create quotes with custom pricing overrides. This allows you to apply different pricing strategies for individual quotes, giving you flexibility to customize pricing on a per-quote basis.

Understanding Pricing Overrides

When creating a quote, you can optionally specify pricing overrides to customize how pricing is calculated. You can specify a pricingModel and spreadBps directly in the quote request to apply a custom spread.

Creating a Quote with Custom Spread

You can specify a custom spread for a quote by including the pricing object in your request with pricingModel: spread_on_rate and a spreadBps value.

Request Example

curl --request POST \
  --url https://api.conduit.financial/quotes \
  --header "X-API-Key: your_api_key" \
  --header "X-API-Secret: your_api_secret" \
  --header "Content-Type: application/json" \
  --header "Api-Version: 2024-12-01" \
  --data '{
    "source": {
      "asset": "USD",
      "amount": "1000.00"
    },
    "target": {
      "asset": "USDT",
      "network": "tron"
    },
    "pricing": {
      "overrides": {
        "customer": {
          "pricingModel": "spread_on_rate",
          "spreadBps": 50
        }
      }
    }
  }'

Response Example

{
  "id": "quote_34LGFxjgPBqCwLXBX1AD1D8SXvv",
  "source": {
    "amount": "1000.00",
    "asset": "USD"
  },
  "target": {
    "amount": "995.00",
    "asset": "USDT",
    "network": "tron"
  },
  "pricing": {
    "client": {
      "effectiveRate": "1.0000",
      "spreadBps": 0,
      "pricingModel": "take_rate",
      "calculatedAmount": {
        "amount": "1000.00",
        "asset": "USD"
      }
    },
    "customer": {
      "effectiveRate": "0.9950",
      "spreadBps": 50,
      "pricingModel": "spread_on_rate",
      "calculatedAmount": {
        "amount": "995.00",
        "asset": "USDT",
        "network": "tron"
      },
      "calculatedRevenue": {
        "amount": "5.00",
        "asset": "USDC"
      }
    }
  },
  "createdAt": "2024-10-27T00:00:00.000Z",
  "expiresAt": "2024-10-27T00:03:00.000Z"
}
The spreadBps value is in basis points, where 1 basis point equals 0.01%. For example, spreadBps: 50 means a 0.5% spread.

Understanding the Response

The quote response includes detailed pricing information:
  • Client Pricing: Shows the base pricing structure at your client level
  • Customer Pricing: Shows the pricing applied to the customer, including:
    • effectiveRate: The exchange rate after applying the spread
    • spreadBps: The spread you specified (50 basis points = 0.5%)
    • calculatedAmount: The final amount the customer will receive
    • calculatedRevenue: Your revenue from this transaction (in USDC)

Target-Based Quotes with Pricing

You can also apply pricing overrides to target-based quotes (where you specify the target amount instead of the source amount):

Request Example

curl --request POST \
  --url https://api.conduit.financial/quotes \
  --header "X-API-Key: your_api_key" \
  --header "X-API-Secret: your_api_secret" \
  --header "Content-Type: application/json" \
  --header "Api-Version: 2024-12-01" \
  --data '{
    "source": {
      "asset": "USDT",
      "network": "tron"
    },
    "target": {
      "asset": "USD",
      "amount": "1000.00"
    },
    "pricing": {
      "overrides": {
        "customer": {
          "pricingModel": "spread_on_rate",
          "spreadBps": 25
        }
      }
    }
  }'

Key Points

  • Pricing overrides are optional: If you don’t specify pricing overrides, only client-level pricing will be applied
  • Spread limits: The spreadBps value cannot exceed 10,000 (100%)
  • Revenue calculation: Revenue is calculated based on the difference between client and customer pricing
  • Pricing transparency: The response includes all pricing details for complete transparency

What’s next?

Support

Reach out to our support team to get help and share your feedback.