Icons

Most resources returned by the API expose an iconUrl field — coins, exchanges, markets, fiat currencies, categories, indices and commodities all include one. The value is an SVG hosted on our CDN, for example:

https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.svg

SVG renders crisply at any resolution and is the right choice for most web clients. For native mobile apps, embedded views, email templates, and rendering pipelines that can't reliably parse SVG, request a raster format instead — Coinranking's CDN converts on demand.

Convert format

Replace the .svg extension with .png or .webp. No other change is needed and the response is cached at the edge.

URLContent type
https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.svgimage/svg+xml
https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.pngimage/png
https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.webpimage/webp

Use WebP when your target supports it (modern browsers, recent iOS/Android) — it's typically 30-60% smaller than PNG for the same icon. Fall back to PNG when broad compatibility matters (email, legacy clients, image-processing tooling).

Request a size

Append ?size=WIDTHxHEIGHT to the PNG or WebP URL to get the icon rendered at exact pixel dimensions:

https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.png?size=28x28
https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.webp?size=28x28

Common sizes for retina-aware layouts:

html
<img src="https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.png?size=28x28" srcset=" https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.png?size=28x28 1x, https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.png?size=56x56 2x, https://cdn.coinranking.com/bOabBYkcX/bitcoin_btc.png?size=84x84 3x " alt="Bitcoin" />

Only request the dimensions you actually display — smaller sizes are cheaper to generate and quicker to load.

When to use which

  • SVG — web pages and any client that renders SVG natively. Single asset, scales perfectly, smallest payload at small sizes.
  • PNG — native iOS/Android, email, server-side rendering, any tooling that can't reliably parse SVG. Combine with ?size= and srcset for sharp icons at 2x/3x density.
  • WebP — best size/quality trade-off when the client supports it. Same ?size= parameter applies.

The conversion endpoints work for every resource's iconUrl, not just coins — the same rules apply to exchanges, markets, categories, fiat currencies, indices and commodities.