# Crypto Recent Data (`pintostudio/crypto-recent-data`) Actor

The Crypto Recent Data (Investing.com) Actor is a powerful web scraping tool that fetches recent historical cryptocurrency data from Investing.com.

- **URL**: https://apify.com/pintostudio/crypto-recent-data.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Categories:** Integrations, Other, Developer tools
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$17.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Crypto Recent Data (Investing.com) - Apify Actor Documentation

### Overview

The **Crypto Recent Data (Investing.com)** Actor is a powerful web scraping tool that fetches recent historical cryptocurrency data from Investing.com. This Actor provides up-to-date pricing information, trading volumes, and other essential metrics for any cryptocurrency symbol you specify.

### Features

- **Comprehensive Data**: Retrieves OHLCV (Open, High, Low, Close, Volume) data for cryptocurrencies
- **Flexible Intervals**: Support for Daily, Weekly, and Monthly data intervals
- **Customizable Ordering**: Sort data in ascending or descending order by date
- **Rich Metadata**: Includes cryptocurrency name, currency denomination, and detailed timestamps
- **Robust Error Handling**: Comprehensive validation and error reporting
- **Structured Output**: Clean, consistent JSON format for easy integration

### Input Parameters

#### Required Parameters

- **`symbol`** (string, required)
  - The cryptocurrency symbol to retrieve data for
  - Examples: `"BTC"` for Bitcoin, `"ETH"` for Ethereum, `"ADA"` for Cardano
  - Must be a valid, non-empty string
  - Default: `"BTC"`

#### Optional Parameters

- **`order`** (string, optional)
  - Specifies the order of retrieved data by date
  - Options: `"ascending"` or `"descending"`
  - Default: `"ascending"`

- **`interval`** (string, optional)
  - Historical data interval to retrieve
  - Options: `"Daily"`, `"Weekly"`, or `"Monthly"`
  - Default: `"Daily"`

### Input Schema Example

```json
{
  "symbol": "ETH",
  "order": "ascending",
  "interval": "Daily"
}
```

### Output Format

The Actor returns data in a structured JSON format with the following structure:

```json
{
  "name": "Cryptocurrency Name",
  "recent": [
    {
      "close": 2493.83,
      "currency": "USD",
      "date": "26/06/2025",
      "high": 2519.9,
      "low": 2417.85,
      "open": 2418.51,
      "volume": 607014
    }
  ]
}
```

#### Output Fields Description

- **`name`**: Full name of the cryptocurrency (e.g., "Bitcoin", "Ethereum")
- **`recent`**: Array of historical data points
  - **`close`**: Closing price for the period
  - **`currency`**: Currency denomination (typically "USD")
  - **`date`**: Date in DD/MM/YYYY format
  - **`high`**: Highest price during the period
  - **`low`**: Lowest price during the period
  - **`open`**: Opening price for the period
  - **`volume`**: Trading volume for the period

### Dataset Structure

Each data point is saved to the dataset with enhanced metadata:

```json
{
  "symbol": "ETH",
  "name": "Ethereum",
  "interval": "Daily",
  "close": 2493.83,
  "currency": "USD",
  "date": "26/06/2025",
  "high": 2519.9,
  "low": 2417.85,
  "open": 2418.51,
  "volume": 607014
}
```

### Usage Examples

#### Basic Usage - Bitcoin Daily Data

```json
{
  "symbol": "BTC"
}
```

#### Advanced Usage - Ethereum Weekly Data (Descending)

```json
{
  "symbol": "ETH",
  "order": "descending",
  "interval": "Weekly"
}
```

#### Multiple Cryptocurrencies

To fetch data for multiple cryptocurrencies, run the Actor multiple times with different symbols, or use Apify's scheduling features to automate regular data collection.

### Error Handling

The Actor includes comprehensive error handling for common scenarios:

- **Invalid Symbol**: Validates that the symbol is a non-empty string
- **Network Issues**: Handles connection errors and timeouts
- **Data Parsing**: Manages JSON parsing errors and malformed responses
- **API Limits**: Gracefully handles rate limiting from the source

### Data Summary

The Actor provides a summary of the retrieved data accessible via the `data_summary` key value store:

```json
{
  "symbol": "ETH",
  "name": "Ethereum",
  "total_data_points": 32,
  "interval": "Daily",
  "order": "ascending",
  "retrieved_at": "2025-06-26T10:30:00.000Z"
}
```

### Common Use Cases

#### Financial Analysis

- Track cryptocurrency price movements over time
- Calculate volatility and trading patterns
- Perform technical analysis with OHLCV data

#### Portfolio Management

- Monitor holdings performance
- Track market trends for investment decisions
- Historical backtesting of trading strategies

#### Market Research

- Compare performance across different cryptocurrencies
- Analyze market cycles and seasonal patterns
- Generate reports for stakeholders

#### Automated Trading

- Feed data into trading algorithms
- Set up alerts based on price movements
- Maintain historical databases for strategy development

### Integration Tips

#### With Apify SDK

```python
from apify_client import ApifyClient

client = ApifyClient("your-api-token")
actor_call = client.actor("thr-actor-id").call(
    run_input={"symbol": "BTC", "interval": "Daily"}
)
dataset_items = client.dataset(actor_call["defaultDatasetId"]).list_items()
```

#### With Webhooks

Set up webhooks to automatically process data as it's collected, perfect for real-time applications.

#### With Scheduler

Use Apify's scheduler to run the Actor at regular intervals (hourly, daily, weekly) for continuous data collection.

### Limitations

- Data availability depends on Investing.com's coverage
- Historical data depth varies by cryptocurrency
- Rate limiting may apply for frequent requests
- Some newer or less popular cryptocurrencies may not be available

### Best Practices

1. **Symbol Validation**: Always verify that the cryptocurrency symbol exists on Investing.com
2. **Interval Selection**: Choose appropriate intervals based on your analysis needs
3. **Error Monitoring**: Set up monitoring for failed runs to ensure data continuity
4. **Data Storage**: Consider using Apify's dataset features for long-term storage
5. **Rate Limiting**: Avoid excessive concurrent runs to prevent blocking

### Support

If you have any questions or encounter any issues, please consult the Apify documentation or reach out to us through one of the following channels:

- **Telegram**: [@pintoflow](https://t.me/pintoflow)
- **Apify Platform**: You can also contact us directly through this platform.

***

# Actor input Schema

## `symbol` (type: `string`):

Symbol of the cryptocurrency to retrieve data from (e.g., 'BTC' for Bitcoin, 'ETH' for Ethereum)

## `order` (type: `string`):

Order of the retrieved data by date

## `interval` (type: `string`):

Historical data interval to retrieve

## Actor input object example

```json
{
  "symbol": "BTC",
  "order": "ascending",
  "interval": "Daily"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "symbol": "BTC",
    "order": "ascending",
    "interval": "Daily"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pintostudio/crypto-recent-data").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "symbol": "BTC",
    "order": "ascending",
    "interval": "Daily",
}

# Run the Actor and wait for it to finish
run = client.actor("pintostudio/crypto-recent-data").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "symbol": "BTC",
  "order": "ascending",
  "interval": "Daily"
}' |
apify call pintostudio/crypto-recent-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pintostudio/crypto-recent-data"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uTxNreYkuKgRFSPTJ/builds/sUTwqbk53T6X5BJJ9/openapi.json
