Validate wallet address
POST /v1/validate-address
Check if the given wallet or refund address and (optional) extra ID are valid for the given currency.
HTTP request
https://fiat-api.changelly.com/v1/validate-address
Request
- Request
- Payload
- 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. |
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). |
application/json
{
"currency": "XRP",
"walletAddress": "rwpMvfxoodXggJ1g4qv6MWAPQqWDwQyHUW",
"extraId": "1234hg"
}
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": "rwpMvfxoodXggJ1g4qv6MWAPQqWDwQyHUW",
"walletExtraId": "1234hg"
}'
Response
Sample response
application/json
{
"result": false,
"cause": "walletExtraId"
}
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 . |
Error schema
Name | Type | Required | Description |
---|---|---|---|
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. |
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
}