Portfolio API Documentation
Complete guide to integrating ACIS AI-powered portfolio generation into your applications
Overview
The ACIS Portfolio API allows you to programmatically access AI-powered portfolio recommendations. Our API uses machine learning models trained on decades of market data to provide institutional-grade portfolio management.
Secure
SHA-256 hashed API keys with optional expiration
Reliable
99.9% uptime SLA with 24/7 monitoring
Fast
Average response time under 500ms
Python SDKNew
The easiest way to integrate ACIS into your Python applications. Install via pip and start generating AI-powered portfolios in minutes.
Installation
pip install acis-trading
Quick Start
from acis_trading import ACISClient
client = ACISClient(api_key="acis_pk_your_api_key_here")
# Generate a value portfolio
portfolio = client.generate_portfolio(
strategy="value",
max_positions=20,
risk_tolerance="moderate"
)
for position in portfolio["positions"]:
print(f"{position['ticker']}: {position['weight']:.1%}")8 Strategies
Value, Growth, Dividend, Adaptive & more
Type Hints
Full typing for IDE autocomplete
Error Handling
Built-in rate limit & retry logic
Authentication
All API requests require an API key sent in the X-API-Key header.
curl -X POST https://api.acis-trading.com/v1/portfolios/generate \
-H "X-API-Key: acis_pk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"strategy": "adaptive",
"market_cap": "all",
"risk_tolerance": "moderate",
"max_positions": 20
}'Security Note: Never expose your API key in client-side code or public repositories. Store it securely as an environment variable.
API Endpoints
POST/v1/portfolios/generate
Generate a new AI-powered portfolio based on your investment preferences.
Request Body
{
"strategy": "dividend|adaptive|value|growth|value_largecap|growth_largecap|value_smallcap|growth_smallcap",
"market_cap": "large|mid|small|all|auto",
"risk_tolerance": "conservative|moderate|aggressive",
"max_positions": 20
}Response
{
"portfolio_id": "uuid",
"strategy": "adaptive",
"risk_level": "moderate",
"positions": [
{
"ticker": "AAPL",
"company_name": "Apple Inc.",
"weight": 0.08,
"price": 189.50,
"sector": "Technology"
},
// ... more positions
],
"performance_metrics": {
"expected_return": 0.12,
"sharpe_ratio": 1.2,
"volatility": 0.16
},
"generated_at": "2025-11-27T12:00:00Z",
"model_used": "adaptive_allcap"
}GET/v1/user/portfolios
Retrieve all AI portfolios for the authenticated user based on their subscription tier.
Response
{
"portfolios": [
{
"strategy_type": "dividend_strategy",
"display_name": "Dividend Income",
"positions": [
{
"ticker": "JNJ",
"weight": 0.10,
"current_price": 155.20,
"sector": "Healthcare"
}
],
"position_count": 10,
"current_value": 102450.00,
"your_return": 0.0245,
"subscribed_at": "2025-11-20T10:00:00Z"
}
]
}Stock Analysis APINew
Analyze any stock instantly. For tracked stocks (~2,000), get ML predictions and fundamentals. For untracked stocks, get Claude AI analysis with real-time web search.
GET/v1/stock-analysis/:ticker
Get ML-powered analysis for any stock. Returns predictions for tracked stocks or basic info for untracked stocks.
// Response for tracked stock (AAPL)
{
"ticker": "AAPL",
"is_tracked": true,
"company_name": "Apple Inc.",
"sector": "ELECTRONIC COMPUTERS",
"current_price": 271.86,
"ml_score": 55.6,
"ml_rank": 214,
"universe_size": 1964,
"signal": "HOLD",
"pe_ratio": 36.02,
"roe": 1.52,
"dividend_yield": 0.0038,
"market_cap": 4035126477240,
"volatility_20d": 0.134,
"portfolio_holdings": [
{"strategy": "growth_largecap_strategy", "strategy_display": "Large-Cap Growth", "weight": 0.0202}
],
"analysis_date": "2026-01-02T15:00:00Z",
"is_authenticated": true
}Rate Limit: Anonymous users limited to 5 requests/hour. Authenticated users unlimited.
POST/v1/stock-analysis/:ticker/claude
Get Claude AI analysis with real-time web search. Works for any stock, including those not in our ML tracking universe.
// Response
{
"ticker": "OKLO",
"analysis": "## OKLO Stock Analysis\n\n**Current Price:** $71.76\n**Market Cap:** $11.21B\n\n**Recent News:**\n- DOE approved preliminary safety analysis...\n- Siemens Energy contract announced...\n\n**Analyst Sentiment:** Buy consensus, $130 avg target",
"disclaimer": "This analysis is generated by Claude AI using web search. It is not based on ACIS ML models.",
"generated_at": "2026-01-02T15:10:00Z"
}POST/v1/stock-analysis/bulkGrowth+
Analyze multiple stocks at once (up to 50). Requires Growth tier or higher. Returns ML predictions, rankings, and portfolio presence for each ticker.
// Request
{
"tickers": ["AAPL", "MSFT", "GOOGL", "NVDA", "TSLA"]
}
// Response
{
"results": [
{
"ticker": "AAPL",
"is_tracked": true,
"company_name": "Apple Inc.",
"current_price": 271.86,
"ml_score": 55.6,
"ml_rank": 214,
"universe_size": 1964,
"signal": "HOLD",
"portfolio_holdings": [{"strategy": "growth_largecap_strategy", "weight": 0.02}]
},
{
"ticker": "OKLO",
"is_tracked": false,
"company_name": "Oklo Inc.",
"current_price": 71.76,
"note": "Not in ML tracking universe - use Claude analysis for insights"
}
],
"total_requested": 5,
"total_analyzed": 5
}Note: Untracked stocks return basic pricing from Polygon API. Use the Claude analysis endpoint for AI insights on untracked stocks.
Strategy & Returns API
Access AI-managed portfolios and track your personalized returns. Portfolios are automatically assigned based on your subscription tier (2-8 strategies). Position changes are made surgically (1-3 positions per day max) by our ML models.
GET/v1/user/strategy/available
List strategies available to you based on your subscription tier.
// Response
{
"strategies": [
{
"strategy_type": "dividend_strategy",
"display_name": "Dividend Income",
"description": "Conservative income-focused portfolio with high-yield dividend stocks",
"tier_required": "starter"
},
{
"strategy_type": "adaptive_strategy",
"display_name": "Adaptive Growth",
"description": "Dynamic portfolio that adapts to market conditions",
"tier_required": "starter"
},
{
"strategy_type": "value_strategy",
"display_name": "Value Investing",
"description": "Undervalued stocks with strong fundamentals",
"tier_required": "growth"
}
// ... more strategies based on tier
]
}GET/v1/user/portfolios/:strategy_type/returns
Get your personalized returns for a specific strategy, calculated from your subscription date.
// Response
{
"strategy_type": "dividend_strategy",
"subscribed_at": "2025-11-20T10:00:00Z",
"initial_value": 100000.00,
"current_value": 102450.00,
"your_return": 0.0245,
"your_return_dollar": 2450.00,
"days_subscribed": 30,
"annualized_return": 0.2156,
"benchmark_spy_return": 0.018,
"alpha": 0.0065
}GET/v1/user/portfolio/returns-summary
Get a summary of returns across all your subscribed strategies.
// Response
{
"total_strategies": 4,
"strategies": [
{
"strategy_type": "dividend_strategy",
"display_name": "Dividend Income",
"your_return": 0.0245,
"days_subscribed": 30
},
{
"strategy_type": "adaptive_strategy",
"display_name": "Adaptive Growth",
"your_return": 0.0312,
"days_subscribed": 30
}
],
"average_return": 0.0278
}GET/v1/user/portfolios/position-changes
Get recent position changes across all your subscribed strategies.
// Response
{
"changes": [
{
"change_id": "uuid",
"strategy_type": "dividend_strategy",
"change_date": "2025-11-26T16:00:00Z",
"change_type": "replace",
"old_ticker": "XOM",
"old_weight": 0.08,
"new_ticker": "CVX",
"new_weight": 0.08,
"reason": "ML score improvement: 0.32 → 0.58"
}
],
"total_changes": 5
}POST/v1/portfolio/analyze-risk
Analyze portfolio positions against your selected risk tolerance level.
// Request
{
"positions": [
{"ticker": "AAPL", "weight": 0.15},
{"ticker": "NVDA", "weight": 0.10}
],
"risk_level": "moderate" // conservative, moderate, aggressive
}
// Response
{
"risk_level": "moderate",
"is_compliant": false,
"violations": [
{
"ticker": "NVDA",
"violation_type": "volatility",
"current_value": 39.0,
"limit_value": 35.0,
"severity": "warning",
"description": "NVDA volatility (39.0%) exceeds moderate limit (35%)",
"suggested_replacement": "AAPL"
}
],
"recommendations": ["Consider replacing 1 high-volatility position"]
}GET/v1/market/regime
Get the current market regime classification (bullish, bearish, neutral).
// Response
{
"regime": "bullish",
"confidence": 0.82,
"updated_at": "2025-11-27T09:30:00Z",
"indicators": {
"trend": "uptrend",
"volatility": "low",
"momentum": "positive"
}
}Rate Limits
| Tier | Monthly Limit | Per Minute | Burst Limit |
|---|---|---|---|
| API Pro | 100,000 requests | 60 requests | 100 requests |
Rate limit headers are included in all API responses: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.
Code Examples
JavaScript / Node.js
const axios = require('axios');
const API_KEY = 'acis_pk_your_api_key_here'; // Or use process.env.ACIS_API_KEY
const API_URL = 'https://api.acis-trading.com/v1';
async function generatePortfolio() {
try {
const response = await axios.post(
`${API_URL}/portfolios/generate`,
{
strategy: 'adaptive',
market_cap: 'all',
risk_tolerance: 'moderate',
max_positions: 20
},
{
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
}
}
);
console.log('Portfolio generated:', response.data);
return response.data;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
generatePortfolio();Python
import requests
API_KEY = 'acis_pk_your_api_key_here' # Or use os.getenv('ACIS_API_KEY')
API_URL = 'https://api.acis-trading.com/v1'
def generate_portfolio():
headers = {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
}
payload = {
'strategy': 'adaptive',
'market_cap': 'all',
'risk_tolerance': 'moderate',
'max_positions': 20
}
response = requests.post(
f'{API_URL}/portfolios/generate',
json=payload,
headers=headers
)
if response.status_code == 200:
portfolio = response.json()
print('Portfolio generated:', portfolio)
return portfolio
else:
print('Error:', response.json())
return None
generate_portfolio()Ready to Get Started?
Contact our sales team to get your API key and start building with ACIS today.
Contact Sales