API Documentation
Access your portfolio data, trading signals, and analytics programmatically. Build custom dashboards, automate workflows, or integrate uptogAIn into your existing tools.
Overview
The uptogAIn API is a RESTful interface that lets you access your portfolio data, AI trading signals, market prices, and analytics programmatically. All responses are JSON-encoded. API access is available on Pro and Premium plans.
Authentication
Authenticate every request by including your API key in the x-api-key header. You can generate and manage API keys from your Dashboard → Settings → API Keys.
curl -X GET https://www.uptogain.com/api/v1/portfolio \
-H "x-api-key: utg_live_abc123def456"API access requires a Pro plan or higher. Keep your key secret and never expose it in client-side code.
Base URL
https://www.uptogain.com/api/v1All endpoint paths in this documentation are relative to this base URL.
Endpoints
/portfolioReturns an overview of the authenticated user's portfolio including total value, daily P&L, and allocation breakdown.
Request
curl -X GET https://www.uptogain.com/api/v1/portfolio \
-H "x-api-key: your_api_key"Response
{
"total_value": 125430.50,
"daily_pnl": 1243.20,
"daily_pnl_pct": 1.01,
"currency": "USD",
"allocations": {
"crypto": 45.2,
"stocks": 38.5,
"forex": 16.3
},
"updated_at": "2026-04-07T14:30:00Z"
}/portfolio/assetsReturns a list of all assets in the portfolio with current value, quantity, and cost basis.
Request
curl -X GET https://www.uptogain.com/api/v1/portfolio/assets \
-H "x-api-key: your_api_key"Response
{
"assets": [
{
"symbol": "BTC",
"name": "Bitcoin",
"quantity": 1.25,
"avg_cost": 62400.00,
"current_price": 68750.00,
"market_value": 85937.50,
"unrealized_pnl": 7937.50,
"asset_class": "crypto"
}
],
"total_assets": 12
}/portfolio/performanceReturns historical performance metrics including returns, Sharpe ratio, max drawdown, and win rate.
Request
curl -X GET "https://www.uptogain.com/api/v1/portfolio/performance?period=30d" \
-H "x-api-key: your_api_key"Response
{
"period": "30d",
"total_return": 8.42,
"sharpe_ratio": 1.85,
"max_drawdown": -3.21,
"win_rate": 68.5,
"total_trades": 47,
"best_trade": 4.12,
"worst_trade": -1.87
}/signalsReturns the latest AI-generated trading signals with confidence scores, strategy names, and recommended actions.
Request
curl -X GET "https://www.uptogain.com/api/v1/signals?limit=10" \
-H "x-api-key: your_api_key"Response
{
"signals": [
{
"id": "sig_abc123",
"symbol": "ETH",
"action": "BUY",
"confidence": 0.87,
"strategy": "Smart Money - Order Blocks",
"entry_price": 3420.00,
"stop_loss": 3350.00,
"take_profit": 3580.00,
"created_at": "2026-04-07T14:15:00Z"
}
],
"total": 48,
"has_more": true
}/signals/:idReturns full details for a specific signal including the AI reasoning, contributing strategies, and confluence score.
Request
curl -X GET https://www.uptogain.com/api/v1/signals/sig_abc123 \
-H "x-api-key: your_api_key"Response
{
"id": "sig_abc123",
"symbol": "ETH",
"action": "BUY",
"confidence": 0.87,
"strategy": "Smart Money - Order Blocks",
"explanation": "Bullish order block detected at $3,400 with strong volume confirmation. ML regime model indicates trending market. 5 of 7 debate agents agreed on long entry.",
"contributing_strategies": [
"Order Blocks",
"Market Structure",
"RSI Divergence"
],
"confluence_score": 0.82,
"entry_price": 3420.00,
"stop_loss": 3350.00,
"take_profit": 3580.00,
"risk_reward": 2.29,
"created_at": "2026-04-07T14:15:00Z"
}/market/pricesReturns current market prices, 24h change, and volume for all tracked assets in the portfolio.
Request
curl -X GET "https://www.uptogain.com/api/v1/market/prices?symbols=BTC,ETH,AAPL" \
-H "x-api-key: your_api_key"Response
{
"prices": [
{
"symbol": "BTC",
"price": 68750.00,
"change_24h": 2.34,
"volume_24h": 28500000000,
"high_24h": 69200.00,
"low_24h": 67100.00
}
],
"updated_at": "2026-04-07T14:30:05Z"
}/alertsCreates a new price alert. You will be notified via email or webhook when the target price is reached.
Request
curl -X POST https://www.uptogain.com/api/v1/alerts \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"symbol": "BTC",
"target_price": 70000,
"direction": "above",
"notification": "email"
}'Response
{
"id": "alert_xyz789",
"symbol": "BTC",
"target_price": 70000,
"direction": "above",
"notification": "email",
"status": "active",
"created_at": "2026-04-07T14:32:00Z"
}/tax/summaryReturns tax-loss harvesting opportunities and a summary of realized gains/losses for the current tax year. Premium plan only.
Request
curl -X GET "https://www.uptogain.com/api/v1/tax/summary?year=2026" \
-H "x-api-key: your_api_key"Response
{
"year": 2026,
"realized_gains": 8420.00,
"realized_losses": -2150.00,
"net_gain": 6270.00,
"harvesting_opportunities": [
{
"symbol": "SOL",
"unrealized_loss": -1240.00,
"potential_tax_savings": 310.00
}
],
"estimated_tax_liability": 1567.50
}Rate Limits
Pro Plan
60
requests / minute
Premium Plan
300
requests / minute
Rate-limited responses return HTTP 429 with a Retry-After header indicating how many seconds to wait.
Error Codes
All errors return a consistent JSON structure:
{
"error": {
"code": 401,
"message": "Invalid or missing API key",
"type": "authentication_error"
}
}| Code | Meaning | Description |
|---|---|---|
200 | Success | Request completed successfully |
400 | Bad Request | Invalid parameters or request body |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | API key lacks permission for this endpoint |
404 | Not Found | Resource does not exist |
429 | Rate Limited | Too many requests, slow down |
500 | Server Error | Something went wrong on our end |
SDKs
Official Python and JavaScript SDKs are coming soon.
In the meantime, you can use any HTTP client to interact with the API directly. See the curl examples above for reference.