Invest Crypto Historical avatar
Invest Crypto Historical

Pricing

$7.99 / 1,000 results

Go to Store
Invest Crypto Historical

Invest Crypto Historical

Developed by

Pinto Studio

Pinto Studio

Maintained by Community

The Cryptocurrency Historical Data (Investing.com) Actor is a powerful tool that fetches historical cryptocurrency price data from Investing.com.

0.0 (0)

Pricing

$7.99 / 1,000 results

0

Total users

1

Monthly users

1

Runs succeeded

>99%

Last modified

13 hours ago

Crypto Historical Data (Investing.com) Actor Documentation

Overview

The Crypto Historical Data (Investing.com) Actor is a powerful tool that fetches historical cryptocurrency price data from Investing.com. This Actor allows you to retrieve comprehensive historical data for any cryptocurrency, including open, high, low, close prices, trading volume, and timestamps for specified date ranges.

Features

  • Multiple Cryptocurrencies: Support for all major cryptocurrencies (BTC, ETH, ADA, etc.)
  • Flexible Date Ranges: Retrieve data for any custom date range
  • Multiple Intervals: Daily, Weekly, and Monthly data intervals
  • Data Ordering: Ascending or descending chronological order
  • Comprehensive Data: OHLCV (Open, High, Low, Close, Volume) data with timestamps
  • JSON Output: Clean, structured JSON format for easy integration
  • Error Handling: Robust validation and error reporting

Input Parameters

Required Parameters

ParameterTypeDescriptionExample
symbolStringCryptocurrency symbol"BTC", "ETH", "ADA"
from_dateStringStart date in dd/mm/yyyy format"01/01/2024"
to_dateStringEnd date in dd/mm/yyyy format"27/04/2024"

Optional Parameters

ParameterTypeDefaultOptionsDescription
orderString"ascending""ascending", "descending"Order of data by date
intervalString"Daily""Daily", "Weekly", "Monthly"Data interval frequency

Input Schema Example

{
"symbol": "BTC",
"from_date": "01/01/2024",
"to_date": "27/04/2024",
"order": "ascending",
"interval": "Daily"
}

Output Format

The Actor returns a comprehensive JSON object with the following structure:

Main Response Object

{
"symbol": "BTC",
"name": "Bitcoin",
"data_points": 118,
"date_range": "01/01/2024 to 27/04/2024",
"interval": "Daily",
"historical_data": [...]
}

Historical Data Points

Each data point in the historical_data array contains:

FieldTypeDescription
dateStringDate in YYYY-MM-DD format
openNumberOpening price in USD
highNumberHighest price of the day in USD
lowNumberLowest price of the day in USD
closeNumberClosing price in USD
volumeNumberTrading volume
currencyStringCurrency denomination (USD)

Sample Data Point

{
"date": "01/01/2024",
"open": 42272.5,
"high": 44187.0,
"low": 42196.7,
"close": 44183.4,
"volume": 36302,
"currency": "USD"
}

Usage Examples

Basic Usage

// Minimal configuration for Bitcoin data
{
"symbol": "BTC",
"from_date": "01/01/2024",
"to_date": "31/01/2024"
}

Advanced Usage

// Ethereum weekly data in descending order
{
"symbol": "ETH",
"from_date": "01/01/2024",
"to_date": "31/12/2024",
"order": "descending",
"interval": "Weekly"
}

Multiple Cryptocurrencies

To fetch data for multiple cryptocurrencies, run the Actor multiple times with different symbols:

// Run 1: Bitcoin
{ "symbol": "BTC", "from_date": "01/01/2024", "to_date": "31/01/2024" }
// Run 2: Ethereum
{ "symbol": "ETH", "from_date": "01/01/2024", "to_date": "31/01/2024" }
// Run 3: Cardano
{ "symbol": "ADA", "from_date": "01/01/2024", "to_date": "31/01/2024" }

Supported Cryptocurrencies

The Actor supports all major cryptocurrencies available on Investing.com, including but not limited to:

  • BTC - Bitcoin
  • ETH - Ethereum
  • ADA - Cardano
  • XRP - Ripple
  • DOT - Polkadot
  • LINK - Chainlink
  • LTC - Litecoin
  • BCH - Bitcoin Cash
  • XLM - Stellar
  • DOGE - Dogecoin

Error Handling

The Actor includes comprehensive error handling for common scenarios:

Validation Errors

  • Missing required parameters
  • Invalid date formats
  • Invalid cryptocurrency symbols

Runtime Errors

  • Network connectivity issues
  • Data source unavailability
  • Invalid date ranges

Example Error Response

If an error occurs, the Actor will log detailed error information and terminate with a descriptive error message.

Best Practices

Date Range Selection

  • Use reasonable date ranges to avoid timeouts
  • For large datasets, consider breaking into smaller chunks
  • Be aware that very old data may not be available for all cryptocurrencies

Performance Optimization

  • Use appropriate intervals (Daily for short periods, Weekly/Monthly for longer periods)
  • Consider the data volume when setting date ranges
  • Monitor Actor runtime for large requests

Data Integration

  • Parse the JSON response to extract specific data points
  • Use the data_points field to validate expected data volume
  • Handle edge cases where data might be missing for certain dates

Rate Limits and Considerations

  • The Actor respects Investing.com's rate limits
  • Large date ranges may take longer to process
  • Consider the Actor's timeout settings for extensive data requests

Data Storage

The Actor stores retrieved data in the Apify dataset and also sets a summary value that can be accessed via the Actor's storage API.

Accessing Data

// From dataset
const dataset = await Actor.openDataset();
const data = await dataset.getData();
// From key-value store
const summary = await Actor.getValue('summary');

Troubleshooting

Common Issues

  1. Invalid Symbol Error

    • Ensure the cryptocurrency symbol is correct and supported
    • Check Investing.com for the exact symbol format
  2. Date Format Error

    • Use DD/MM/YYYY format exactly
    • Ensure dates are valid and to_date is after from_date
  3. No Data Returned

    • Verify the cryptocurrency was trading during the specified period
    • Check if the date range includes weekends/holidays for daily data
  4. Timeout Issues

    • Reduce the date range for large requests
    • Use Weekly or Monthly intervals for longer periods

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
  • Apify Platform: You can also contact us directly through this platform.