altFINS AI Trade Setups API: Prompts vs Credits Guide

Skip to main content

altFINS AI Trade Setups API: Prompts vs Credits Guide

Last updated: November 19, 2026  |  By altFINS Research Team  |  Reading time: 9 min  |  Level: Beginner to intermediate

Quick answerThe altFINS API returns AI Trade Setups: direction, entry, stop loss, targets, risk/reward, confidence and reasoning. Pre-generated setups (100 new crypto setups every day) cost API credits: one call returns all 100 for 1 credit. Ad hoc setups for any crypto, stock or forex pair and five timeframes cost AI Trade Setup prompts, a separate monthly allowance. Use them from Claude, PowerShell, Python, curl or the altFINS CLI. No MCP server is needed. Keep your API key out of the chat.

Get your API keyRead the endpoint docs

What is an AI Trade Setup?

An AI Trade Setup is a complete trade idea for one asset and one timeframe. The altFINS AI reads trend, momentum, volume, support and resistance, and chart patterns. Then it returns structured data you can use in code. You can also find AI Trade Setups in the altFINS platform. The API gives you the same setups as data, so you can pull them into Claude, a spreadsheet, a bot or your own app.

Field What it contains
setup Direction (LONG, SHORT or NONE), entry, stop loss, two profit targets, risk/reward, confidence
summary One-sentence view of the market
analysis Trend scores, support and resistance, SMA 50 and 200, RSI 14, relative volume, chart pattern note
report Full AI report in Markdown with MACD, volume, rationale and invalidation risks (separate endpoint)

The AI does not force a trade. When the market has no clean setup, the direction is NONE and the summary explains why.

Real example: Bitcoin, daily (November 19, 2026)

Parameter Value
Direction SHORT
Entry $63,829.99 (aligns with current price)
Stop loss $67,500 (-5.8%), just beyond resistance 1
Targets $61,997 (+2.9%) and $57,794 (+9.5%)
Risk / reward 1 : 1.6
Confidence MEDIUM. Strong downtrend with high volume, but RSI is oversold (24.9), so a bounce is possible.

Compare it with live data in the altFINS Crypto Screener and the Technical Analysis pages.

How do AI Trade Setup prompts and API credits work?

Your plan has two separate monthly balances: API credits and AI Trade Setup prompts. Knowing which call uses which one saves you money.

Pre-generated (100 per day) Ad hoc (on demand)
You pay with API credits AI Trade Setup prompts (separate allowance, no API credits)
Endpoint /search-requests /generate
Assets 100 crypto coins, a fixed daily selection Any asset: crypto, stocks and forex
Timeframes Daily only 15 minutes, 1 hour, 4 hours, 12 hours, daily
Freshness Updated once a day, shortly after midnight UTC Generated when you ask (15 to 40 seconds in our tests)
Best for Daily dashboards, bots, newsletters, backtests A specific coin, stock or pair, or a lower timeframe

Cost of each call

Call API credits Prompts
Search stored setups (all 100 in one call) 1 in our tests 0
Get the report of a setup 1 0
Generate a setup 0 1 (even when an existing setup is returned)

A credit is a batch of 100 returned value items, rounded up. That is why one search for 100 setups costs 1 credit.

Remember: a generate call that returns an existing setup (reused: true) still uses one prompt. A pending request (HTTP 202) also counts. Do not retry it.

Check your balance for free

Call GET /api/v2/public/monthly-available-permits. It returns your remaining credits (monthlyAvailablePermits) and prompts (monthlyAvailableAiTradeSetupPrompts) and costs nothing. With the CLI, run af quota all. Your altFINS profile shows the same balances with their reset dates.

Plans and limits

Plan Price API credits / month Ad hoc prompts / month Requests / minute
Basic Free 1K Not included 30
Hobbyist $39 100K 200 30
Startup $99 300K 500 50
Standard $299 1M 1,500 100
Professional $699 3M 2,000 150

Prices are per month. Both balances reset every billing cycle. See the full API pricing table for annual prices.

