Skip to main content

Overview

Verify that the CoinPaprika API is operational and measure response time. Useful for monitoring, health checks, and debugging connectivity issues.

Usage

coinpaprika-cli status

Options

--output
string
default:"table"
Output format: table or json
--raw
boolean
default:"false"
JSON output without _meta wrapper (for scripts/piping)

Examples

Basic health check

coinpaprika-cli status
Sample output:
CoinPaprika API Status
  Status:        OK
  Response time: 156ms
  API key:       Configured

JSON output for monitoring

coinpaprika-cli status --output json

Integration with monitoring tools

#!/bin/bash
# Health check script for monitoring systems

result=$(coinpaprika-cli status --output json --raw)
status=$(echo $result | jq -r '.coinpaprika.status')
response_time=$(echo $result | jq -r '.coinpaprika.response_time_ms')

if [ "$status" = "OK" ] && [ "$response_time" -lt 1000 ]; then
  echo "CoinPaprika API: Healthy (${response_time}ms)"
  exit 0
else
  echo "CoinPaprika API: Unhealthy"
  exit 1
fi

Check API endpoint from CI/CD

# GitHub Actions example
- name: Check CoinPaprika API
  run: |
    coinpaprika-cli status --output json
    if [ $? -ne 0 ]; then
      echo "API is down, skipping integration tests"
      exit 1
    fi

Response Fields

coinpaprika
object
CoinPaprika API status information
api_key_configured
boolean
Whether an API key is currently configured (doesn’t validate the key)

How It Works

The status command:
  1. Makes a request to the /global endpoint
  2. Measures response time
  3. Checks if the API key is configured locally
  4. Returns aggregated status information
The status check uses the /global endpoint, which is available on both free and paid tiers.

API Endpoint

The status command tests:
GET https://api.coinpaprika.com/v1/global
or with API key:
GET https://api-pro.coinpaprika.com/v1/global

Status Codes

OK
status
API is operational and responding
ERROR
status
API request failed (network issue, API down, or invalid key)

Use Cases

Health Monitoring

Add to monitoring dashboards and alerting systems

Uptime Checks

Schedule periodic health checks via cron

CI/CD Gates

Verify API availability before running tests

Debugging

Troubleshoot connectivity and configuration issues

Exit Codes

  • 0 — API is healthy (status OK)
  • 1 — API error or unreachable

Performance Benchmarks

Typical response times:
  • < 200ms — Excellent
  • 200-500ms — Good
  • 500-1000ms — Acceptable
  • > 1000ms — Slow (may indicate network issues)
If response times are consistently high, check your network connection or try using a different DNS resolver.

config

Check API key configuration

key-info

Validate API key and check usage

Notes

  • The status check does not consume API credits
  • Response time includes network latency
  • api_key_configured only checks if a key is set, not if it’s valid
  • Use key-info to validate your API key
  • Status check runs against the global endpoint (minimal data transfer)

Build docs developers (and LLMs) love