Skip to main content

Validate address

Use validateAddress to check if a given wallet address is valid or not for a given currency.

For some currencies, in addition to address, you can validate extraId.

extraId is never required for validating address. However, if you want to, you can validate extraId for the following currencies:

  • EOS
  • IOST
  • STEEM
  • STX
  • XLM
  • XRP

HTTP request

post
/v2/#validateAddress

Request

Header parameters

Requires authentification.

Body parameters

Requires JSON-RPC 2.0 protocol request body.

The params parameter schema:

NameTypeRequiredDescription
currencystringtrueCurrency ticker (in lowercase).
addressstringtrueWallet address.
extraIdstringfalseExtra ID.
Sample request payload
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "validateAddress",
"params": {
"currency": "eos",
"address": "<<eos address>>",
"extraId": "<<eos extraId>>"
}
}
Sample cURL
curl --location --request POST 'https://api.changelly.com/v2' \
--header 'X-Api-Key: {{apiKey}}' \
--header 'X-Api-Signature: {{sign}}' \
--data-raw '{
"id": "test",
"jsonrpc": "2.0",
"method": "validateAddress",
"params": {
"currency": "eos",
"address": "<<eos address>>",
"extraId": "<<eos extraId>>"
}
}'

Response

Response parameters

Requires JSON-RPC 2.0 protocol response body.

The result parameter schema:

NameTypeDescription
resultbooleanIs true if the given address is valid.
messagestringError message which is returned only if the given address is invalid.
Sample response
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": {
"result": false,
"message": "Invalid address"
}
}

Error response

Error response parameters

Check the error response schema.

Error codes

CodeMessageDescription
-32600Error: You reached requests limit {limit} rpsYou have been sending more than 10 requests per second.
-32602Parameter {param} is invalidYou've specified an invalid parameter.
-32603Internal Error or ErrorMost likely, the problem is on our side. Further investigation is required.