Get offers
List of selling offers from Off-Ramp providers.
HTTP request
get
/v1/sell/offers
Request
Header parameters
Requires authentification.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| providerCode | string | false | The Off-Ramp provider code. Possible values. |
| externalUserID | string | false | User ID provided by you. |
| currencyFrom | string | true | Ticker of the pay-in currency in uppercase. |
| currencyTo | string | true | Ticker of the payout currency in uppercase. |
| amountFrom | string | true | Amount of currency the user is going to pay. |
| country | string | true | Country ISO 3166-1 code (Alpha-2). |
| state | string | false | State ISO 3166-2 code. Is required if provided country is US. |
| ip | string | false | User's IP address. |
| paymentMethodCode | string | false | The payment method code. Possible values. |
Sample cURL
curl --location --request GET
'https://fiat-api.changelly.com/v1/sell/offers?currencyFrom=ETH¤cyTo=EUR&amountFrom=0.1&country=IT'
--header 'X-Api-Key: {{apiKey}}'
--header 'X-Api-Signature: {{signature}}'
Response
Response params
| Name | Type | Description |
|---|---|---|
| offers | array of objects | Array of offers. |
offers item schema
| Name | Type | Required | Description |
|---|---|---|---|
| providerCode | string | true | The Off-Ramp provider code. Possible values. |
| rate | string | true | The best rate of selling among all payment methods. The rate includes all the fees. |
| invertedRate | string | true | Inverted rate of selling. |
| fee | string | true | The lowest value of the total fee of selling among all payment methods. |
| amountFrom | string | true | Amount of currency the user is going to pay. |
| amountExpectedTo | string | true | The largest amount of funds among all payment methods that the user is expected to get after the selling. |
| paymentMethodOffer | array of objects | true | Selling details for each available payment type. |
paymentMethodOffer item schema
| Name | Type | Required | Description |
|---|---|---|---|
| method | string | true | The payment method code. Possible values. |
| methodName | string | true | The payment method name. Possible values. |
| amountExpectedTo | string | true | The amount of funds that the user is expected to get after the selling. |
| rate | string | true | Current rate of selling, which includes all the fees. |
| invertedRate | string | true | Inverted rate of selling. |
| fee | string | true | Total fee of selling. |
Sample response
application/json
[
{
"providerCode": "moonpay",
"rate": "99490.2",
"invertedRate": "0.000010051241227779218",
"fee": "360.85",
"amountFrom": "0.1",
"amountExpectedTo": "9949.02",
"paymentMethodOffer": [
{
"method": "pay_pal",
"methodName": "PayPal",
"amountExpectedTo": "9742.82",
"rate": "97428.2",
"invertedRate": "0.000010263968748267956",
"fee": "360.85"
},
{
"method": "revolut",
"methodName": "Revolut",
"amountExpectedTo": "10309.87",
"rate": "103098.7",
"invertedRate": "0.000009699443348946204",
"fee": "0"
},
{
"method": "card",
"methodName": "Visa / Mastercard",
"amountExpectedTo": "9639.73",
"rate": "96397.29999999999",
"invertedRate": "0.000010373734534058527",
"fee": "463.94"
},
{
"method": "sepa_bank_transfer",
"methodName": "SEPA",
"amountExpectedTo": "10000.57",
"rate": "100005.7",
"invertedRate": "0.000009999430032488148",
"fee": "103.1"
},
{
"method": "apple_pay",
"methodName": "Apple Pay",
"amountExpectedTo": "9639.73",
"rate": "96397.29999999999",
"invertedRate": "0.000010373734534058527",
"fee": "463.94"
},
{
"method": "google_pay",
"methodName": "Google Pay",
"amountExpectedTo": "9639.73",
"rate": "96397.29999999999",
"invertedRate": "0.000010373734534058527",
"fee": "463.94"
}
]
}
]
Error response
Error response parameters
Check the error response schema.
Possible error types in the errorType item:
| Type | Description |
|---|---|
| validation | Validation error. |
| timeout | Request to the provider was not completed in the allotted time. |
| unavailable | Request failed at the provider's end. |
| limits | Specified pay-in amount is less than the minimum or more than the maximum value for the fiat currency. |
| country | Specified country is not supported by the provider. |
| state | Offer requested for the United States, but the state parameter is not provided. |
| currency | Specified currency pair is not supported by the provider. |
| paymentMethod | Specified payment method is not supported by the provider. |
| invalidOffer | Off-Ramp provider returned an invalid offer. |
The errorDetails item schema:
| Name | Type | Required | Description |
|---|---|---|---|
| cause | string | true | Error cause. For example, it can equal min or max for the limits error type. |
| value | string | true | Error value. For example, it can equal the min or max supported value for the limits error type. |
Error codes
| Code | Message |
|---|---|
| 400 | BadRequest |
| 401 | Unauthorized |
| 429 | TooManyRequests |
| 500 | InternalServerError |
- 400
- 401
- 429
- 500
BadRequest
{
"errorType": "validation",
"errorMessage": "Validation error",
"errorDetails": [
{
"cause": "providerCode",
"value": "Incorrect provider code"
}
]
}
Unauthorized
{
"errorType": "unauthorized",
"errorMessage": "Unauthorized",
"errorDetails": null
}
TooManyRequests
{
"errorType": "tooManyRequests",
"errorMessage": "Too many requests",
"errorDetails": null
}
InternalServerError
{
"errorType": "internalServerError",
"errorMessage": "Internal Server Error",
"errorDetails": null
}