Fetching Market Data with Knime

Fetching market data with KNIME

In this article

Creating KNIME workflow to get BTC exchange rates
Configuring GET Request in KNIME


KNIME (opens in a new tab) 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.


Creating KNIME workflow to get BTC exchange rates

If you have properly installed KNIME on your computer and obtained 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 together:

  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 Get Request node:

KNIME preview - get request node

Here's an output of Output JSON node:

KNIME preview - output json node

Configuring GET Request in KNIME

To configure a GET Request block, click Configure:

Configuring block

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

Configuring Get Request block - url

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

Configuring Get Request block - auth header


Simple but also more complex workflows can be designed, enabling advanced operations like filtering, grouping, 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!

Copyright 2022 COINAPI LTD or its affiliates. All rights reserved.