Skip to main content

Get offers

List of purchase offers from On-Ramp providers.

HTTP request

get
/v1/offers

Request

Header parameters

Requires authentification.

Query parameters

NameTypeRequiredDescription
providerCodestringfalseThe On-Ramp provider code. Possible values.
externalUserIDstringfalseUser ID provided by you.
currencyFromstringtrueTicker of the pay-in currency in uppercase.
currencyTostringtrueTicker of the payout currency in uppercase.
amountFromstringtrueAmount of currency the user is going to pay.
countrystringtrueCountry ISO 3166-1 code (Alpha-2).
statestringfalseState ISO 3166-2 code. Is required if provided country is US.
ipstringfalseUser's IP address.
Sample cURL
curl --location --request GET
'https://fiat-api.changelly.com/v1/offers?externalUserId=122hd&currencyFrom=EUR&currencyTo=ETH&amountFrom=150&country=FR'
--header 'X-Api-Key: {{apiKey}}'
--header 'X-Api-Signature: {{signature}}'

Response

Response params

NameTypeDescription
offersarray of objectsArray of offers.

offers item schema

NameTypeRequiredDescription
providerCodestringtrueThe On-Ramp provider code. Possible values.
offerIdstringtrueOffer ID provided by Fiat API.
ratestringtrueThe best rate of purchase among all payment methods. The rate includes all the fees.
invertedRatestringtrueInverted rate of purchase.
feestringtrueThe lowest value of the total fee of purchase among all payment methods.
amountFromstringtrueAmount of currency the user is going to pay.
amountExpectedTostringtrueThe largest amount of funds among all payment methods that the user is expected to get after the purchase.
paymentMethodOfferarray of objectstruePurchase details for each available payment type.

paymentMethodOffer item schema

NameTypeRequiredDescription
offerIdstringtrueOffer ID provided by Fiat API.
amountExpectedTostringtrueThe amount of funds that the user is expected to get after the purchase.
methodstringtrueThe payment method code. Possible values.
methodNamestringtrueThe payment method name. Possible values.
ratestringtrueCurrent rate of purchase, which includes all the fees.
invertedRatestringtrueInverted rate of purchase.
feestringtrueTotal fee of purchase.
Sample response
application/json
[
{
"providerCode": "moonpay",
"offerId": "e38e0d37-8a70-4d20-b4e0-14aca4a3de4b",
"rate": "0.00000753333333333333",
"invertedRate": "132743.36283185846581564727",
"fee": "5.32",
"amountFrom": "150",
"amountExpectedTo": "0.00113",
"paymentMethodOffer": [
{
"offerId": "e38e0d37-8a70-4d20-b4e0-14aca4a3de4b",
"amountExpectedTo": "0.00113",
"method": "revolut",
"methodName": "Revolut",
"rate": "0.00000753333333333333",
"invertedRate": "132743.36283185846581564727",
"fee": "5.32"
},
{
"offerId": "fa4a96a8-b95a-4880-8a49-b5faa053792c",
"amountExpectedTo": "0.00105",
"method": "card",
"methodName": "Visa / Mastercard",
"rate": "0.000007",
"invertedRate": "142857.14285714285714285714",
"fee": "9.09"
}
]
},
{
"providerCode": "banxa",
"offerId": "5cf80399-c5a8-4154-88de-218c8b3437da",
"rate": "0.0000075532",
"invertedRate": "132394.21702060054016840544",
"fee": "3.15",
"amountFrom": "150",
"amountExpectedTo": "0.00113298",
"paymentMethodOffer": [
{
"offerId": "5cf80399-c5a8-4154-88de-218c8b3437da",
"amountExpectedTo": "0.00113298",
"method": "apple_pay",
"methodName": "Apple Pay",
"rate": "0.0000075532",
"invertedRate": "132394.21702060054016840544",
"fee": "3.15"
}
]
}
]

Error response

Error response parameters

Check the error response schema.

Possible error types in the errorType item:

TypeDescription
validationValidation error.
timeoutRequest to the provider was not completed in the allotted time.
unavailableRequest failed at the provider's end.
limitsSpecified pay-in amount is less than the minimum or more than the maximum value for the fiat currency.
countrySpecified country is not supported by the provider.
stateOffer requested for the United States, but the state parameter is not provided.
currencySpecified currency pair is not supported by the provider.
paymentMethodSpecified payment method is not supported by the provider.
invalidOfferOn-Ramp provider returned an invalid offer.

The errorDetails item schema:

NameTypeRequiredDescription
causestringtrueError cause. For example, it can equal min or max for the limits error type.
valuestringtrueError value. For example, it can equal the min or max supported value for the limits error type.

Error codes

CodeMessage
400BadRequest
401Unauthorized
429TooManyRequests
500InternalServerError
BadRequest
{
"errorType": "validation",
"errorMessage": "Validation error",
"errorDetails": [
{
"cause": "providerCode",
"value": "Incorrect provider code"
}
]
}