Skip to content
Back to skills

Apify Crypto Skill

ASecurity

Fetch live cryptocurrency data from KuCoin and CoinGecko via Apify actors. Use when the user asks for crypto prices, OHLCV candlestick data, market cap rankings, trending coins, or any cryptocurrency market data. Provides 9 async Python functions for KuCoin (OHLCV, realtime prices) and CoinGecko (market data, trending, categories, coin details, historical data, simple prices).

  • 81 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 7, 2026
blockchainpythongobashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add jiayaoqijia/cryptoskill --skill apify-crypto-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Apify Crypto Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Apify Crypto Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jiayaoqijia-apify-crypto-skill/badge)](https://www.skillsdirectory.com/skills/jiayaoqijia-apify-crypto-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: crypto-skill
description: Fetch live cryptocurrency data from KuCoin and CoinGecko via Apify actors. Use when the user asks for crypto prices, OHLCV candlestick data, market cap rankings, trending coins, or any cryptocurrency market data. Provides 9 async Python functions for KuCoin (OHLCV, realtime prices) and CoinGecko (market data, trending, categories, coin details, historical data, simple prices).
---

# Crypto Skill

Async Python functions that fetch live cryptocurrency data via Apify actors. Requires `APIFY_API_TOKEN` environment variable.

## Setup

Install the package from the skill's bundled source:

```bash
bash ${CLAUDE_SKILL_DIR}/scripts/install.sh
```

Ensure `APIFY_API_TOKEN` is set (from `.env` or environment).

## Quick Start

```python
import asyncio
from crypto_skill import get_ohlcv, get_realtime_price, get_market_data, get_trending

async def main():
    # KuCoin OHLCV candles
    candles = await get_ohlcv("BTC/USDT", "15m", limit=10)
    for c in candles:
        print(f"{c.date} O={c.open} H={c.high} L={c.low} C={c.close}")

    # Current price
    price = await get_realtime_price("ETH/USDT")
    print(f"{price.symbol} = ${price.price:,.2f}")

    # Top coins by market cap
    coins = await get_market_data(max_results=5)
    for c in coins:
        print(f"{c.name} ${c.current_price:,.2f} Rank #{c.market_cap_rank}")

    # Trending coins
    trending = await get_trending()
    for c in trending[:5]:
        print(f"{c.name} 24h: {c.price_change_percentage_24h:.2f}%")

asyncio.run(main())
```

## Available Functions

### KuCoin (via Crypto Data Scraper actor)

| Function | Returns | Use for |
|----------|---------|---------|
| `get_ohlcv(symbol, timeframe, limit=100)` | `list[OHLCVCandle]` | Candlestick chart data |
| `get_realtime_price(symbol)` | `RealtimePrice` | Current price of a pair |
| `get_all_coins_ohlcv(timeframe, limit=100)` | `list[OHLCVCandle]` | All coins OHLCV (slow) |

**Timeframes:** `1m`, `5m`, `15m`, `30m`, `1h`, `4h`, `1d`

### CoinGecko (via Crypto Intelligence actor)

All return `MarketCoin` or `list[MarketCoin]`.

| Function | Returns | Use for |
|----------|---------|---------|
| `get_simple_prices(coin_ids, vs_currencies=None)` | `list[MarketCoin]` | Specific coin prices |
| `get_market_data(vs_currency, category, max_results)` | `list[MarketCoin]` | Top coins ranked |
| `get_coin_detail(coin_id, include_details=True)` | `MarketCoin` | Single coin deep data |
| `get_historical(coin_id, days=30, vs_currency)` | `MarketCoin` | Coin historical mode |
| `get_trending()` | `list[MarketCoin]` | Currently trending coins |
| `get_categories()` | `list[MarketCoin]` | Coins by categories |

## Error Handling

```python
from crypto_skill import get_ohlcv, ApifyAuthError, ApifyTimeoutError, ActorDataError

try:
    candles = await get_ohlcv("BTC/USDT", "15m")
except ApifyAuthError:
    print("Set APIFY_API_TOKEN environment variable")
except ApifyTimeoutError:
    print("Actor run exceeded 300s — try smaller limit")
except ActorDataError as e:
    print(f"Unexpected response format: {e}")
```

## Detailed API Reference

For complete function signatures, model fields, and coin ID lists, see [api-reference.md](references/api-reference.md).

Files in this skill

  • SKILL.md3.2 KB
  • SOURCE.md212 B
  • TRUST.auto.yaml2.1 KB
  • references/api-reference.md3.2 KB
  • scripts/crypto_skill/__init__.py727 B
  • scripts/crypto_skill/client.py1.8 KB
  • scripts/crypto_skill/coingecko.py3.7 KB
  • scripts/crypto_skill/constants.py803 B
  • scripts/crypto_skill/exceptions.py517 B
  • scripts/crypto_skill/kucoin.py2.2 KB
  • scripts/crypto_skill/models.py1.5 KB
  • scripts/install.sh421 B
  • scripts/pyproject.toml901 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in blockchain →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.