Type Alias OhlcvHistoricalV2Data

OhlcvHistoricalV2Data: {
    headers?: {
        x-cmc_pro_api_key?: string;
    };
    query?: {
        convert?: string;
        convert_id?: string;
        count?: string;
        id?: string;
        interval?: string;
        skip_invalid?: string;
        slug?: string;
        symbol?: string;
        time_end?: string;
        time_period?: string;
        time_start?: string;
    };
}

Type declaration

  • Optionalheaders?: {
        x-cmc_pro_api_key?: string;
    }
    • Optionalx-cmc_pro_api_key?: string

      Provide your API Key here

  • Optionalquery?: {
        convert?: string;
        convert_id?: string;
        count?: string;
        id?: string;
        interval?: string;
        skip_invalid?: string;
        slug?: string;
        symbol?: string;
        time_end?: string;
        time_period?: string;
        time_start?: string;
    }
    • Optionalconvert?: string

      By default market quotes are returned in USD. Optionally calculate market quotes in up to 3 fiat currencies or cryptocurrencies.

    • Optionalconvert_id?: string

      Optionally calculate market quotes by CoinMarketCap ID instead of symbol. This option is identical to convert outside of ID format. Ex: convert_id=1,2781 would replace convert=BTC,USD in your query. This parameter cannot be used when convert is used.

    • Optionalcount?: string

      Optionally limit the number of time periods to return results for. The default is 10 items. The current query limit is 10000 items.

    • Optionalid?: string

      One or more comma-separated CoinMarketCap cryptocurrency IDs. Example: "1,1027"

    • Optionalinterval?: string

      Optionally adjust the interval that "time_period" is sampled. For example with interval=monthly&time_period=daily you will see a daily OHLCV record for January, February, March and so on. See main endpoint description for available options.

    • Optionalskip_invalid?: string

      Pass true to relax request validation rules. When requesting records on multiple cryptocurrencies an error is returned if any invalid cryptocurrencies are requested or a cryptocurrency does not have matching records in the requested timeframe. If set to true, invalid lookups will be skipped allowing valid cryptocurrencies to still be returned.

    • Optionalslug?: string

      Alternatively pass a comma-separated list of cryptocurrency slugs. Example: "bitcoin,ethereum"

    • Optionalsymbol?: string

      Alternatively pass one or more comma-separated cryptocurrency symbols. Example: "BTC,ETH". At least one "id" or "slug" or "symbol" is required for this request.

    • Optionaltime_end?: string

      Timestamp (Unix or ISO 8601) to stop returning OHLCV time periods for (inclusive). Optional, if not passed we'll default to the current time. Only the date portion of the timestamp is used for daily OHLCV so it's recommended to send an ISO date format like "2018-09-19" without time.

    • Optionaltime_period?: string

      Time period to return OHLCV data for. The default is "daily". If hourly, the open will be 01:00 and the close will be 01:59. If daily, the open will be 00:00:00 for the day and close will be 23:59:99 for the same day. See the main endpoint description for details.

    • Optionaltime_start?: string

      Timestamp (Unix or ISO 8601) to start returning OHLCV time periods for. Only the date portion of the timestamp is used for daily OHLCV so it's recommended to send an ISO date format like "2018-09-19" without time.