Developer Portal

API Documentation

Integrate AmpFi's Trading Strategy API into your applications

Real-time predictionsMulti-timeframe analysisConfidence scoring
View Pricing

Overview

The AmpFi Trading Strategy API provides programmatic access to our institutional-grade trading strategy predictions. Get real-time trading signals, multi-timeframe analysis, and confidence scoring for any supported trading pair.

Real-time Predictions

Get up-to-date trading strategy predictions with confidence scores and risk assessments for any supported trading pair.

Multi-timeframe Analysis

Access predictions across multiple timeframes (1h, 4h, daily) with price targets, support, and resistance levels.

Confidence Scoring

Each prediction includes confidence scores and validation metrics to help you make informed trading decisions.

Staleness Detection

Built-in staleness detection ensures you know when predictions may need updating, helping you avoid trading on outdated signals.

Value Proposition

Access $50M institutional infrastructure via API. The same technology used by hedge funds and institutional traders is now available through a simple REST API.Expert plan required.

Use Cases

The AmpFi API can be integrated into various applications and workflows. Here are some common use cases:

Custom Trading Dashboards

Build your own trading dashboard that displays real-time predictions, confidence scores, and market analysis for multiple trading pairs.

Dashboard Integration

Automated Trading Bots

Integrate AmpFi predictions into your existing trading bots to enhance decision-making with institutional-grade signals.

Bot Integration
Learn how to integrate with CryptoHopper, 3Commas, Pionex, Bitsgap, and TradingView

Portfolio Management Tools

Use API predictions to inform portfolio allocation decisions and risk management strategies across multiple assets.

Portfolio Tools

Research & Analysis

Access historical and real-time predictions for research, backtesting, and market analysis purposes.

Research Tools

Complete Integration Guide

New to API integration? Our comprehensive guide walks you through integrating AmpFi Strategy API with popular trading automation platforms including CryptoHopper, 3Commas, Pionex, Bitsgap, and TradingView. Includes step-by-step instructions, complete code examples, and best practices.

Read Integration Guide

Getting Started

Follow these steps to get your API token and start making requests:

1

Login to Dashboard

Visit https://winu.ampfi.app and log in to your account.

2

Navigate to Settings

Go to the Settings page from your dashboard menu.

3

API Credentials Section

Find the "API Credentials" section in Settings.

4

Generate Bearer Token

Click "Generate Token" to create your API bearer token. Store it securely.

Note: API access requires an Expert plan subscription. Upgrade your plan to access the API.

Quick Start Example

cURL
curl -X GET "https://rose.ampfi.app/api/v1/public/strategy/BTCUSDT" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"

Need help integrating with trading platforms? Check out our comprehensive guide on integrating with CryptoHopper, 3Commas, Pionex, Bitsgap, and TradingView.

View Integration Guide

Authentication

The AmpFi API uses Bearer token authentication. Include your bearer token in the Authorization header of every request.

Base URL

Base URL
https://rose.ampfi.app

Header Format

HTTP Header
Authorization: Bearer <your-bearer-token>

Example Request

cURL
curl -X GET "https://rose.ampfi.app/api/v1/public/strategy/BTCUSDT" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"

Security Best Practices

  • Never commit tokens to version control
  • Use environment variables to store tokens
  • Rotate tokens regularly for enhanced security
  • Store tokens securely and limit access
  • Use HTTPS for all API requests

API Endpoint

GET/api/v1/public/strategy/:symbol

Get trading strategy predictions for a specific trading symbol.

Path Parameters

symbolRequired

Trading symbol in exchange format (e.g., BTCUSDT, ETHUSDT, TRUMPUSDT)

Format Requirements:

  • Uppercase letters only
  • No slashes or separators
  • Must match exchange symbol format

Examples:

BTCUSDTETHUSDTTRUMPUSDT

Query Parameters

currentPriceOptional

Current price of the symbol. If not provided, the price will be fetched from the exchange.

When to use:

Use this parameter when you have real-time price data from your own source and want to ensure the API uses the most current price.

Format:

Number (decimal format, e.g., 45000.50)

Request Examples

cURL
# Basic request
curl -X GET "https://rose.ampfi.app/api/v1/public/strategy/BTCUSDT" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
 
# With currentPrice parameter
curl -X GET "https://rose.ampfi.app/api/v1/public/strategy/BTCUSDT?currentPrice=45000.50" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"

Rate Limiting

Rate limiting information will be available soon. For enterprise rate limits, please contact support.

Response Format

All successful responses return a JSON object containing the trading symbol and comprehensive strategy information.

Example Response (TRUMPUSDT)

Response Explorer

Click to expand nested objects and arrays

Response Fields

Error Handling

The API uses standard HTTP status codes to indicate success or failure. All error responses include a JSON object with error details.

Unauthorized

Invalid or Missing Bearer Token