Free plan note: AI Trade Setups need a paid plan. On the free Basic plan, the AI Trade Setups endpoints return 403. In our test, Basic also returned only the last 30 days of OHLC history, even when we asked for a full year.

Choose your API plan

Keep your API key private

Your API key lets anyone spend your credits and prompts. We do not recommend pasting it into a chat. Anything you paste becomes part of the conversation. Use one of these safer ways. You do not need a new key: use the key from your altFINS profile.

Way How Claude sees the key?
1. PowerShell variable Save the key once on your computer (below) No, if you tell it not to print it
2. altFINS CLI af auth set asks for the key in a hidden field No
3. Download, then upload the file Run the PowerShell script yourself, upload the CSV to Claude No. Claude only gets the data.
4. Text file on your computer Save the key in a file outside your project and cloud folders. Tell Claude never to open it, only to use it inside a command. No, if Claude does not open the file

Save your key in PowerShell

Open PowerShell. Run this once, then close and reopen PowerShell and Claude: (ask your AI tool for more info)

setx ALTFINS_API_KEY "YOUR_KEY"

Check that it is saved, without showing it:

[bool]$env:ALTFINS_API_KEY

True means it is set. To use the key in one window only, run $env:ALTFINS_API_KEY = "YOUR_KEY". It disappears when you close the window. To remove a saved key, run [Environment]::SetEnvironmentVariable("ALTFINS_API_KEY", $null, "User").

Creating a throwaway key and deleting it

For a demo, a screen recording or a test, create a key you will delete afterwards:

  1. Log in to altFINS and open your profile.
  2. Under API, create a new key with Create New API Key.
  3. Use it for your test.
  4. When you are done, delete it with the bin icon next to the key.
If you pasted your key in a chat or showed it on screen: delete that key in your profile right away and create a new one. A deleted key stops working immediately.

Step-by-step guide

1Get your API key

Log in to altFINS, open your profile and copy your key. Send it in the X-API-KEY header on every request. Save it as described above.

2Pull today’s 100 pre-generated crypto setups

curl -H "X-API-KEY: YOUR_KEY" \
  "https://altfins.com/api/v2/public/ai-trade-setup/search-requests?size=100"

The answer is a paged object. The setups are in content, with totalElements, size and number. Without from and to you get the latest UTC day only. For history add from=2026-11-01T00:00:00Z and read more pages with page=1, page=2 and so on. Use createdBy=ME to see the setups you generated yourself.

3Read a full report

curl -H "X-API-KEY: YOUR_KEY" \
  "https://altfins.com/api/v2/public/ai-trade-setup/SETUP_ID/report"

It costs 1 API credit and no prompt. The report is Markdown in the report field. It can contain emoji and small HTML badges, so plan for that when you display it. Setup IDs are shared by all users, so yours will not be consecutive.

4Generate an ad hoc setup (1 prompt)

Choose an asset and a timeframe: MINUTES15, HOURLY, HOURS4, HOURS12 or DAILY.

curl --max-time 70 -H "X-API-KEY: YOUR_KEY" \
  "https://altfins.com/api/v2/public/ai-trade-setup/generate?symbol=BTC&timeInterval=DAILY"
Know before you run it:
• It takes about 12 to 40 seconds, sometimes a minute. Set your client timeout to at least 60 seconds.
• If it is not ready after 45 seconds you get 202 PENDING. Do not send the request again. Find the result with search and createdBy=ME, or read its report by ID.
• Setups you generate in the altFINS platform also appear under createdBy=ME.

5Use it in Python

import os, requests

BASE = "https://altfins.com/api/v2/public/ai-trade-setup"
headers = {"X-API-KEY": os.environ["ALTFINS_API_KEY"]}

# Pre-generated daily setups (API credits, no prompts)
page = requests.get(f"{BASE}/search-requests", headers=headers,
                    params={"size": 100}, timeout=30).json()
for s in page["content"]:
    t = s["setup"]
    print(s["symbol"], t["direction"], t["entry"]["price"],
          t["stopLoss"]["price"], t["riskRewardRatio"], t["confidence"])

