Fundamental Insight API

Explore the available endpoints for authentication and stock insights.

Visit Admin for management.

Authentication Endpoints

Security Note: All secondary contacts (email/phone) added during profile completion must be verified via OTP before being saved to prevent fake or unauthorized contact information.
POST

/api/auth/auth/

Phone authentication endpoint - sends OTP via SMS for login/signup.

Body: {
  "phone": "+1234567890"
}

Response: {
  "success": true,
  "message": "OTP sent via SMS.",
  "flow_type": "signup|login",
  "next_step": "verify_otp"
}
POST

/api/auth/verify_otp/

Verify OTP for phone authentication.

Body: {
  "phone": "+1234567890",
  "otp": "123456"
}

Response (Login): {
  "success": true,
  "access_token": "...",
  "refresh_token": "...",
  "user": {...}
}

Response (Signup): {
  "success": true,
  "user_id": "abc-123",
  "next_step": "complete_profile"
}
POST

/api/auth/{user_id}/complete_profile/

Complete profile with names and optional secondary contact (requires verification).

Body (Without secondary contact): {
  "first_name": "John",
  "last_name": "Doe"
}

Body (With secondary contact): {
  "first_name": "John",
  "last_name": "Doe",
  "email": "john@example.com"
}

Response (Direct): {
  "access_token": "...",
  "refresh_token": "...",
  "flow_completed": true
}

Response (Verification required): {
  "next_step": "verify_secondary_contact",
  "contact_type": "email",
  "requires_verification": true
}
POST NEW

/api/auth/{user_id}/verify_secondary_contact/

Verify secondary contact OTP and complete profile.

Body: {
  "contact": "john@example.com",
  "otp": "654321",
  "contact_type": "email"
}

Response: {
  "success": true,
  "message": "Profile completed!",
  "access_token": "...",
  "refresh_token": "...",
  "user": {
    "phone": "+1234567890",
    "phone_verified": true,
    "email": "john@example.com",
    "email_verified": true
  }
}
POST

/api/auth/google_auth/

Google OAuth authentication (no OTP required).

Body: {
  "id_token": "google_id_token..."
}

Response: {
  "success": true,
  "access_token": "...",
  "refresh_token": "...",
  "user": {...}
}
GET

/api/profile/me/

Get current user profile (requires JWT).

Headers: {
  "Authorization": "Bearer {access_token}"
}

Response: {
  "id": "...",
  "phone": "+1234567890",
  "email": "john@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "phone_verified": true,
  "email_verified": true
}
PATCH

/api/profile/update_profile/

Update current user profile (requires JWT).

Body: {
  "first_name": "Jane",
  "last_name": "Smith"
}

Response: {
  "success": true,
  "message": "Profile updated successfully.",
  "user": {...}
}
POST

/api/auth/logout/

Logout and blacklist refresh token.

Body: {
  "refresh_token": "..."
}

Response: {
  "success": true,
  "message": "Logout successful."
}
POST

/api/auth/resend-otp/

Resend OTP for phone verification.

Body: {
  "phone": "+1234567890"
}

Response: {
  "success": true,
  "message": "OTP resent via SMS."
}
POST

/api/auth/token/refresh/

Refresh JWT access token.

Body: {
  "refresh": "..."
}

Response: {
  "access": "new_access_token..."
}

Stock Insights Endpoints

GET

/api/stock-insights/filings-feed/

Retrieve filings feed.

Params: {
  "document_type": "required"
}
POST

/api/stock-insights/filings-keywords/

Search filings by keywords.

Body: {
  "query": "required",
  "filters": {
    "types": ["earnings-transcript"]
  }
}
POST

/api/stock-insights/embeddings-search/

Search using embeddings.

Body: {
  "query": "required",
  "top_k": 10,
  "filters": {}
}
GET

/api/stock-insights/announcements-feed/

Retrieve tagged announcements feed.

GET

/api/stock-insights/results-calendar/

Retrieve results calendar.

GET

/api/stock-insights/stock-data/

Get stock price data with advanced filtering and pagination.

Params: {
  "symbol": "optional",
  "symbol_id": "optional",
  "start_date": "YYYY-MM-DD optional",
  "end_date": "YYYY-MM-DD optional",
  "limit": "optional default 100",
  "offset": "optional default 0",
  "order_by": "optional default -date"
}
GET

/api/stock-insights/symbols/

Get list of available stock symbols.

Params: {
  "search": "optional",
  "limit": "optional default 50"
}
GET

/api/stock-insights/analytics/

Get stock analytics with time-series aggregations.

Params: {
  "symbol": "required",
  "period": "optional default 30d (7d,30d,90d,1y)"
}
POST

/api/stock-insights/sync/

Trigger data synchronization.

Body: {
  "sync_type": "daily optional",
  "target_date": "optional for daily",
  "start_date": "required for historical",
  "end_date": "required for historical"
}
GET

/api/stock-insights/sync/

Get sync status and logs.

Params: {
  "limit": "optional default 20",
  "status": "optional",
  "sync_type": "optional"
}
GET

/api/stock-insights/sync/status/{task_id}/

Get task status by task ID.

DJDT

History

Versions

Time

Settings from config.settings

Headers

Request

SQL queries from 0 connections

Static files (0 found, 0 used)

Templates (1 rendered)

Alerts

Cache calls from 2 backends

Signals