The bearer token is missing, invalid, or expired.

JSON
{
"error": "Invalid bearer token",
"code": "INVALID_BEARER_TOKEN"
}

Troubleshooting:

  • Verify your bearer token is correct
  • Check that the Authorization header format is correct
  • Ensure your token hasn't expired
  • Regenerate your token if needed
Forbidden

Expert Plan Required

Your account does not have an Expert plan subscription required for API access.

JSON
{
"error": "Expert plan required",
"code": "EXPERT_PLAN_REQUIRED",
"message": "This endpoint is only available to users with an expert plan subscription"
}

Solution:

Upgrade to Expert plan to access the API.

Bad Request

Symbol Not Found

The requested symbol is not available on any of your configured exchanges.

JSON
{
"error": "Symbol not found in configured exchanges",
"message": "Symbol BTC/USDT is not available on any of your configured exchanges."
}
Bad Request

Insufficient Historical Data

The symbol does not have enough historical data to generate predictions.

JSON
{
"error": "Insufficient historical data",
"message": "Symbol BTC/USDT does not have enough historical data (minimum 208 days required)"
}
Bad Request

Invalid currentPrice Parameter

The currentPrice query parameter is not a valid number.

JSON
{
"error": "Invalid currentPrice parameter"
}
Not Found

No Prediction Available

No prediction is currently available for the requested symbol.

JSON
{
"error": "No prediction found for BTC/USDT",
"generationRequested": false
}
Internal Server Error

Server Error

An internal server error occurred while processing your request.

JSON
{
"error": "Failed to generate trading strategy"
}

Troubleshooting:

  • Retry the request after a few moments
  • Check our status page for service updates
  • Contact support if the issue persists

Error Handling Example

JavaScript
try {
const response = await fetch(
'https://rose.ampfi.app/api/v1/public/strategy/BTCUSDT',
{
headers: {
'Authorization': 'Bearer YOUR_BEARER_TOKEN'
}
}
);
 
if (!response.ok) {
const error = await response.json();
if (response.status === 401) {
console.error('Invalid token:', error);
// Handle token refresh or re-authentication
} else if (response.status === 403) {
console.error('Expert plan required:', error);
// Redirect to pricing page
} else if (response.status === 404) {
console.error('Symbol not found:', error);
// Handle symbol not available
} else {
console.error('API error:', error);
}
return;
}
 
const data = await response.json();
console.log('Strategy data:', data);
} catch (error) {
console.error('Network error:', error);
}

Code Examples

Real-world examples showing how to integrate the AmpFi API into your applications.

Example 1: Basic Request

Simple request to get strategy for a trading pair.

JavaScript
async function getStrategy(symbol) {
const response = await fetch(
`https://rose.ampfi.app/api/v1/public/strategy/${symbol}`,
{
headers: {
'Authorization': `Bearer ${process.env.AMPFI_API_TOKEN}`
}
}
);
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
return await response.json();
}
 
// Usage
const strategy = await getStrategy('BTCUSDT');
console.log('Signal:', strategy.strategy.signal);
console.log('Confidence:', strategy.strategy.confidence);

Example 2: Request with Current Price

Include current price when you have real-time price data from another source.

JavaScript
async function getStrategyWithPrice(symbol, currentPrice) {
const url = new URL(
`https://rose.ampfi.app/api/v1/public/strategy/${symbol}`
);
url.searchParams.append('currentPrice', currentPrice.toString());
const response = await fetch(url, {
headers: {
'Authorization': `Bearer ${process.env.AMPFI_API_TOKEN}`
}
});
return await response.json();
}
 
// Usage with real-time price
const currentPrice = 45000.50; // From your price feed
const strategy = await getStrategyWithPrice('BTCUSDT', currentPrice);

Example 3: Response Parsing

Parse and use the response data in your application.

JavaScript
async function parseStrategy(symbol) {
const response = await fetch(
`https://rose.ampfi.app/api/v1/public/strategy/${symbol}`,
{
headers: {
'Authorization': `Bearer ${process.env.AMPFI_API_TOKEN}`
}
}
);
const data = await response.json();
const strategy = data.strategy;
// Extract key information
return {
symbol: data.symbol,
signal: strategy.signal,
regime: strategy.regime,
confidence: strategy.confidence,
entryPrice: strategy.entry_price,
targetPrice: strategy.target_price,
stopLoss: strategy.stop_loss,
isStale: strategy.staleness?.is_stale || false,
reason: strategy.reason
};
}
 
// Usage
const parsed = await parseStrategy('BTCUSDT');
if (parsed.signal === 'buy' && parsed.confidence > 0.7) {
console.log('High confidence buy signal!');
console.log('Entry:', parsed.entryPrice);
console.log('Target:', parsed.targetPrice);
console.log('Stop Loss:', parsed.stopLoss);
}