> ## Documentation Index
> Fetch the complete documentation index at: https://coinstats.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Coin By Id

> Get detailed information about a specific cryptocurrency using coinId. 

<Note>**1** credit per request</Note><hr />

<AccordionGroup>
  <Accordion title="Required">
    * coinId: Path parameter. Unique coin identifier (e.g., `bitcoin`).
  </Accordion>

  <Accordion title="Optional">
    * currency: Display currency (defaults to USD).
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml /api-reference/openapi.json get /v1/coins/{coinId}
openapi: 3.0.0
info:
  title: CoinStats Public API
  description: >-
    CoinStats Public API — programmatic access to market data, news, NFTs,
    wallets, exchange connections, and user portfolios. Authenticate every
    request with the `X-API-KEY` header (or an OAuth Bearer token in the
    `Authorization` header). Generate keys at https://openapi.coinstats.app.
  version: '1.0'
  contact: {}
servers:
  - url: https://openapiv1.coinstats.app
security: []
tags:
  - name: CoinStats
    description: ''
  - name: Market Data
    description: >-
      The Market Data section of the API provides endpoints to access a wide
      range of market-related information, including cryptocurrency coins,
      ticker data, and fiat currency rates. This category offers comprehensive
      data to help users monitor and analyze the cryptocurrency market, track
      prices, and gain insights into market trends
  - name: News
    description: >-
      The News section of the API allows you to access news articles and updates
      related to cryptocurrencies and the blockchain industry. It provides
      valuable information from various sources to keep you informed about the
      latest developments
  - name: NFTs
    description: >-
      The NFT section of the API provides endpoints to interact with
      Non-Fungible Tokens (NFTs), which are unique digital assets stored on a
      blockchain. These endpoints allow you to retrieve information about NFTs,
      including collections, assets, trending NFTs, and specific assets
      associated with wallet addresses.
  - name: Wallet Data
    description: >-
      The Wallet section of the API provides a comprehensive set of endpoints to
      manage and interact with wallets. It enables users to retrieve wallet
      balances, monitor syncing status, fetch transaction data, and synchronize
      wallet information with the blockchain. By integrating these endpoints
      into your application, you can offer robust wallet functionality to your
      users.
  - name: Exchange Connection
    description: >-
      The Exchange Connection section of the API provides a comprehensive set of
      endpoints to manage and interact with exchanges. It enables users to
      retrieve exchange balances, monitor syncing status, fetch transaction
      data. By integrating these endpoints into your application, you can offer
      robust exchange portfolio tracking functionality to your users.
  - name: User Portfolio
    description: >-
      The Portfolio section of the API provides a comprehensive set of endpoints
      to manage and interact with Share Portfolios. It enables users to retrieve
      current Portfolio Coins and Transactions.
  - name: Usage
    description: The Usage section provides account-level API usage data.
  - name: Status
    description: The Status section provides API availability checks.
paths:
  /v1/coins/{coinId}:
    get:
      tags:
        - Market Data
      summary: 'Get detailed information about a specific cryptocurrency using coinId. '
      operationId: get-coin-by-id
      parameters:
        - name: currency
          required: false
          in: query
          description: The currency to display coin prices and market data in.
          schema:
            default: USD
            example: USD
            type: string
        - name: coinId
          required: true
          in: path
          description: >-
            The identifier of coin, which you received from
            [/coins](/openapi/get-coins) call response.
          schema:
            type: string
            default: bitcoin
      responses:
        '200':
          description: Get Coin with global avg prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinListResponseItemDto'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                statusCode: 400
                message: Bad Request
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                statusCode: 401
                message: Unauthorized
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                statusCode: 403
                message: Forbidden
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '404':
          description: Not Found
          content:
            application/json:
              example:
                statusCode: 404
                message: Not Found
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '409':
          description: Conflict (for some endpoints)
          content:
            application/json:
              example:
                statusCode: 409
                message: Transactions not synced
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '429':
          description: Too Many Requests
          content:
            application/json:
              example:
                statusCode: 429
                message: Rate limit exceeded
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '503':
          description: Service Unavailable
          content:
            application/json:
              example:
                statusCode: 503
                message: Service Unavailable. Please Contact Support
      security:
        - X-API-KEY: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://openapiv1.coinstats.app/v1/coins/bitcoin' \
              --header 'X-API-KEY: <api-key>'
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://openapiv1.coinstats.app/v1/coins/bitcoin"

            headers = {"X-API-KEY": "<api-key>"}

            response = requests.request("GET", url, headers=headers)

            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {method: 'GET', headers: {'X-API-KEY':
            '<api-key>'}};


            fetch('https://openapiv1.coinstats.app/v1/coins/bitcoin', options)
              .then((response) => response.json())
              .then((response) => console.log(response))
              .catch((err) => console.error(err));
        - lang: php
          label: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://openapiv1.coinstats.app/v1/coins/bitcoin",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "X-API-KEY: <api-key>"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\turl := \"https://openapiv1.coinstats.app/v1/coins/bitcoin\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-API-KEY\", \"<api-key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
        - lang: java
          label: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://openapiv1.coinstats.app/v1/coins/bitcoin")
              .header("X-API-KEY", "<api-key>")
              .asString();
