Fern Developer Docs
  • Overview
    • Fern overview
    • Earning revenue with Fern
    • Developer dashboard
    • Help & support
  • Coverage
    • Customer types
    • Restricted customer geographies
  • Fiat currency support
  • Cryptocurrency support
  • Guides
    • Core API concepts
    • Create and verify customers
      • Requirements for Individuals
      • Requirements for Businesses
      • Customer statuses
      • Country codes
    • Create Fern wallets
    • First-party onramps
    • First-party offramps
    • Webhooks
      • Events
      • Sample Payloads
      • Verification
      • Retries
  • API reference
    • Customers
    • Payment accounts
    • Quotes
    • Transactions
      • Additional details
  • Advanced
    • Slippage and price impact
    • Rate limits
Powered by GitBook
On this page
Export as PDF
  1. API reference

Quotes

Use this API to create and fetch quotes for transactions. Currently, onramp and offramp transaction types are supported and will be inferred from the source and destination.

Last updated 1 month ago

Create quote

post

Create a quote

Authorizations
Body

Get a proposed price for your specified currency route (price guaranteed for 5 mins)

customerIdstring · uuidRequired

A unique identifier for the customer initiating the transaction.

Example: 03b7030f-6da1-4d76-9352-cdebd82112c8
Responses
201
Response containing quote details including exchange rate, fees, and expiration
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
post
POST /quotes HTTP/1.1
Host: api.fernhq.com
Authorization: Bearer API Key
Content-Type: application/json
Accept: */*
Content-Length: 421

{
  "customerId": "03b7030f-6da1-4d76-9352-cdebd82112c8",
  "source": {
    "sourcePaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
    "sourceCurrency": "USD",
    "sourcePaymentMethod": "ACH",
    "sourceAmount": "100"
  },
  "destination": {
    "destinationPaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
    "destinationPaymentMethod": "ETHEREUM",
    "destinationCurrency": "USD"
  },
  "developerFee": {
    "developerFeeType": "USD",
    "developerFeeAmount": "5.45"
  }
}
{
  "quoteId": "quote_abc123",
  "expiresAt": "2025-03-20T12:24:49.717Z",
  "estimatedExchangeRate": "1.2",
  "destinationAmount": "100",
  "minGuaranteedDestinationAmount": "98",
  "fees": {
    "feeCurrency": "5.50",
    "fernFee": {
      "feeAmount": "5.45",
      "feeUSDAmount": "5.45"
    },
    "developerFee": {
      "feeAmount": "5.45",
      "feeUSDAmount": "5.45"
    }
  }
}