Getting started with the Prices API
Learn how to use the Prices API to retrieve order quotes.
Overview
The Get Prices endpoint allows you to retrieve a quote for a customer order based on fiat, cryptocurrency and payment method combinations. Each payment method will have different prices due to different payment gateway fees that apply.
Before you begin
Ensure that you have completed the following prerequisites:
- You have set up Authentication
- You are able to call the Payment Methods which provides you the list of Payment Methods that are available for a particular fiat and cryptocurrency combination, as well as transaction minimum and maximum values. You may cache this data, which we recommend you re-cache hourly.
Example implementation approach
Using a combination of the Get Payment Methods and the Get Prices endpoints, you will be able to build an order form that takes the user's inputs and dynamically calculates a quote.
Steps
- Call the Get Payment Methods endpoint containing the
source
andtarget
parameters. - Based on the response, display on your UI, the available payment methods, payment method logos and minimum & maximum transaction limits for the applicable payment method.
- Call the Get Prices endpoint containing the
source
andtarget
and optionally, thepayment_method_id
parameters. - Based on the response, display the
fiat_amount
orcoin_amount
, associated with the correct payment method. - Optional. Based on the response, display the payment gateway fee. This step is optional as the amount is already included in the quote.
{
"data": {
"spot_price": "3130.96",
"prices": [
{
"payment_method_id": 6030,
"type": "FIAT_TO_CRYPTO",
"spot_price_fee": "62.31",
"spot_price_including_fee": "3193.27",
"coin_amount": "0.93947700",
"coin_code": "ETH",
"fiat_amount": "3000.00",
"fiat_code": "USD",
"fee_amount": "58.54"
}
]
}
}
Updated about 2 years ago