Validate address
POST validateAddress
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
- XLM
- IOST
- STEEM
- STX
- XRP
HTTP request
https://api.changelly.com/v2/#validateAddress
Request
- Request
- Payload
- cURL
Header parameters
Name | Type | Required | Description |
---|---|---|---|
X-Api-Key | string | true | Your API key (SHA256 from Public Key) |
X-Api-Signature | string | true | The query's serialized body signed by your private key according to the RSA-SHA256 method. |
Body parameters
Name | Type | Required | Description |
---|---|---|---|
jsonrpc | string | true | JSON-RPC version. |
id | string | true | Client's custom ID. |
method | string | true | API method name. |
params | object | true | Request parameters. |
params
object:
Name | Type | Required | Description |
---|---|---|---|
currency | string | true | Currency ticker (in lowercase). |
address | string | true | Wallet address. |
extraId | string | false | Extra ID. |
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "validateAddress",
"params": {
"currency": "eos",
"address": "<<eos address>>",
"extraId": "<<eos extraId>>"
}
}
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
- Example
- Success
- Errors
Sample response
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": {
"result": false,
"message": "Invalid address"
}
}
Response params
Name | Type | Description |
---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | Client's custom ID. |
result | object | Result. |
result
schema:
Name | Type | Description |
---|---|---|
result | boolean | Is true if the given address is valid. |
message | string | Error message which is returned only if the given address is invalid. |
Error schema
Name | Type | Description |
---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | Client's custom ID. |
error | object | Possible errors. |
»code | integer | Error code. |
»message | string | Error message. |
Error codes
Code | Message | Description |
---|---|---|
-32600 | Error: You reached requests limit {limit} rps | You have been sending more than 10 requests per second. |
-32602 | Parameter {param} is invalid | You've specified an invalid parameter. |
-32603 | Internal Error or Error | Most likely, the problem is on our side. Further investigation is required. |