Skip to main content

Get countries list

Get the list of countries that support crypto purchases.

HTTP request​

get
/v1/available-countries

Request​

Header parameters​

Requires authentification.

Query parameters​

NameTypeRequiredDescription
providerCodestringfalseThe provider code. Possible values.
If the provider code is not specified, the endpoint will return the supported currencies for all providers.
supportedFlowstringfalseEnum: buy/sell.
If the flow is not specified, the endpoint will return result for both cases (On-Ramp buy and Off-Ramp sell).
Sample cURL
curl --location --request GET
'https://fiat-api.changelly.com/v1/available-countries'
--header 'X-Api-Key: {{apiKey}}'
--header 'X-Api-Signature: {{signature}}'

Response​

Response params​

NameTypeRequiredDescription
codestringtrueCountry ISO 3166-1 code (Alpha-2).
namestringtrueCountry name.
providersarray of objectstrueList of providers that support the country.
statesarray of objectsfalseIs returned if the code of the country is US.

provider object schema​

NameTypeRequiredDescription
providerCodestringtrueThe On-Ramp or Off-Ramp provider code. Possible values.
If the provider code is not specified, the endpoint will return the supported countries of all providers.
supportedFlowarray of stringstrueEnum: buy/sell.
If the flow is not specified, the endpoint will return result for both cases (On-Ramp buy and Off-Ramp sell).

state object schema​

NameTypeDescription
codestringState ISO 3166-2 code.
namestringState name.
Sample response
application/json
{
"code": "FR",
"name": "France",
"providers": [
{
"providerCode": "moonpay",
"supportedFlows": [
"buy",
"sell"
]
},
{
"providerCode": "banxa",
"supportedFlows": [
"buy"
]
},
{
"providerCode": "transak",
"supportedFlows": [
"buy"
]
}
]
}

Error response​

Error response parameters​

Check the error response schema.

Possible error types in the errorType item:

TypeDescription
validationValidation error.

The errorDetails item schema:

NameTypeRequiredDescription
causestringtrueError cause. For example, it can equal the missing request parameter for the validation error type.
valuestringtrueError value.

Error codes​

CodeMessage
400Bad request
401Unauthorized
404Not found
429Too many requests
500Internal server error
Bad Request
{
"errorType": "validation",
"errorMessage": "Validation error",
"errorDetails": [
{
"cause": "supportedFlow",
"value": "each value in supportedFlow must be one of the following values: buy, sell"
}
]
}