# Ad hoc setup (1 prompt)
r = requests.get(f"{BASE}/generate", headers=headers, timeout=70,
                 params={"symbol": "ETH", "timeInterval": "HOURS4"})
print(r.status_code, r.json().get("setup"))

6Use it in PowerShell (Windows, nothing to install)

PowerShell is already on every Windows computer. After saving your key as shown above, check your balance for free:

$h = @{ "X-API-KEY" = $env:ALTFINS_API_KEY }
Invoke-RestMethod -Headers $h -Uri "https://altfins.com/api/v2/public/monthly-available-permits"

Show today’s 100 setups as a table and save them to a CSV file you can open in Excel:

$r = Invoke-RestMethod -Headers $h -Uri "https://altfins.com/api/v2/public/ai-trade-setup/search-requests?size=100"
$t = $r.content | Select-Object symbol,
  @{n="direction";e={$_.setup.direction}},
  @{n="entry";e={$_.setup.entry.price}},
  @{n="stop";e={$_.setup.stopLoss.price}},
  @{n="rr";e={$_.setup.riskRewardRatio}},
  @{n="confidence";e={$_.setup.confidence}}
$t | Format-Table -AutoSize
$t | Export-Csv setups.csv -NoTypeInformation

Generate your own setup (1 prompt):

Invoke-RestMethod -Headers $h -TimeoutSec 70 -Uri "https://altfins.com/api/v2/public/ai-trade-setup/generate?symbol=CS_NVDA&timeInterval=DAILY"

Open the API docs

How do I use the altFINS API in Claude without MCP?

AI Trade Setups are not part of the altFINS MCP server. You do not need MCP. They are plain REST calls, so Claude only needs a way to run a command or a script. The same works in other AI tools, n8n, Make, Google Sheets or your own bot.

Option 1: give Claude the documentation

Paste the link to the altFINS API documentation, or the OpenAPI file, into the chat. Claude then knows every endpoint and parameter. Save your key first as shown above and tell Claude to use the variable, not the key itself.

Read the altFINS API documentation:
https://altfins.com/crypto-market-and-analytical-data-api/documentation/
Use my API key from the environment variable ALTFINS_API_KEY in the
X-API-KEY header. Never print the key. Get today's pre-generated AI
Trade Setups and show a table with symbol, direction, entry, stop loss,
targets, risk/reward and confidence. Do not call generate.

The machine-readable OpenAPI file is in the altFINS CLI repository (folder openapi).

Option 2: use the altFINS CLI (af)

The free altFINS CLI is built for AI agents. AI Trade Setups commands are in version 1.2.0 and newer. Install it, then store your key in a hidden prompt:

winget install --id altfins.af -e --source winget
af --version
af auth set
af quota all

On macOS or Linux use brew install altfins-com/tap/af. Then tell Claude to use af. Claude can read the full command list with af commands -o json.

Command What it does Uses
af setups list --created-by ALTFINS Today’s pre-generated setups API credits
af setups report --id 2135 -o json Full report of one setup 1 credit
af setups generate --symbol SOL --interval DAILY --dry-run Preview the request, nothing is sent Nothing
af setups generate --symbol SOL --interval DAILY --yes Generate a new setup 1 prompt

Generating needs the --yes flag because it spends a prompt. This protects you when an AI agent runs the command.

Option 3: download the data yourself, upload the file

Run the PowerShell script from step 6 and upload setups.csv to Claude. Claude never sees your key, only the data. This is the simplest option if you do not want any AI tool to touch your key.

What to ask Claude

  • Show only LONG setups with risk/reward above 2 and medium or high confidence. Sort by risk/reward.
  • Fetch the full report of the top one. Summarize the risks and what would invalidate it.
  • Check my remaining prompts first. Then generate a daily setup for CS_NVDA.
  • Compare the daily setups for FX_EURUSD and FX_GBPUSD. Which trend is cleaner?
  • Get the last 7 days of pre-generated setups. Which hit target 1 before the stop?

