Alpha Bazaar Portfolios API

Linked brokerage portfolios

Operations 15

POST /api/portfolios/link Create Portfolio Link Token #
POST /api/portfolios/exchange Exchange Portfolio Token #
GET /api/portfolios/tier Get Portfolio Tier #
POST /api/portfolios/snapshot-sync Snapshot Sync Portfolio #
POST /api/portfolios/upgrade Upgrade Portfolio Tier #
POST /api/portfolios/validate-apple-receipt Validate Apple Receipt #
POST /api/portfolios/restore-apple-purchase Restore Apple Purchase #
POST /api/portfolios/downgrade Downgrade Portfolio Tier #
GET /api/portfolios List Portfolios #
GET /api/portfolios/health Check Plaid Health #
GET /api/portfolios/{portfolio_id} Get Portfolio #
PATCH /api/portfolios/{portfolio_id} Update Portfolio #
DELETE /api/portfolios/{portfolio_id} Delete Portfolio #
POST /api/portfolios/sync-all Sync All Portfolios #
GET /api/portfolios/holders Get Verified Holders #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/alphabazaar-ai:alphabazaar-ai-portfolios-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

alphabazaar-ai-portfolios-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alphabazaar Ai Portfolios API
  version: 2.2.0-socketio
  contact:
    name: Alpha Bazaar
    url: https://alphabazaar.ai/
    email: support@alphabazaar.ai
  license:
    name: Proprietary
  termsOfService: https://www.alphabazaar.ai/legal/terms
  description: 'Operations tagged Portfolios across 2 of this provider''s published API definitions: alphabazaar-ai-openapi.yml, openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://alpha-bazaar-signal-server.onrender.com
  description: Production
- url: https://dev-alpha-bazaar-signal-server.onrender.com
  description: Staging
security:
- HTTPBearer: []
tags:
- name: Portfolios
  description: Linked brokerage portfolios
