Phase 4|Developer Mode
Skip to main content
AGI-Hive

API Reference

Complete REST API documentation for AGI-CAD Portfolio

Base URL
https://www.agi-hive.com/api/v1

Authentication

Most API endpoints require authentication. Include your Firebase ID token in the Authorization header:

Authorization: Bearer YOUR_ID_TOKEN

Portfolio

Endpoints for managing and retrieving portfolio data

GET/api/portfolio🔒 Auth Required

Get current portfolio holdings and total value

Response

Portfolio object with holdings array and total value

Alerts

Endpoints for creating and managing price alerts

POST/api/alerts🔒 Auth Required

Create a new price alert

Request Body

FieldTypeRequiredDescription
symbolstringYesCryptocurrency symbol (e.g., BTC)
targetPricenumberYesTarget price in USD
directionstringYesAlert direction: "above" or "below"
notifyViastring[]YesNotification channels

Response

Created alert object

GET/api/alerts🔒 Auth Required

List all price alerts

Parameters

NameTypeRequiredDescription
statusstringNoFilter by status: "active", "triggered", "expired"

Response

Array of alert objects

DELETE/api/alerts/:id🔒 Auth Required

Delete a price alert

Parameters

NameTypeRequiredDescription
idstringYesAlert ID

Response

Success message

Prices

Endpoints for retrieving cryptocurrency price data

GET/api/prices/:symbol

Get current price for a cryptocurrency

Parameters

NameTypeRequiredDescription
symbolstringYesCryptocurrency symbol

Response

Price data object

Exchanges

Endpoints for connecting and managing exchange integrations

POST/api/exchanges/connect🔒 Auth Required

Connect an exchange account

Request Body

FieldTypeRequiredDescription
exchangestringYesExchange name (coinbase, binance, etc.)
apiKeystringYesExchange API key
apiSecretstringYesExchange API secret

Response

Connection status

Rate Limits

Authenticated Requests
1000/hour
Public Endpoints
100/hour

Rate limit headers are included in all responses:X-RateLimit-Limit,X-RateLimit-Remaining

Error Codes

CodeMessageDescription
200OKRequest successful
400Bad RequestInvalid request parameters
401UnauthorizedMissing or invalid auth token
403ForbiddenInsufficient permissions for resource
404Not FoundResource does not exist
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error occurred