Add “do not call generate” to any request that should not spend prompts.

How can I save AI Trade Setup prompts?

  1. Search first. If your coin is in today’s 100 setups, read it with search. No prompt needed.
  2. Never retry a 202. The setup is still being created. Check it with search or by ID.
  3. Do not repeat the same request. A repeat returns the old setup and still costs a prompt.
  4. Cache results. A daily setup does not change until the next day.
  5. Set a prompt limit in your account settings, so a loop or an AI agent cannot use the whole month in one run.
  6. Ask Claude to check first. Add “check my remaining prompts” or “use –dry-run” to your instruction.

Stocks and forex symbols

Ad hoc setups work for all three markets. Crypto uses the plain ticker. Stocks and forex use a prefix.

Market Symbol format Example
Crypto Ticker symbol=BTC
Stocks CS_ + ticker symbol=CS_NVDA
Forex FX_ + pair symbol=FX_EURUSD

Find the right symbol with af refs symbols --search Apple or the altFINS Screener. Scan markets first and generate setups only for the best candidates.

What else is in the altFINS API?

Your key and credits work for all altFINS API data, not only AI Trade Setups:

Endpoint What you get
Screener data Indicators like RSI and MACD, market cap, price change, with filters
OHLC Latest and historical candles on five timeframes
Analytics Historical indicator values, support and resistance
Signals feed Trading signals with direction and time
Technical analysis, chart patterns, news summary Analyst technical analysis, detected patterns and AI news summaries. These are plan-gated and returned 403 on the free plan.
Reference data Symbols, intervals, signal keys and your remaining credits

Example: one year of daily ETH candles (OHLC) cost 4 to 5 credits in our test. Add ?size=400 to the history request, or you get only 10 rows per page.

Errors

Code Meaning What to do
202 Setup still generating (PENDING) Wait a few seconds, then search or read the report by ID. Do not retry generate.
400 Unknown symbol or unsupported timeframe Check the symbol prefix (CS_, FX_) and the timeframe name.
401 Key missing, invalid or deleted Check the X-API-KEY header. Create a new key if the old one was deleted.
403 Key is valid, but your plan has no access to this endpoint Check that your profile shows an active paid plan. The free Basic plan does not include AI Trade Setups. A cancelled plan can also return 403, even if credits remain.
429 Rate limit, credits or prompts used up. Example text: Monthly AI trade setup prompts exhausted Wait for the reset date, raise your prompt limit or upgrade. Search and reports can still work when only prompts are used up.

FAQ

What is the difference between API credits and AI Trade Setup prompts?

API credits pay for reading data: searching pre-generated setups, reading reports and all other API data. Prompts pay for generating a new ad hoc setup. They are two separate monthly balances and both reset every month.

Do I need an MCP server to use AI Trade Setups?

No. AI Trade Setups are not part of the MCP server. Use the REST API directly, the altFINS CLI or PowerShell. Claude can run all of them for you.

Is it safe to paste my API key into Claude?

We do not recommend it. Anything you paste becomes part of the conversation. Save the key in a PowerShell variable or with af auth set, or use a throwaway key. If you pasted a key, delete it in your profile and create a new one.

How many setups does altFINS publish every day?

100 pre-generated daily setups for crypto, updated shortly after midnight UTC. Older days stay available through search with a date range. For stocks and forex, generate an ad hoc setup.

Which timeframes can I generate?

15 minutes, 1 hour, 4 hours, 12 hours and daily. Pre-generated setups are daily only.

Does a reused setup cost a prompt?

Yes. If you ask again for the same asset and timeframe within a few minutes, you get the existing setup with reused: true, and it still uses one prompt.

Are AI Trade Setups financial advice?

No. They are analysis tools. Always do your own research and manage your risk.

Build with altFINS data

Get your API key and pull your first AI Trade Setup in minutes.

Get API accessInstall the CLIOpen Screener

AI Trade Setups are for information only and are not financial advice. Trading involves high risk.