Introducing EMS Trading API  EMS Trading API

- Unlimited trading accounts in just one place.

How Quix and CoinAPI deploy currency alerting pipeline

featured image

While it’s easy to write an app that does useful things with crypto market data, it can involve tedious busy work. For example, once you’ve programmed all the required steps, you’ll need to find a way to securely deploy and host your app. Luckily, a few platforms out there aim to simplify this part of the process.

Using Quix and CoinAPI for Bitcoin price tracking

Today, we’re going to look at a tool that specializes in helping developers and data engineers deploy real-time data apps and pipelines. It’s called Quix, and it’s a pretty handy tool if you’re working with any kind of volatile market data.

To help you understand how it works, let’s look at a straightforward use case that leverages CoinAPI’s Market Data API: an alerting app that sends an SMS when the price of Bitcoin crosses a specific threshold.

How do Quix and CoinAPI deploy a currency alerting pipeline?

To build this simple alerting app, we’ll need to code the following major functions.

Step 1. Check the Bitcoin price

Poll the CoinAPI market data endpoint for the current Bitcoin price (no less than every 15 minutes if you’re on the free plan).

Step 2. Compare the Bitcoin price with the threshold

See if the Bitcoin price has moved beyond the target price threshold in either direction.

Step 3. Trigger an external notification
Send a message to let you know that the threshold has been met (for example, using an SMS API like Twilio).