paths:
  /api/portfolios/link:
    post:
      tags:
      - Portfolios
      summary: Create Portfolio Link Token
      description: 'Create a Plaid Link token for brokerage account linking.


        Returns a link_token that the frontend uses to open Plaid Link.'
      operationId: create_portfolio_link_token_api_portfolios_link_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortfolioLinkRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/exchange:
    post:
      tags:
      - Portfolios
      summary: Exchange Portfolio Token
      description: 'Exchange Plaid public token for access token and create portfolio.


        This endpoint:

        1. Exchanges the public token for an access token

        2. Creates the linked_portfolio record

        3. Triggers initial sync (24-month history import)'
      operationId: exchange_portfolio_token_api_portfolios_exchange_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortfolioExchangeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/tier:
    get:
      tags:
      - Portfolios
      summary: Get Portfolio Tier
      description: Get the current user's Plaid tier info and linked account count.
      operationId: get_portfolio_tier_api_portfolios_tier_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/snapshot-sync:
    post:
      tags:
      - Portfolios
      summary: Snapshot Sync Portfolio
      description: 'Trigger a one-time snapshot sync for free-tier users.

        Imports current holdings as a point-in-time snapshot (no ongoing sync).

        Premium users should use /api/portfolios/sync-all instead.'
      operationId: snapshot_sync_portfolio_api_portfolios_snapshot_sync_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/upgrade:
    post:
      tags:
      - Portfolios
      summary: Upgrade Portfolio Tier
      description: 'Upgrade publisher from free to premium Plaid tier.

        Requires active Stripe subscription (checked against existing subscription data).

        Enables live sync on all linked portfolios.'
      operationId: upgrade_portfolio_tier_api_portfolios_upgrade_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/validate-apple-receipt:
    post:
      tags:
      - Portfolios
      summary: Validate Apple Receipt
      description: 'Validate Apple IAP receipt and upgrade portfolio tier to premium.


        Verifies the transaction with Apple''s App Store Server API v2 when configured,

        then records the transaction and upgrades the publisher''s plaid_tier to premium.'
      operationId: validate_apple_receipt_api_portfolios_validate_apple_receipt_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/restore-apple-purchase:
    post:
      tags:
      - Portfolios
      summary: Restore Apple Purchase
      description: 'Restore a previously purchased Apple IAP premium tier.


        Checks apple_transactions table for existing record, validates with Apple

        if env vars are configured, then upgrades publisher plaid_tier.'
      operationId: restore_apple_purchase_api_portfolios_restore_apple_purchase_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/downgrade:
    post:
      tags:
      - Portfolios
      summary: Downgrade Portfolio Tier
      description: 'Downgrade publisher from premium to free Plaid tier.

        Disables live sync, keeps first linked portfolio as snapshot-only.'
      operationId: downgrade_portfolio_tier_api_portfolios_downgrade_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios:
    get:
      tags:
      - Portfolios
      summary: List Portfolios
      description: 'List all portfolios for the current publisher.


        Includes paper portfolio (always present) and any linked brokerage accounts.'
      operationId: list_portfolios_api_portfolios_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/health:
    get:
      tags:
      - Portfolios
      summary: Check Plaid Health
      description: Check if Plaid integration is properly configured. Requires authentication.
      operationId: check_plaid_health_api_portfolios_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/{portfolio_id}:
    get:
      tags:
      - Portfolios
      summary: Get Portfolio
      description: Get details for a specific portfolio.
      operationId: get_portfolio_api_portfolios__portfolio_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: portfolio_id
        in: path
        required: true
        schema:
          type: string
          description: Portfolio UUID
          title: Portfolio Id
        description: Portfolio UUID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Portfolios
      summary: Update Portfolio
      description: Update portfolio display name.
      operationId: update_portfolio_api_portfolios__portfolio_id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: portfolio_id
        in: path
        required: true
        schema:
          type: string
          title: Portfolio Id
        description: Portfolio UUID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortfolioUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Portfolios
      summary: Delete Portfolio
      description: 'Unlink a portfolio and delete associated signals.


        This removes the Plaid connection, deletes the access token,

        and deletes all signals created from this portfolio.'
      operationId: delete_portfolio_api_portfolios__portfolio_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: portfolio_id
        in: path
        required: true
        schema:
          type: string
          description: Portfolio UUID
          title: Portfolio Id
        description: Portfolio UUID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/sync-all:
    post:
      tags:
      - Portfolios
      summary: Sync All Portfolios
      description: 'Sync all linked brokerage accounts into the verified portfolio.


        This endpoint:

        1. Fetches all linked portfolios for the publisher

        2. Calculates combined portfolio value across all accounts

        3. Processes transactions from each account with combined value for allocation %

        4. Assigns portfolio_id=''verified'' to all signals


        Returns aggregate sync results across all accounts.'
      operationId: sync_all_portfolios_api_portfolios_sync_all_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
  /api/portfolios/holders:
    get:
      tags:
      - Portfolios
      summary: Get Verified Holders
      description: 'Find publishers with verified (Plaid-linked) positions in a given ticker.


        Returns verified holders with position direction and skin-in-the-game tier.

        Never exposes dollar amounts — only percentages and direction.


        Agent-friendly: designed for AI agents to assess conviction behind signals.'
      operationId: get_verified_holders_api_portfolios_holders_get
      security:
      - HTTPBearer: []
      parameters:
      - name: ticker
        in: query
        required: true
        schema:
          type: string
          description: Stock ticker symbol (e.g. AAPL)
          title: Ticker
        description: Stock ticker symbol (e.g. AAPL)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: https://alpha-bazaar-signal-server.onrender.com
      description: Production
    - url: https://dev-alpha-bazaar-signal-server.onrender.com
      description: Staging
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    PortfolioLinkRequest:
      properties:
        redirect_uri:
          anyOf:
          - type: string
          - type: 'null'
          title: Redirect Uri
      type: object
      title: PortfolioLinkRequest
      description: Request to start Plaid Link flow
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PortfolioUpdateRequest:
      properties:
        display_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Display Name
      type: object
      required:
      - display_name
      title: PortfolioUpdateRequest
      description: Request to update portfolio display name
    PortfolioExchangeRequest:
      properties:
        public_token:
          type: string
          maxLength: 500
          minLength: 10
          title: Public Token
        display_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Display Name
        account_id:
          type: string
          maxLength: 100
          minLength: 1
          title: Account Id
        institution_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Institution Name
      type: object
      required:
      - public_token
      - display_name
      - account_id
      title: PortfolioExchangeRequest
      description: Request to exchange public token and create portfolio
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
externalDocs:
  description: Agent integration guide and full API docs
  url: https://www.alphabazaar.ai/llms-full.txt
x-refined-from:
- alphabazaar-ai-openapi.yml
- openapi.json