coinsIdGet
Get current data (name, price, market, ... including exchange tickers) for a coin
Get current data (name, price, market, ... including exchange tickers) for a coin.<br><br> **IMPORTANT**: Ticker object is limited to 100 items, to get more tickers, use `/coins/{id}/tickers` Ticker `is_stale` is true when ticker that has not been updated/unchanged from the exchange for a while. Ticker `is_anomaly` is true if ticker's price is outliered by our system. You are responsible for managing how you want to display these information (e.g. footnote, different background, change opacity, hide)
/coins/{id}
Usage and SDK Samples
curl -X GET "https://api.apieco.ir/coingecko/api/v3/coins/{id}?localization=&tickers=&market_data=&community_data=&developer_data=&sparkline="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CoinsApi;
import java.io.File;
import java.util.*;
public class CoinsApiExample {
public static void main(String[] args) {
CoinsApi apiInstance = new CoinsApi();
String id = id_example; // String | pass the coin id (can be obtained from /coins) eg. bitcoin
String localization = localization_example; // String | Include all localized languages in response (true/false) [default: true]
Boolean tickers = true; // Boolean | Include tickers data (true/false) [default: true]
Boolean marketData = true; // Boolean | Include market_data (true/false) [default: true]
Boolean communityData = true; // Boolean | Include community_data data (true/false) [default: true]
Boolean developerData = true; // Boolean | Include developer_data data (true/false) [default: true]
Boolean sparkline = true; // Boolean | Include sparkline 7 days data (eg. true, false) [default: false]
try {
apiInstance.coinsIdGet(id, localization, tickers, marketData, communityData, developerData, sparkline);
} catch (ApiException e) {
System.err.println("Exception when calling CoinsApi#coinsIdGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CoinsApi;
public class CoinsApiExample {
public static void main(String[] args) {
CoinsApi apiInstance = new CoinsApi();
String id = id_example; // String | pass the coin id (can be obtained from /coins) eg. bitcoin
String localization = localization_example; // String | Include all localized languages in response (true/false) [default: true]
Boolean tickers = true; // Boolean | Include tickers data (true/false) [default: true]
Boolean marketData = true; // Boolean | Include market_data (true/false) [default: true]
Boolean communityData = true; // Boolean | Include community_data data (true/false) [default: true]
Boolean developerData = true; // Boolean | Include developer_data data (true/false) [default: true]
Boolean sparkline = true; // Boolean | Include sparkline 7 days data (eg. true, false) [default: false]
try {
apiInstance.coinsIdGet(id, localization, tickers, marketData, communityData, developerData, sparkline);
} catch (ApiException e) {
System.err.println("Exception when calling CoinsApi#coinsIdGet");
e.printStackTrace();
}
}
}
String *id = id_example; // pass the coin id (can be obtained from /coins) eg. bitcoin
String *localization = localization_example; // Include all localized languages in response (true/false) [default: true] (optional)
Boolean *tickers = true; // Include tickers data (true/false) [default: true] (optional)
Boolean *marketData = true; // Include market_data (true/false) [default: true] (optional)
Boolean *communityData = true; // Include community_data data (true/false) [default: true] (optional)
Boolean *developerData = true; // Include developer_data data (true/false) [default: true] (optional)
Boolean *sparkline = true; // Include sparkline 7 days data (eg. true, false) [default: false] (optional)
CoinsApi *apiInstance = [[CoinsApi alloc] init];
// Get current data (name, price, market, ... including exchange tickers) for a coin
[apiInstance coinsIdGetWith:id
localization:localization
tickers:tickers
marketData:marketData
communityData:communityData
developerData:developerData
sparkline:sparkline
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CoinGeckoApiV3 = require('coin_gecko_api_v3');
var api = new CoinGeckoApiV3.CoinsApi()
var id = id_example; // {String} pass the coin id (can be obtained from /coins) eg. bitcoin
var opts = {
'localization': localization_example, // {String} Include all localized languages in response (true/false) [default: true]
'tickers': true, // {Boolean} Include tickers data (true/false) [default: true]
'marketData': true, // {Boolean} Include market_data (true/false) [default: true]
'communityData': true, // {Boolean} Include community_data data (true/false) [default: true]
'developerData': true, // {Boolean} Include developer_data data (true/false) [default: true]
'sparkline': true // {Boolean} Include sparkline 7 days data (eg. true, false) [default: false]
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.coinsIdGet(id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class coinsIdGetExample
{
public void main()
{
var apiInstance = new CoinsApi();
var id = id_example; // String | pass the coin id (can be obtained from /coins) eg. bitcoin
var localization = localization_example; // String | Include all localized languages in response (true/false) [default: true] (optional)
var tickers = true; // Boolean | Include tickers data (true/false) [default: true] (optional)
var marketData = true; // Boolean | Include market_data (true/false) [default: true] (optional)
var communityData = true; // Boolean | Include community_data data (true/false) [default: true] (optional)
var developerData = true; // Boolean | Include developer_data data (true/false) [default: true] (optional)
var sparkline = true; // Boolean | Include sparkline 7 days data (eg. true, false) [default: false] (optional)
try
{
// Get current data (name, price, market, ... including exchange tickers) for a coin
apiInstance.coinsIdGet(id, localization, tickers, marketData, communityData, developerData, sparkline);
}
catch (Exception e)
{
Debug.Print("Exception when calling CoinsApi.coinsIdGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\CoinsApi();
$id = id_example; // String | pass the coin id (can be obtained from /coins) eg. bitcoin
$localization = localization_example; // String | Include all localized languages in response (true/false) [default: true]
$tickers = true; // Boolean | Include tickers data (true/false) [default: true]
$marketData = true; // Boolean | Include market_data (true/false) [default: true]
$communityData = true; // Boolean | Include community_data data (true/false) [default: true]
$developerData = true; // Boolean | Include developer_data data (true/false) [default: true]
$sparkline = true; // Boolean | Include sparkline 7 days data (eg. true, false) [default: false]
try {
$api_instance->coinsIdGet($id, $localization, $tickers, $marketData, $communityData, $developerData, $sparkline);
} catch (Exception $e) {
echo 'Exception when calling CoinsApi->coinsIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CoinsApi;
my $api_instance = WWW::SwaggerClient::CoinsApi->new();
my $id = id_example; # String | pass the coin id (can be obtained from /coins) eg. bitcoin
my $localization = localization_example; # String | Include all localized languages in response (true/false) [default: true]
my $tickers = true; # Boolean | Include tickers data (true/false) [default: true]
my $marketData = true; # Boolean | Include market_data (true/false) [default: true]
my $communityData = true; # Boolean | Include community_data data (true/false) [default: true]
my $developerData = true; # Boolean | Include developer_data data (true/false) [default: true]
my $sparkline = true; # Boolean | Include sparkline 7 days data (eg. true, false) [default: false]
eval {
$api_instance->coinsIdGet(id => $id, localization => $localization, tickers => $tickers, marketData => $marketData, communityData => $communityData, developerData => $developerData, sparkline => $sparkline);
};
if ($@) {
warn "Exception when calling CoinsApi->coinsIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.CoinsApi()
id = id_example # String | pass the coin id (can be obtained from /coins) eg. bitcoin
localization = localization_example # String | Include all localized languages in response (true/false) [default: true] (optional)
tickers = true # Boolean | Include tickers data (true/false) [default: true] (optional)
marketData = true # Boolean | Include market_data (true/false) [default: true] (optional)
communityData = true # Boolean | Include community_data data (true/false) [default: true] (optional)
developerData = true # Boolean | Include developer_data data (true/false) [default: true] (optional)
sparkline = true # Boolean | Include sparkline 7 days data (eg. true, false) [default: false] (optional)
try:
# Get current data (name, price, market, ... including exchange tickers) for a coin
api_instance.coins_id_get(id, localization=localization, tickers=tickers, marketData=marketData, communityData=communityData, developerData=developerData, sparkline=sparkline)
except ApiException as e:
print("Exception when calling CoinsApi->coinsIdGet: %s\n" % e)
Parameters
Name | Description |
---|---|
id* |
String
pass the coin id (can be obtained from /coins) eg. bitcoin
Required
|
Name | Description |
---|---|
localization |
String
Include all localized languages in response (true/false) <b>[default: true]</b>
|
tickers |
Boolean
Include tickers data (true/false) <b>[default: true]</b>
|
market_data |
Boolean
Include market_data (true/false) <b>[default: true]</b>
|
community_data |
Boolean
Include community_data data (true/false) <b>[default: true]</b>
|
developer_data |
Boolean
Include developer_data data (true/false) <b>[default: true]</b>
|
sparkline |
Boolean
Include sparkline 7 days data (eg. true, false) <b>[default: false]</b>
|