Get offers
GET /v1/sell/offers
List of selling offers from Off-Ramp providers.
HTTP request
https://fiat-api.changelly.com/v1/sell/offers
Request
- Request
- cURL
Header parameters
Name | Type | Required | Description |
---|---|---|---|
X-Api-Key | string | true | Your public API key. |
X-Api-Signature | string | true | The query's serialized body signed by your private key according to the RSA-SHA256 method. |
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. |
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
Sample response
application/json
[
{
"providerCode": "moonpay",
"rate": "2729.1337",
"invertedRate": "0.0003664166398297013",
"fee": "13.14",
"amountFrom": "0.1",
"amountExpectedTo": "272.91337",
"paymentMethodOffers": [
{
"amountExpectedTo": "272.91337",
"method": "card",
"methodName": "Visa / Mastercard",
"rate": "2729.1337",
"invertedRate": "0.0003664166398297013",
"fee": "13.14"
},
{
"amountExpectedTo": "272.31337",
"method": "pix",
"methodName": "PIX",
"rate": "2723.1337",
"invertedRate": "0.0003672239816943252",
"fee": "4.99"
},
{
"amountExpectedTo": "272.31337",
"method": "yellow_card_bank_transfer",
"methodName": "Yellow Card",
"rate": "2723.1337",
"invertedRate": "0.0003672239816943252",
"fee": "4.99"
},
{
"amountExpectedTo": "272.31337",
"method": "apple_pay",
"methodName": "Apple Pay / Google Pay",
"rate": "2723.1337",
"invertedRate": "0.0003672239816943252",
"fee": "4.99"
}
]
}
]
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. |
paymentMethodOffers | array of objects | true | Selling details for each available payment type. |
paymentMethodOffers
item schema
Name | Type | Required | Description |
---|---|---|---|
amountExpectedTo | string | true | The amount of funds that the user is expected to get after the selling. |
method | string | true | The payment method code. Possible values. |
methodName | string | true | The payment method name. Possible values. |
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. |
Error schema
Name | Type | Required | Description |
---|---|---|---|
providerCode | string | true | The Off-Ramp provider code. Possible values. |
errorType | string | true | Error type. |
errorMessage | string | true | Error message. |
errorDetails | array of objects | true | If the error contains no details, errorDetails equals null . |
Possible error types:
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. |
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
}