Skip to main content

Fetching market data with KNIME

Introduction

KNIME is an excellent tool for data analytics and integration, offering a user-friendly, node-based interface to design and automate data workflows.

Its capabilities encompass data preprocessing, transformation, analysis, machine learning, and visualization, making it versatile for a wide range of data-related tasks.

By seamlessly integrating with our REST API, you gain the ability to fetch comprehensive market data, providing you with the power to conduct in-depth research, formulate effective trading strategies, manage portfolios, and make informed, data-driven decisions in the dynamic cryptocurrency market.

Prerequisites

Creating KNIME workflow to get BTC exchange rates

If you have properly installed KNIME on your computer and obtained the CoinAPI key, we can start by preparing a workflow.

Workflow refers to the visual representation of a data analysis process.
It typically consists of nodes (also known as steps or tasks) connected in a specific sequence, where each node performs a specific operation on the data.

Here's an example of two nodes connected:

  1. Get Request (sends an HTTP GET request to a specified URL, typically an API endpoint like rest.coinapi.io/v1/exchangerate/BTC)
  2. Output JSON (receives the JSON data obtained from the API response and presents it in a structured format)

Using this example, you can download data and view it within the Output JSON block.

KNIME exchange rates

Each node result may be easily previewed:

KNIME preview

Here's an output of the Get Request node:

KNIME preview - get request node

Here's an output of the Output JSON node:

KNIME preview - output json node

Configuring GET Request in KNIME

To configure a GET Request block, click Configure:

Configuring block

In the Connection Settings tab, enter the URL of the resource you want to retrieve, e.g https://rest.coinapi.io/v1/exchangerate/BTC:

Configuring Get Request block - url

In the Request Headers tab, enter the X-CoinAPI-Key header with the API key you have obtained via the website.

Configuring Get Request block - auth header

Summary

Simple but also more complex workflows can be designed, enabling advanced operations like filtering, grouping, and utilizing your own Python scripts, culminating in the option to save the processed data in various formats such as CSV, Excel, or others.

KNIME together with our Market Data API allows users to analyze market finance data for tasks like machine learning, data analysis, generating charts, optimizing portfolios, managing risks, backtesting trading strategies, and more.

Configuring Get Request block - auth header

Embrace the world of market data analysis!