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

# Get currency by slug

> Returns the currency plus related `earn_offers`, `borrow_offers`, and `collateral_offers`. If the slug was renamed, the API can respond with `301 Moved Permanently` and redirect to the current slug.




## OpenAPI

````yaml /openapi/public-api.yaml get /api/v1/currencies/{slug}
openapi: 3.1.0
info:
  title: Criffy Public API
  version: 1.0.0
  summary: Public market data APIs for Criffy Pro+ integrations.
  description: >
    Public REST reference for Criffy. Public data endpoints live under
    `/api/v1/*`. All documented endpoints require a Bearer API key tied to an
    active Pro+ subscription. API keys are created and managed from the
    signed-in Criffy dashboard under Settings -> API.
servers:
  - url: https://criffy.com
    description: Production
security: []
tags:
  - name: Exchanges
  - name: Wallets
  - name: Protocols
  - name: Currencies
  - name: Earn
  - name: Borrow
  - name: Collateral
paths:
  /api/v1/currencies/{slug}:
    get:
      tags:
        - Currencies
      summary: Get currency by slug
      description: >
        Returns the currency plus related `earn_offers`, `borrow_offers`, and
        `collateral_offers`. If the slug was renamed, the API can respond with
        `301 Moved Permanently` and redirect to the current slug.
      operationId: getCurrency
      parameters:
        - $ref: '#/components/parameters/SlugPathParam'
      responses:
        '200':
          description: Currency detail with embedded related offers.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
            X-Quota-Limit:
              $ref: '#/components/headers/XQuotaLimit'
            X-Quota-Remaining:
              $ref: '#/components/headers/XQuotaRemaining'
            X-Quota-Reset:
              $ref: '#/components/headers/XQuotaReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCurrencyDetail'
              examples:
                currencyDetail:
                  $ref: '#/components/examples/CurrencyDetailExample'
        '301':
          description: Resource moved permanently to the latest slug.
          headers:
            Location:
              schema:
                type: string
              description: New canonical URL for this resource.
              example: /api/v1/currencies/bitcoin
        '401':
          $ref: '#/components/responses/InvalidApiKey'
        '403':
          $ref: '#/components/responses/SubscriptionRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  parameters:
    SlugPathParam:
      name: slug
      in: path
      required: true
      description: Canonical resource slug.
      schema:
        type: string
  headers:
    XRateLimitLimit:
      description: Effective request-per-minute limit for the current API key.
      schema:
        type: string
      example: '60'
    XRateLimitRemaining:
      description: Remaining requests in the current rate-limit window.
      schema:
        type: string
      example: '53'
    XRateLimitReset:
      description: Unix timestamp for the next per-minute rate-limit window.
      schema:
        type: string
      example: '1777015260'
    XQuotaLimit:
      description: Effective monthly quota for the current API key.
      schema:
        type: string
      example: '100000'
    XQuotaRemaining:
      description: Remaining requests in the current monthly quota window.
      schema:
        type: string
      example: '87655'
    XQuotaReset:
      description: >-
        Unix timestamp for the next monthly quota reset, normally the 1st day of
        the next month at 00:00 UTC.
      schema:
        type: string
      example: '1777593600'
    RetryAfter:
      description: Number of seconds to wait before retrying.
      schema:
        type: string
      example: '60'
  schemas:
    PublicCurrencyDetail:
      allOf:
        - $ref: '#/components/schemas/PublicCurrency'
        - type: object
          required:
            - earn_offers
            - borrow_offers
            - collateral_offers
          properties:
            earn_offers:
              type: array
              items:
                $ref: '#/components/schemas/PublicEarn'
            borrow_offers:
              type: array
              items:
                $ref: '#/components/schemas/PublicBorrow'
            collateral_offers:
              type: array
              items:
                $ref: '#/components/schemas/PublicCollateral'
    PublicCurrency:
      type: object
      required:
        - slug
        - name
        - symbol
        - category
        - sign
        - logo64
        - stats
        - updated_at
      properties:
        slug:
          type: string
        name:
          type: string
        symbol:
          type: string
        category:
          type: string
        sign:
          type:
            - string
            - 'null'
        logo64:
          type:
            - string
            - 'null'
        stats:
          $ref: '#/components/schemas/CurrencyStats'
        updated_at:
          type: string
          format: date-time
    PublicEarn:
      type: object
      required:
        - id
        - compositeKey
        - platform
        - chain
        - asset
        - reward_assets
        - product_type
        - product_name
        - duration_days
        - apy
        - estimated_apy
        - estimated_apy_updated_at
        - tvl
        - min_amount
        - max_amount
        - available
        - available_updated_at
        - link
        - updated_at
      properties:
        id:
          type: integer
        compositeKey:
          type: string
        platform:
          oneOf:
            - $ref: '#/components/schemas/PublicPlatformRef'
            - type: 'null'
        chain:
          oneOf:
            - $ref: '#/components/schemas/AssetRef'
            - type: 'null'
        asset:
          oneOf:
            - $ref: '#/components/schemas/AssetRef'
            - type: 'null'
        reward_assets:
          type: array
          items:
            $ref: '#/components/schemas/AssetRef'
        product_type:
          type: string
        product_name:
          type: string
        duration_days:
          type:
            - integer
            - 'null'
        apy:
          type: string
          description: >-
            APY percentage serialized as a decimal string. For example, `4.25`
            means 4.25%.
        estimated_apy:
          type: string
          description: Provider-estimated APY percentage serialized as a decimal string.
        estimated_apy_updated_at:
          type: string
          format: date-time
        tvl:
          type:
            - string
            - 'null'
          description: >-
            Total value locked in USD when available, serialized as a decimal
            string.
        min_amount:
          type:
            - string
            - 'null'
        max_amount:
          type:
            - string
            - 'null'
        available:
          type: boolean
          description: >-
            Runtime availability status for the earn offer. Published offers can
            be returned when this is false.
        available_updated_at:
          type: string
          format: date-time
          description: When the earn offer availability status was last refreshed.
        link:
          type: string
        updated_at:
          type: string
          format: date-time
    PublicBorrow:
      type: object
      required:
        - id
        - compositeKey
        - platform
        - chain
        - asset
        - platform_type
        - term_days
        - borrow_apy
        - supply_apy
        - net_borrow_apy
        - real_net_borrow_apy
        - total_supply_usd
        - total_borrow_usd
        - available_liquidity_usd
        - is_active
        - link
        - synced_at
        - updated_at
      properties:
        id:
          type: integer
        compositeKey:
          type: string
        platform:
          oneOf:
            - $ref: '#/components/schemas/PublicPlatformRef'
            - type: 'null'
        chain:
          oneOf:
            - $ref: '#/components/schemas/AssetRef'
            - type: 'null'
        asset:
          $ref: '#/components/schemas/AssetRef'
        platform_type:
          type: string
        term_days:
          type:
            - integer
            - 'null'
        borrow_apy:
          type:
            - string
            - 'null'
          description: Borrow APY percentage serialized as a decimal string.
        supply_apy:
          type:
            - string
            - 'null'
          description: Supply APY percentage serialized as a decimal string.
        net_borrow_apy:
          type: string
          description: Net borrow APY percentage serialized as a decimal string.
        real_net_borrow_apy:
          type: string
          description: >-
            Criffy-normalized net borrow APY percentage serialized as a decimal
            string.
        total_supply_usd:
          type:
            - string
            - 'null'
        total_borrow_usd:
          type:
            - string
            - 'null'
        available_liquidity_usd:
          type:
            - string
            - 'null'
        is_active:
          type: boolean
          description: >-
            Runtime activity status for the borrow offer. Published offers can
            be returned when this is false.
        link:
          type: string
        synced_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PublicCollateral:
      type: object
      required:
        - id
        - compositeKey
        - platform
        - chain
        - asset
        - platform_type
        - term_days
        - initial_ltv
        - margin_call_ltv
        - liquidation_ltv
        - is_active
        - link
        - synced_at
        - updated_at
      properties:
        id:
          type: integer
        compositeKey:
          type: string
        platform:
          oneOf:
            - $ref: '#/components/schemas/PublicPlatformRef'
            - type: 'null'
        chain:
          oneOf:
            - $ref: '#/components/schemas/AssetRef'
            - type: 'null'
        asset:
          $ref: '#/components/schemas/AssetRef'
        platform_type:
          type: string
        term_days:
          type:
            - integer
            - 'null'
        initial_ltv:
          type: string
          description: Initial loan-to-value percentage serialized as a decimal string.
        margin_call_ltv:
          type:
            - string
            - 'null'
          description: >-
            Margin-call LTV percentage serialized as a decimal string when
            available.
        liquidation_ltv:
          type:
            - string
            - 'null'
          description: >-
            Liquidation LTV percentage serialized as a decimal string when
            available.
        is_active:
          type: boolean
          description: >-
            Runtime activity status for the collateral offer. Published offers
            can be returned when this is false.
        link:
          type: string
        synced_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
    CurrencyStats:
      type: object
      required:
        - rank_by_market_cap
        - circulating_supply
        - total_supply
        - max_supply
        - usd_price
        - usd_volume_24h
        - usd_market_cap
        - usd_percent_change_24h
        - usd_market_cap_dominance
      properties:
        rank_by_market_cap:
          type:
            - integer
            - 'null'
        circulating_supply:
          type:
            - number
            - 'null'
        total_supply:
          type:
            - number
            - 'null'
        max_supply:
          type:
            - number
            - 'null'
        usd_price:
          type:
            - string
            - 'null'
        usd_volume_24h:
          type:
            - string
            - 'null'
        usd_market_cap:
          type:
            - string
            - 'null'
        usd_percent_change_24h:
          type:
            - number
            - 'null'
        usd_market_cap_dominance:
          type:
            - number
            - 'null'
    PublicPlatformRef:
      type: object
      required:
        - type
        - slug
        - name
      properties:
        type:
          type: string
          enum:
            - exchange
            - wallet
            - protocol
        slug:
          type: string
        name:
          type: string
    AssetRef:
      type: object
      required:
        - slug
        - symbol
        - name
      properties:
        slug:
          type: string
        symbol:
          type: string
        name:
          type: string
    ApiError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - invalid_api_key
            - subscription_required
            - rate_limit_exceeded
            - monthly_quota_exceeded
            - not_found
            - validation_error
            - service_unavailable
            - internal_error
        message:
          type: string
        details:
          type:
            - object
            - 'null'
          additionalProperties: true
  examples:
    CurrencyDetailExample:
      summary: Currency detail with related offers
      value:
        slug: bitcoin
        name: Bitcoin
        symbol: BTC
        category: cryptocurrency
        sign: BTC
        logo64: https://s03.criffy.com/currencies/bitcoin.png
        stats:
          rank_by_market_cap: 1
          circulating_supply: 19700000
          total_supply: 19700000
          max_supply: 21000000
          usd_price: '65000.12'
          usd_volume_24h: '28000000000.45'
          usd_market_cap: '1280000000000.99'
          usd_percent_change_24h: 1.23
          usd_market_cap_dominance: 51.4
        updated_at: '2026-04-23T10:00:00.000Z'
        earn_offers:
          - id: 102
            compositeKey: binance:btc:flexible
            platform:
              type: exchange
              slug: binance
              name: Binance
            chain:
              slug: bitcoin
              symbol: BTC
              name: Bitcoin
            asset:
              slug: bitcoin
              symbol: BTC
              name: Bitcoin
            reward_assets: []
            product_type: savings
            product_name: Flexible BTC Savings
            duration_days: null
            apy: '1.50'
            estimated_apy: '1.45'
            estimated_apy_updated_at: '2026-04-23T09:55:00.000Z'
            tvl: '1800000.00'
            min_amount: '0.001'
            max_amount: null
            available: true
            available_updated_at: '2026-04-23T09:55:00.000Z'
            link: https://www.binance.com/en/earn
            updated_at: '2026-04-23T10:00:00.000Z'
        borrow_offers: []
        collateral_offers:
          - id: 701
            compositeKey: aave:ethereum:wbtc
            platform:
              type: protocol
              slug: aave
              name: Aave
            chain:
              slug: ethereum
              symbol: ETH
              name: Ethereum
            asset:
              slug: wrapped-bitcoin
              symbol: WBTC
              name: Wrapped Bitcoin
            platform_type: protocol
            term_days: null
            initial_ltv: '70'
            margin_call_ltv: '78'
            liquidation_ltv: '80'
            is_active: true
            link: https://app.aave.com
            synced_at: '2026-04-23T09:58:00.000Z'
            updated_at: '2026-04-23T10:00:00.000Z'
  responses:
    InvalidApiKey:
      description: Bearer API key is missing, invalid, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: invalid_api_key
              message: Invalid or revoked API key.
    SubscriptionRequired:
      description: Endpoint requires an active Pro+ subscription.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: subscription_required
              message: This endpoint requires an active Pro+ subscription.
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: not_found
              message: Resource not found.
    RateLimitExceeded:
      description: Per-minute rate limit or monthly quota exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            rateLimitExceeded:
              summary: Rate limit exceeded
              value:
                error:
                  code: rate_limit_exceeded
                  message: Rate limit of 60 requests per minute exceeded.
                  details:
                    reset_at: '2026-04-23T10:01:00.000Z'
                    limit: 60
            monthlyQuotaExceeded:
              summary: Monthly quota exceeded
              value:
                error:
                  code: monthly_quota_exceeded
                  message: You have exceeded your monthly quota of 100,000 requests.
                  details:
                    reset_at: '2026-05-01T00:00:00.000Z'
                    limit: 100000
    ServiceUnavailable:
      description: Request failed closed because a dependency was unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            error:
              code: service_unavailable
              message: Service temporarily unavailable.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Bearer API key for authenticated `/api/v1/*` access.
      x-default: criffy_live_your_api_key_here

````