Twelve Data

Stock, Forex, and Crypto Market Data APIs

Integrate the Twelve Data API with the Python API

Setup the Twelve Data API trigger to run a workflow which integrates with the Python API. Pipedream's integration platform allows you to integrate Twelve Data and Python remarkably fast. Free for developers.

Run Python Code with the Python API

Write Python and use any of the 350k+ PyPi packages available. Refer to the Pipedream Python docs to learn more.

Try it

Overview of Twelve Data

The Twelve Data API is a powerful and flexible tool that enables you to quickly
access real-time and historical market data from global exchanges. With this
tool, you can build:

  • Custom charts for any financial and market data, with tools to compare the
    data points side-by-side.
  • Technical analysis tools such as trend lines and indicators, and
  • Automated trading platforms and monitoring solutions to detect market trends
    and important data points.

The Twelve Data API provides access to real-time and historical market data for
numerous exchanges and asset types including stocks, commodities, currencies,
cryptocurrencies, indices, options, and more. It also supports streaming data
via WebSocket or HTTP.

Here are some examples of what you can build with Twelve Data API:

  • Data-driven apps such as portfolio analysis and tracking, investment
    simulation and manipulation, and real-time position management.
  • Real-time alerting systems that track traders’ positions and send
    notifications in the event of a key market move.
  • Indicator and trading system analysis to detect patterns and trends in the
  • Algorithmic trading systems or models to automate or optimize trades based on
    various criteria.
  • A mobile app for quickly and easily monitoring market data on the go.
  • A web-based platform for visualizing and analyzing financial data.
  • A chatbot for providing financial advice and portfolio management.

Connect Twelve Data

import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    twelve_data: {
      type: "app",
      app: "twelve_data",
  async run({steps, $}) {
    return await axios($, {
      url: ``,
      headers: {
        "Authorization": `apikey ${this.twelve_data.$auth.api_key}`,

Overview of Python

Python API on Pipedream offers developers to build or automate a variety of
tasks from their web and cloud apps. With the Python API, users are able to
create comprehensive and flexible scripts, compose and manage environment
variables, and configure resources to perform a range of functions.

By using Pipedream, you can easily:

  • Create automated workflows that run on a specific schedule
  • Compose workflows across various apps and services
  • React to events in cloud services or form data
  • Automatically create content and notifications
  • Construct classifications and predictions
  • Analyze and react to sentiment, sentiment analysis and sentiment score
  • Connect backends to the frontend with serverless functions
  • Work with files and databases
  • Perform web requests and fetch data
  • Integrate third-party APIs into your apps
  • Orchestrate data processing tasks and pipelines
  • Create powerful application APIs with authentication and authorization
  • Design CI/CD pipelines and Continuous Delivery services
  • Connect databases like MongoDB and MySQL
  • Monitor connections and events
  • Generate alerts and notifications for corresponding events

Connect Python

def handler(pd: "pipedream"):
  # Reference data from previous steps
  # Return data for use in future steps
  return {"foo": {"test":True}}