Search suggestions are a quick and easy way to find data on coinranking. The endpoint only accepts one parameter; a query. With this query you can find currencies (including fiat), exchanges and markets, by their symbol or name. The response always returns a set of the most prominent coins, exchanges and markets matching your query.
GET /search-suggestions
Name | Type | Description |
---|---|---|
query (optional) | String |
Value to search on |
Example: cURL
curl https://api.coinranking.com/v2/search-suggestions?query=bitco \
-H 'x-access-token: your-api-key' \
-G
Example: NodeJs
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.coinranking.com/v2/search-suggestions?query=bitco',
headers: {
'x-access-token': 'your-api-key'
};
}
request(options, (error, response) => {
if (error) throw new Error(error);
console.log(response.body);
; })
Example: PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.coinranking.com/v2/search-suggestions?query=bitco",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-access-token: your-api-key"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
bash
- query
# In this example coinranking is searched for coins, exchanges and markets that start with
# 'bitco'
curl https://api.coinranking.com/v2/search-suggestions?query=bitco \
-H 'x-access-token: your-api-key' \
-G
Name | Type | Description |
---|---|---|
data.coins | Object[] |
List of coins matching the search pattern |
data.coins.uuid | String |
UUID of the coin |
data.coins.iconUrl | String |
Location of the icon |
data.coins.name | String |
Name of the coin |
data.coins.symbol | String |
Currency symbol |
data.exchanges | Object[] |
List of exchanges matching the search pattern |
data.exchanges.uuid | String |
UUID of the exchange |
data.exchanges.iconUrl | String |
Location of the icon |
data.exchanges.name | String |
Name of the exchange |
data.markets | Object[] |
List of markets matching the search pattern |
data.markets.uuid | String |
UUID of the market |
data.markets.baseSymbol | String |
The base symbol of this market |
data.markets.quoteSymbol | String |
The quote symbol of this market |
data.markets.baseUuid | String |
The UUID of the base currency |
data.markets.quoteUuid | String |
The UUID of the quote currency |
data.markets.exchangeIconUrl | String |
Location of the icon of the exchange this market belongs to |
data.markets.exchangeName | String |
Name of the exchange |
data.markets.exchangeUuid | String |
UUID of the exchange |
Response:
HTTP/1.1 200 OK
{
"status": "success",
"data": {
"coins": [
{
"uuid": "Qwsogvtv82FCd",
"iconUrl": "https://cdn.coinranking.com/gNsKAuE-W/bitcoin_btc.svg",
"name": "Bitcoin",
"symbol": "BTC"
},
{
"uuid": "ZlZpzOJo43mIo",
"iconUrl": "https://cdn.coinranking.com/By8ziihX7/bch.svg",
"name": "Bitcoin Cash",
"symbol": "BCH"
}
],
"exchanges": [
{
"uuid": "YY5LBnZ-G",
"iconUrl": "https://cdn.coinranking.com/tG3ps5jPI/bitforex.svg",
"name": "Bitforex"
},
{
"uuid": "C2gDcXEHIFD",
"iconUrl": "https://cdn.coinranking.com/lQYXlA0LJ/hotbit.svg",
"name": "HOTBIT"
}
],
"markets": [
{
"uuid": "MP77r-vKf4",
"baseSymbol": "BTC",
"quoteSymbol": "USDT",
"baseUuid": "Qwsogvtv82FCd",
"quoteUuid": "HIVsRcGKkPFtW",
"exchangeIconUrl": "https://cdn.coinranking.com/mDTK5qrmq/binance.svg",
"exchangeName": "Binance",
"exchangeUuid": "-zdvbieRdZ"
},
{
"uuid": "6NVfmwRwJEp",
"baseSymbol": "BTC",
"quoteSymbol": "USDT",
"baseUuid": "Qwsogvtv82FCd",
"quoteUuid": "HIVsRcGKkPFtW",
"exchangeIconUrl": "https://cdn.coinranking.com/tBA4j321g/Okex.svg",
"exchangeName": "OKEx",
"exchangeUuid": "hUlMcwWZp_"
}
]
}
}