components:
  schemas:
    CoinListResponseItemDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the cryptocurrency
          example: bitcoin
        icon:
          type: string
          description: URL to the cryptocurrency icon/logo
          example: https://static.coinstats.app/coins/1650455588819.png
        name:
          type: string
          description: Full name of the cryptocurrency
          example: Bitcoin
        symbol:
          type: string
          description: Trading symbol/ticker of the cryptocurrency
          example: BTC
        rank:
          type: number
          description: Market capitalization rank of the cryptocurrency
          example: 1
        price:
          type: number
          description: Current price of the cryptocurrency in USD
          example: 43250.75
        priceBtc:
          type: number
          description: Current price of the cryptocurrency in BTC
          example: 1
        volume:
          type: number
          description: 24-hour trading volume in USD
          example: 15420000000
        marketCap:
          type: number
          description: Market capitalization in USD
          example: 847350000000
        availableSupply:
          type: number
          description: Number of coins currently in circulation
          example: 19600000
        totalSupply:
          type: number
          description: Total supply of the cryptocurrency
          example: 21000000
        fullyDilutedValuation:
          type: number
          description: Fully diluted market valuation
          example: 907500000000
        priceChange1h:
          type: number
          description: Percentage price change in the last 1 hour
          example: 0.75
        priceChange1d:
          type: number
          description: Percentage price change in the last 24 hours
          example: 2.15
        priceChange1w:
          type: number
          description: Percentage price change in the last 7 days
          example: -1.42
        priceChange1m:
          type: number
          description: Percentage price change in the last 1 month
          example: 4.25
        websiteUrl:
          type: string
          description: Official website URL of the cryptocurrency project
          example: https://bitcoin.org
        redditUrl:
          type: string
          description: Reddit community URL for the cryptocurrency
          example: https://reddit.com/r/bitcoin
        twitterUrl:
          type: string
          description: Official Twitter account URL
          example: https://twitter.com/bitcoin
        contractAddress:
          type: string
          description: Smart contract address for the token
          example: '0xa0b86a33e6776e2e09e384b0c92fceaade8fa82f'
        contractAddresses:
          description: Array of contract addresses across different blockchains
          type: array
          items:
            $ref: '#/components/schemas/ContractAddressDto'
        decimals:
          type: number
          description: Number of decimal places for the token
          example: 18
        explorers:
          description: Array of blockchain explorer URLs
          example:
            - https://blockstream.info
          type: array
          items:
            type: string
        liquidityScore:
          type: number
          description: Liquidity score of the cryptocurrency (0-100)
          example: 85.5
        volatilityScore:
          type: number
          description: Volatility score of the cryptocurrency (0-100)
          example: 42.3
        marketCapScore:
          type: number
          description: Market capitalization score (0-100)
          example: 95.8
        riskScore:
          type: number
          description: Overall risk score of the cryptocurrency (0-100)
          example: 25.7
        avgChange:
          type: number
          description: Average price change percentage
          example: 1.25
        isStable:
          type: boolean
          description: >-
            Indicates if the cryptocurrency is a stablecoin. Only present for
            stablecoins.
          example: true
        color:
          type: string
          description: >-
            Brand color of the cryptocurrency in hex format (without #). Only
            present for coins that have it defined.
          example: FF9500
        slug:
          type: string
          description: URL-friendly identifier for the cryptocurrency
          example: bitcoin
        allTimeHigh:
          type: number
          description: >-
            All-time high price in the requested currency. Only present for
            coins that have it defined.
          example: 126080
        allTimeLow:
          type: number
          description: >-
            All-time low price in the requested currency. Only present for coins
            that have it defined.
          example: 67.81
      required:
        - id
        - icon
        - name
        - symbol
        - rank
        - price
        - priceBtc
        - volume
        - marketCap
        - availableSupply
        - totalSupply
        - fullyDilutedValuation
        - priceChange1h
        - priceChange1d
        - priceChange1w
        - priceChange1m
        - websiteUrl
        - redditUrl
        - twitterUrl
        - explorers
        - slug
    ContractAddressDto:
      type: object
      properties:
        blockchain:
          type: string
          description: The blockchain network where the contract is deployed
          example: ethereum
        contractAddress:
          type: string
          description: The smart contract address on the blockchain
          example: '0xa0b86a33e6776e2e09e384b0c92fceaade8fa82f'
      required:
        - blockchain
        - contractAddress
  securitySchemes:
    X-API-KEY:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        API key required to access the endpoints. Generate one from your
        dashboard at https://openapi.coinstats.app and pass it in the
        `X-API-KEY` request header. Never expose your key in client-side code.

````