Skip to content
Marketstack logo

Connectors / Data and analytics · HTTP Connector

Marketstack integration and API

Marketstack is a stock market data API from APILayer that returns end-of-day, intraday and historical prices for tens of thousands of tickers worldwide.

What can you do with Marketstack on Tray.ai?

Marketstack is a stock market data API from APILayer that returns end-of-day, intraday and historical prices for tens of thousands of tickers worldwide. Tray.ai connects to Marketstack through the HTTP Connector, so your workflows can call the Marketstack API alongside the rest of your stack.

  • Get end-of-day prices each evening and load them into your data warehouse.
  • Get ticker dividends and share upcoming payouts with your finance team.
  • Get latest intraday prices to refresh the market panel on your internal dashboard.
Connects through
HTTP Connector
Authentication
An API key in the query string
Base URL
https://api.marketstack.com/v2

Set it up

Connect Marketstack to Tray.ai

Each step uses Marketstack's own API details, from its documentation.

Save Marketstack's API key

Save the key as a Tray.ai authentication and add it to the query string from $.auth, so it never sits in the workflow itself.

Point the HTTP Client at the API

Add an HTTP Client step and use https://api.marketstack.com/v2 as the base URL. Or paste a cURL example from Marketstack's API docs, and Tray.ai fills in the method, URL, and headers.

Start with “Get end-of-day prices”

It's one of 13 documented actions, under End-of-day prices. The response comes back as data the next step can map into your other apps.

Hand it to an AI agent

Wrap “Get latest end-of-day prices” and “Get intraday prices” in workflows, and Tray.ai's Agent Gateway for MCP publishes them as governed tools Claude and other AI agents can call.

Workflows to build with Marketstack

Connect Marketstack with Snowflake and Google Sheets

Each one uses actions and events from Marketstack's own API documentation.

Load end-of-day stock prices into Snowflake

When

On a schedule

Then

  1. Get latest end-of-day prices for tracked tickers
  2. Load the prices into a market data table in Snowflake

With Snowflake

Track dividends in Google Sheets

When

On a schedule

Then

  1. List dividends for portfolio tickers
  2. Add new dividends to the portfolio tracker in Google Sheets

With Google Sheets

Apps you can build on Marketstack data

Internal tools your team can build with an AI assistant, each one using Marketstack calls from its API documentation.

Portfolio price tracker

Shows the latest end-of-day and intraday prices for a list of tickers the finance team follows.

Dividend and split calendar

Lists dividends and stock splits for tracked tickers so an investor relations team can plan around them.

Marketstack MCP server for AI agents

Build an MCP server on Marketstack in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • Get end-of-day prices
  • Get intraday prices
  • List tickers
  • List exchanges
  • List stock splits
  • Get latest end-of-day prices
  • Get latest intraday prices
  • Get a ticker

What the Marketstack API covers

5 resources and 13 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how. New to APIs? Read what an API integration is.

End-of-day prices

  • Get end-of-day prices
  • Get latest end-of-day prices

Intraday prices

  • Get intraday prices
  • Get latest intraday prices

Tickers

  • List tickers
  • Get a ticker
  • Get ticker dividends
  • Get ticker splits

Exchanges

  • List exchanges
  • Get exchange end-of-day prices
  • Get exchange intraday prices

Corporate actions

  • List stock splits
  • List dividends

Checked against Marketstack's own documentation on 2026-10-22

docs.apilayer.com/marketstack/docs/marketstack-api-v2-v-2…

Frequently asked questions

What can a Tray.ai workflow do in Marketstack?

The Marketstack API documents 13 actions across 5 resources (End-of-day prices, Intraday prices, Tickers, Exchanges, Corporate actions). For example: Get end-of-day prices; Get intraday prices; List tickers. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Marketstack?

The Marketstack API uses an API key in the query string. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

See Marketstack working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great, a couple more details

This helps us connect you with the right person. Optional, and you can skip it.