Validate wallet address
Check if the given wallet or refund address and (optional) extra ID are valid for the given currency.
HTTP request
post
/v1/validate-address
Request
Header parameters
Requires authentification.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| currency | string | true | Cryptocurrency ticker (in uppercase). |
| walletAddress | string | true | Recipient wallet address. |
| walletExtraId | string | false | Property required for wallet addresses of currencies that use an additional ID for transaction processing (XRP, XLM, EOS, BNB). |
Sample payload
application/json
{
"currency": "XRP",
"walletAddress": "rwpMvfxood******************WDwQyHUW",
"extraId": "1234hg"
}
Sample cURL
curl --location --request POST 'https://fiat-api.changelly.com/v1/validate-address'
--header 'X-Api-Key: {{apiKey}}'
--header 'X-Api-Signature: {{signature}}'
--data-raw '{
"currency": "XRP",
"walletAddress": "rwpMvfxood******************WDwQyHUW",
"walletExtraId": "1234hg"
}'
Response
Response params
| Name | Type | Required | Description |
|---|---|---|---|
| result | boolean | true | false if the wallet address or extra ID is incorrect. |
| cause | string | true | Enum: walletAddress walletExtraId. Specifies whether the wallet address or extra ID is incorrect. If result is true, cause is null. |
Sample response
application/json
{
"result": false,
"cause": "walletExtraId"
}
Error response
Error response parameters
Check the error response schema.
Possible error types in the errorType item:
| Type | Description |
|---|---|
| validation | Validation error. |
The errorDetails item schema:
| Name | Type | Required | Description |
|---|---|---|---|
| cause | string | true | Error cause. For example, it can equal the missing request parameter for the validation error type. |
| value | string | true | Error value. |
Error codes
| Code | Message |
|---|---|
| 400 | BadRequest |
| 401 | Unauthorized |
| 429 | TooManyRequests |
| 500 | InternalServerError |
- 400
- 401
- 429
- 500
BadRequest
{
"errorType": "validation",
"errorMessage": "Validation error",
"errorDetails": [
{
"cause": "currency",
"value": "Incorrect currency"
}
]
}
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
}