We’re going to break down the steps in a bit more detail and look at how you’d create and run them within the Quix platform. But first, it’s important to clarify that in Quix, you write functions in Python (or C#) that interact with Apache Kafka.

Why Python?

The Quix platform runs on the Quix SDK, which enables you to code in Python yet easily interact with Kafka topics. Up until recently, you’d need to know your way around Java before you could work with Apache Kafka, but Quix has built its own SDK so that you code in Python and C#. It’s designed to make Apache Kafka more accessible to data scientists and engineers who are typically more proficient in Python

Why Kafka?

To keep it simple, this example uses our REST API, but more advanced apps often use our Websocket endpoint—which is a constant stream of data. Apache Kafka is still the industry standard for working with data streams, which is why the Quix platform also uses Kafka as its foundation.

Ok, so how would you make these functions work together in the Quix platform? Let’s look at the end result first. What you see here are the 3 functions chained together to form a simple pipeline:

A pipeline view showing three connected stages: "Coin API" (blue), "Threshold Alert" (purple), and "Twilio Alerter" (orange). Each stage displays its running status and resource usage. The stages are connected by arrows, indicating a workflow from left to right.

We’re going to explore a quick way to build each of these functions. Bear in mind that this is not a full tutorial, but rather an overview of how programs are run and deployed in Quix (we’ll link to a more detailed tutorial after the overview).

1. Polling the Market Data endpoint


Quix has an extensive library of Python code templates to bring in data from many external sources—including CoinAPI. You just need to copy the library to your workspace and give it the environment variables that it expects.

These are as follows:

  • The API key that you use to access CoinAPI.
  • The shortcode for the currency that you want to track (e.g. BTC),
  • The shortcodes of the equivalent fiat currencies (USD, GBP).
Setup and deploy interface for Coin API configuration. It shows input fields for Name ("Coin API - Source"), output ("coin-data"), API key (hidden), primary currency (BTC), and secondary currencies (USD,GBP). A blue "Deploy" button is at the bottom.
  1. You’re free to adapt the code however you’d like, but it’s handy to have some boilerplate to get started.
  2. This boilerplate code writes the market data to a preconfigured Kafka topic called “coin-data”.

2. Do the comparison

Quix’s template library also contains a handy function for checking thresholds, so you can just enter your desired threshold and connect it to the incoming price data.

The image contains two main parts. The top half shows a graph with a blue wavy line representing a signal value, a dashed horizontal line for a threshold value, and orange dots indicating alerts where the signal crosses the threshold. The bottom half displays a code editor with Python code visible, focusing on a function that processes signal values and determines inequality sides for threshold alerts.
  • This boilerplate code reads incoming prices from the “coin-data” topic and checks to see if the threshold has been crossed.
  • When the threshold is crossed, the function will write a message to the “coin-alerts” topic.

3. Send the notification with Twilio

Naturally, Quix also has boilerplate code for accessing Twilio. In this case, you enter a few variables related to your Twilio account. Sadly, there’s no easy way to automate the Twilio account creation process, but once you have a Twilio developer account, you can just plug your account details into the Quix UI. These are then saved as environment variables.

Setup and deploy interface for Twilio configuration. It displays input fields for Name ("Twilio - Destination"), input, numbers, account_sid, auth_token, messaging_service_sid, and message_limit (set to 2). A blue "Deploy" button is at the bottom of the form.

The Twilio boilerplate code checks for incoming messages from the “coin-alerts” topic and uses the Twilio API to send an SMS to your phone.

4. Deploying the code as serverless functions

After you’ve finished setting up each step, you click the big blue “deploy” button. Each function then runs in the Quix platform as a serverless function.

Deploy interface for Coin API project. It shows project details, version tag, environment variables, and deployment settings. The deployment type is set to "Service - runs indefinitely and restarts automatically" with CPU, Memory, and Replicas options. Public Access and State Management toggles are visible. The deployment name is set to "Coin" with Deploy and Cancel buttons at the bottom.

The kind of architecture that we’ve outlined here is often called “loosely coupled” architecture. It means that the different parts are not highly dependent on each other. For example, if the Twilio service goes down, the alerts will not fail, they will just be delayed. The “coin-alerts” topic will accumulate messages and the Twilio service will process the message backlog once it comes back online.

How do Quix and CoinAPI deploy a currency alerting pipeline?

We hope this walkthrough gave you a first taste of what the platform can do. Quix is a great match for market data APIs such as CoinAPI. It can handle more complex pipelines and back-end architectures too. You can use Quix’s built-in connectors to bring your data in and send it back out again—to a mobile app, a data warehouse, or an external service. The choice is yours.

For a detailed tutorial on how to build what we just described in this walkthrough, check out this simple video tutorial.

A web interface for setting up the Coin API in a development environment. The left side shows input fields for configuring the API, including name, output, API key, and currency options. The right side displays setup instructions, requirements, and environment variables. The interface includes options to deploy or save as a project. A small profile picture of a man with glasses is visible in the bottom right corner.

Note that it doesn’t contain the threshold checking step, but you can easily add this step from the Quix library. Happy coding!

This is a guest blog post written by Tomas Neubauer and was originally published on Quix.io.

Stay up-to-date with the latest CoinApi News.

Send

I Agree to CoinApi’s Privacy Policy*

Recent Articles

background
Product Features

Ethereum and Bitcoin Price Predictions in 2025 with the new CAPIVIX

Accurate crypto price predictions have always been the holy grail for traders and investors. The launch of CAPIVIX (CoinAPI Volatility...
background
News, New Feature, Product Features

Introducing CAPIVIX: New Real-Time Crypto Volatility Index for BTC and ETH

This index is designed to give you a clear picture of expected 30-day market volatility that updates in near...
background
Crypto Knowledge, Product Features

Ultimate Guide to The Crypto Market Data in 2025

The market in 2024 demonstrated increasing maturity and mainstream acceptance. As more professional organizations invest in...
background
Crypto Knowledge

What Are Altcoins? Top 25 Examples

Altcoins are all cryptocurrencies that are not Bitcoin. The term is a combination of the words "alt", meaning alternative, and "coin". The...
background
Product Features, Crypto Knowledge

Spot Trading - The Easiest Way to Start Investing in Crypto

Spot trading is an investment that involves buying a good at the current market price and selling it when (if) its price rises in the...
background
Product Features

What CoinAPI Offers for Large-Scale Clients

Since cryptocurrencies have evolved into a serious investment vehicle for institutional players, financial companies, hedge funds, and...
background
Product Features

Flat Files S3 API: All You Need to Know

Working with crypto data can be challenging, especially when you need reliable, organized information. CoinAPI's Flat Files S3 API...
background
News

CoinAPI Sponsors QuickNode’s Build On Hackathon

We're super excited to announce that CoinAPI is sponsoring QuickNode's Build On Hackathon 2024 event! It's an amazing opportunity for...
background
News, New Feature

Hyperliquid - A New Decentralized Crypto Exchange Integrated

Hyperliquid is a decentralized cryptocurrency derivatives exchange launched in 2022. It specializes in perpetual futures trading, offering...
background
Product Features, Crypto Knowledge

Crypto Indexes - Everything You Need to Know

Crypto indexes are financial instruments that track the performance of a bundle of cryptocurrencies, similar to stock market indexes like...
background
Crypto Knowledge

Riding the Waves of Cryptocurrency Volatility

Cryptocurrency markets are famous for their rapid swings, making them both thrilling and risky. One second you're going up, next you tip...
background
Product Features

Reducing Latency With Market Data API

Latency can be a significant obstacle in any data-heavy environment. In high-frequency trading, even the smallest delays can make a big...