The MarketTaich API
We offer a convenient API to support automated trading for professional and institutional investors.
Contact us for a custom quote.
Overview
The MarketTaich API returns the MarketTaich portfolio composition as JSON (each ticker and the fraction of the portfolio it represents), along with its daily history, ticker signals and portfolio performance. It is read-only.
API access is by invitation and is separate from the MarketTaich app subscription. To request access, email markettaich@gmail.com.
1. Get an API key
- Once you have been enabled, register with the MarketTaich app (a free account with a verified email).
- Click Get my API key, then Generate new key.
- Copy the key and store it somewhere safe. It is shown only once, and generating a new key replaces the old one. Keep it secret.
2. Call the API
Send your key in the x-api-key header.
Endpoint: GET https://6mxgjp4edg.execute-api.us-east-1.amazonaws.com/v1/b2b/portfolio
curl
curl -H "x-api-key: $MARKETTAICH_API_KEY" \ https://6mxgjp4edg.execute-api.us-east-1.amazonaws.com/v1/b2b/portfolio
Python
import os
import requests
resp = requests.get(
"https://6mxgjp4edg.execute-api.us-east-1.amazonaws.com/v1/b2b/portfolio",
headers={"x-api-key": os.environ["MARKETTAICH_API_KEY"]},
timeout=10,
)
resp.raise_for_status()
print(resp.json()["portfolio"])
Example response
{"portfolio": {"AAPL": 0.35, "MSFT": 0.25, "NVDA": 0.40}}
Fractions sum to about 1; zero weights are omitted. The composition updates on trading days.
Endpoints
All are GET requests under https://6mxgjp4edg.execute-api.us-east-1.amazonaws.com/v1/b2b and use the x-api-key header.
| Path | Returns |
|---|---|
/portfolio | Current composition. ?date=YYYY-MM-DD returns the one recorded on or before that date. |
/portfolio/history | Daily compositions over a period. |
/portfolio/changes | Tickers added, dropped or re-weighted between recorded days. |
/signals/{ticker} | Latest signal (1 buy/hold, 0 close, -1 sell). |
/signals/{ticker}/history | Daily signal history for a ticker. |
/tickers | Tickers tracked (last year), with first/last seen, latest signal and whether held. |
/performance | CAGR, Sharpe, Sortino and max drawdown of the recorded portfolio (default 1 year). |
Range endpoints take period (1W, 1M, 3M, 6M, 1Y, 2Y, 5Y; default 1M) or from/to (YYYY-MM-DD, up to 5 years), for example /portfolio/history?period=3M.
History is recorded daily (signals from the morning) starting when recording began, so earlier dates are not available. Performance is computed from those recorded weights, gross of transaction costs and taxes; "partial": true means the recorded history does not yet cover the whole window.
Status codes
| Status | Meaning |
|---|---|
| 200 | Success: {"portfolio": {"TICKER": fraction, ...}} (or the endpoint’s data) |
| 400 | Invalid period, date or ticker |
| 401 | Missing, invalid or revoked API key |
| 403 | Key is valid but API access is not enabled for this account |
| 404 | No data (unknown ticker, or nothing recorded yet) |
| 429 | Rate limit exceeded; retry with backoff |
Access changes (being enabled or removed) take effect within a few minutes.


