Skip to content

Token logo image

View as Markdown
GET
/v2/logo/{hash}/{version}/{file}
curl --request GET \
--url https://api.chainmetric.io/v2/logo/fa61792e6c9284787a342ad3196fa5b11970f1ed663bfeaf736c94003c26b2cd/v1/256.webp

Returns a token logo as a WebP image. Use the URL found in the logo field of other answers; do not build it yourself. No key is needed. The answer is cached as immutable for one year.

hash
required
string
/^[0-9a-fA-F]{64}$/

64 hex characters.

Example

fa61792e6c9284787a342ad3196fa5b11970f1ed663bfeaf736c94003c26b2cd
version
required
string
/^v[0-9]{1,3}$/

v followed by 1 to 3 digits.

Example

v1
file
required
string
/^[0-9]{1,4}\.webp$/

The image edge in pixels followed by .webp.

Example

256.webp

The image.

Media typeimage/webp
string

The request is malformed, for example a bad address, an unknown chain or an out-of-range parameter. Do not retry unchanged.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

ExampleunknownChain
{
"error": "blockchain: unknown chain: \"ethereum\"",
"message": "blockchain: unknown chain: \"ethereum\"",
"statusCode": 400
}

The chain is not served, or the token or resource is not known.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Example generated

{
"error": "example",
"message": "example",
"statusCode": 1
}

The image store failed. Retry later.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Example generated

{
"error": "example",
"message": "example",
"statusCode": 1
}