Requesting a Quote
POST https://api.orda.network/v1/offramp/quote
This guide explains how to request a crypto-to-fiat quote using the orda API. A quote request allows you to get pricing information for converting cryptocurrency to fiat currency before actually executing the transaction. This is typically the first step in processing an off-ramp transaction.
Prerequisites
Before you start, make sure you have:
-
A project Client ID and Client Secret. If you don't have credentials yet, you can register for them here. (Note: Link needs updating)
-
The details of the transaction you want to quote (e.g., source crypto, target fiat, amount).
Authentication
All API requests to orda require an HMAC signature using your Client ID and Client Secret. To authenticate your quote request:
-
Generate an
x-signature
header using your Client Secret and the request body. -
Include your
x-client-id
in the request headers. -
Set the
Content-Type
header toapplication/json
.
For detailed instructions on generating the signature, refer to our Authentication Guide. Remember to never share your Client Secret or include it directly in client-side code.
Required Headers
Header |
Description |
---|---|
|
Your project's client ID |
|
HMAC-SHA256 signature derived from your client secret |
|
|
What is a Crypto-to-Fiat Quote Request?
A crypto-to-fiat quote request allows you to get pricing information for converting cryptocurrency to fiat currency before actually executing the transaction. This is useful for:
-
Showing the user how much they'll receive in fiat before they commit.
-
Understanding the current exchange rates and fees involved.
-
Preparing the necessary transaction details for execution.
Requesting a Quote
To request a quote, you'll typically provide information such as:
-
The source blockchain ID (
fromChain)
.
-
The specific cryptocurrency token being converted (
fromToken
). -
The source wallet address (
fromAddress
). -
The amount of crypto to send (
fromAmount
). -
The ID of the recipient (
recipientId
).
Or, instead of providing a recipientId
, you can include the fiat settlement details (`fiatSettlementDetails`) and KYC/KYB information (`kybInformation`) in the request to create a new recipient upon quote execution. Refer to the Crypto-to-Fiat API reference for more information.
High-Level Use Case: This endpoint is particularly useful for platforms like marketplaces that need to pay out international vendors in their local fiat currency after receiving payment in cryptocurrency.
Important Considerations & Common Issues
-
Quote Expiration: Quotes are valid for a limited time (often less than a minute) due to fluctuating exchange rates. Ensure you execute the transaction promptly after receiving a quote, or request a fresh quote if there's a delay. Consider implementing an automatic refresh mechanism for your users.
-
Authentication Errors:
-
Double-check that your Client ID is correct and active.
-
Verify your signature calculation precisely matches the request body. Refer to the Authentication Guide.
-
Ensure the request body hasn't changed between signature calculation and sending the request.
-
-
Incorrect Input: Ensure you provide valid token addresses, currency codes, and correctly formatted amounts.
-
Recipient Information: Accurate recipient name and tax details are crucial for compliance and successful payouts.