PortfolioSharing Portfolios API

The Portfolios API from PortfolioSharing, for portfolios.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 13

GET /v1/portfolios List your portfolios #
POST /v1/portfolios Create a portfolio #
GET /v1/portfolios/{portfolioId} Get a portfolio #
PATCH /v1/portfolios/{portfolioId} Rename a portfolio #
DELETE /v1/portfolios/{portfolioId} Delete a portfolio and its records #
GET /v1/portfolios/{portfolioId}/transactions List transactions #
POST /v1/portfolios/{portfolioId}/transactions Record a transaction #
PUT /v1/portfolios/{portfolioId}/transactions/{transactionId} Replace a transaction #
DELETE /v1/portfolios/{portfolioId}/transactions/{transactionId} Delete a transaction #
GET /v1/portfolios/{portfolioId}/cash Get cash balances and ledger #
POST /v1/portfolios/{portfolioId}/cash Record cash movement #
DELETE /v1/portfolios/{portfolioId}/cash/{cashId} Delete a cash movement; deleting either side of a transfer removes both #
GET /v1/portfolios/{portfolioId}/valuation Get an estimated valuation #

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/portfolio-sharing:portfolio-sharing-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

portfolio-sharing-portfolios-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PortfolioSharing Portfolios API
  version: 1.0.0
  description: 'Manage your own portfolios, transactions and cash. Create a personal API key in the app. Keep it private; it is shown only once. Write keys also grant read access. Values and valuations are estimates; the API does not place trades. API versioning and deprecation policy: https://www.portfoliosharing.com/developers/#api-versioning-and-deprecation. The approximate per-key rate limit is 600 requests per 60 seconds per Cloudflare location; see https://www.portfoliosharing.com/developers/ for details.'
servers:
- url: https://api.portfoliosharing.com
security:
- bearerAuth: []
tags:
- name: Portfolios
paths:
  /v1/portfolios:
    get:
      summary: List your portfolios
      description: List your portfolios.
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: listPortfolios
      tags:
      - Portfolios
    post:
      summary: Create a portfolio
      description: Create a portfolio.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 100
                currency:
                  type: string
                  pattern: ^[A-Z]{3}$
                  example: USD
              required:
              - name
              - currency
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: createPortfolio
      tags:
      - Portfolios
  /v1/portfolios/{portfolioId}:
    get:
      summary: Get a portfolio
      description: Get a portfolio.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getPortfolio
      tags:
      - Portfolios
    patch:
      summary: Rename a portfolio
      description: Rename a portfolio.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              required:
              - name
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: renamePortfolio
      tags:
      - Portfolios
    delete:
      summary: Delete a portfolio and its records
      description: Delete a portfolio and its records.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: deletePortfolio
      tags:
      - Portfolios
  /v1/portfolios/{portfolioId}/transactions:
    get:
      summary: List transactions
      description: List transactions.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: listTransactions
      tags:
      - Portfolios
    post:
      summary: Record a transaction
      description: Record a transaction.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                symbol:
                  type: string
                  example: AAPL
                type:
                  type: string
                  enum:
                  - BUY
                  - SELL
                quantity:
                  type: number
                  exclusiveMinimum: 0
                price:
                  type: number
                  minimum: 0
                fees:
                  type: number
                  minimum: 0
                  default: 0
                traded_on:
                  type: string
                  format: date
                currency:
                  type: string
                  pattern: ^[A-Z]{3}$
                  example: USD
                fx_rate_override:
                  type: number
                  exclusiveMinimum: 0
                  description: Reporting-currency units per transaction-currency unit. Otherwise a historical provider rate is used.
              required:
              - symbol
              - type
              - quantity
              - price
              - traded_on
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: recordTransaction
      tags:
      - Portfolios
  /v1/portfolios/{portfolioId}/transactions/{transactionId}:
    put:
      summary: Replace a transaction
      description: Replace a transaction.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      - name: transactionId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                symbol:
                  type: string
                  example: AAPL
                type:
                  type: string
                  enum:
                  - BUY
                  - SELL
                quantity:
                  type: number
                  exclusiveMinimum: 0
                price:
                  type: number
                  minimum: 0
                fees:
                  type: number
                  minimum: 0
                  default: 0
                traded_on:
                  type: string
                  format: date
                currency:
                  type: string
                  pattern: ^[A-Z]{3}$
                  example: USD
                fx_rate_override:
                  type: number
                  exclusiveMinimum: 0
                  description: Reporting-currency units per transaction-currency unit. Otherwise a historical provider rate is used.
              required:
              - symbol
              - type
              - quantity
              - price
              - traded_on
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: replaceTransaction
      tags:
      - Portfolios
    delete:
      summary: Delete a transaction
      description: Delete a transaction.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      - name: transactionId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: deleteTransaction
      tags:
      - Portfolios
  /v1/portfolios/{portfolioId}/cash:
    get:
      summary: Get cash balances and ledger
      description: Get cash balances and ledger.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getCash
      tags:
      - Portfolios
    post:
      summary: Record cash movement
      description: Record cash movement.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                  - DEPOSIT
                  - WITHDRAWAL
                  - TRANSFER
                currency:
                  type: string
                  pattern: ^[A-Z]{3}$
                  example: USD
                amount:
                  type: string
                  example: '100.00'
                occurred_on:
                  type: string
                  format: date
                note:
                  type: string
                to_currency:
                  type: string
                  pattern: ^[A-Z]{3}$
                  example: USD
                to_amount:
                  type: string
                  description: Actual amount received; required for TRANSFER.
              required:
              - type
              - currency
              - amount
              - occurred_on
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: recordCash
      tags:
      - Portfolios
  /v1/portfolios/{portfolioId}/cash/{cashId}:
    delete:
      summary: Delete a cash movement; deleting either side of a transfer removes both
      description: Delete a cash movement; deleting either side of a transfer removes both.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      - name: cashId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: deleteCash
      tags:
      - Portfolios
  /v1/portfolios/{portfolioId}/valuation:
    get:
      summary: Get an estimated valuation
      description: Get an estimated valuation.
      parameters:
      - name: portfolioId
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Read-only key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Exchange rate unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getValuation
      tags:
      - Portfolios
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Human-readable explanation of the error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal API key created in the PortfolioSharing app.