Portfolio Endpoints

The Portfolio APIs provide access to account holdings, balance information, and detailed portfolio metadata. These endpoints work for both Trading and Signal Accounts.

Get Portfolio Holdings

Endpoint: GET https://api.pitrade.com/partner/portfolio

Description: Retrieve all current holdings in the portfolio

cURL Example

curl -X GET https://api.pitrade.com/partner/portfolio \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Node.js Example

const axios = require("axios");

async function getPortfolio(token) {
  try {
    const response = await axios.get(
      "https://api.pitrade.com/partner/portfolio",
      {
        headers: {
          Authorization: `Bearer ${token}`,
        },
      },
    );
    return response.data;
  } catch (error) {
    console.error("Error fetching portfolio:", error.response?.data);
    throw error;
  }
}

const portfolio = await getPortfolio(token);
console.log("Portfolio:", portfolio);

Response

Success Response (200 OK):

[
  {
    "ticker": "AAPL",
    "quantity": 10,
    "averagePurchasePrice": 145.0
  },
  {
    "ticker": "GOOGL",
    "quantity": 5,
    "averagePurchasePrice": 135.0
  },
  {
    "ticker": "MSFT",
    "quantity": 8,
    "averagePurchasePrice": 320.5
  }
]

Response Fields:

FieldTypeDescription
tickerstringStock ticker symbol
quantitynumberNumber of shares held
averagePurchasePricenumberAverage purchase price per share

Get Portfolio Properties

Endpoint: GET https://api.pitrade.com/partner/portfolio-properties

Description: Retrieve portfolio properties including available balance and portfolio metadata

cURL Example

curl -X GET https://api.pitrade.com/partner/portfolio-properties \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Node.js Example

const axios = require("axios");

async function getPortfolioProperties(token) {
  try {
    const response = await axios.get(
      "https://api.pitrade.com/partner/portfolio-properties",
      {
        headers: {
          Authorization: `Bearer ${token}`,
        },
      },
    );
    return response.data;
  } catch (error) {
    console.error("Error fetching portfolio properties:", error.response?.data);
    throw error;
  }
}

const properties = await getPortfolioProperties(token);
console.log("Portfolio Properties:", properties);

Response

Success Response (200 OK):

{
  "availableAmount": 35000,
  "availableAmountToTrade": 33980.58,
  "name": "Default Portfolio",
  "description": "My trading portfolio",
  "visibility": "PRIVATE",
  "type": "TRADING",
  "currentValue": 50000
}

Response Fields:

FieldTypeDescription
availableAmountnumberCash available for trading in USD
availableAmountToTradenumberAvailable amount adjusted for margin (÷ 1.03)
namestringPortfolio name
descriptionstringPortfolio description
visibilitystringPortfolio visibility (PRIVATE/PUBLIC)
typestringPortfolio type (TRADING/SIGNAL)
currentValuenumberTotal current portfolio value in USD

Common Errors

User Not Found

{
  "success": false,
  "error": "User not found",
  "code": "USER_NOT_FOUND"
}

Solution: Verify the authentication token is valid and the user exists.

Unauthorized Access

{
  "success": false,
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}

Solution: Check that your JWT token is valid and not expired.

No Holdings

{
  "success": true,
  "holdings": [],
  "totalBalance": 5000,
  "availableBalance": 5000,
  "investedBalance": 0
}

Solution: This is normal for new accounts. Start by placing trades.

Best Practices

  1. Cache Data - Cache portfolio data to reduce API calls
  2. Refresh Intervals - Update portfolio data every 5-10 minutes
  3. Error Handling - Handle network errors gracefully
  4. Performance - Use portfolio data for analytics and reporting
  5. Monitoring - Track portfolio changes over time

Next Steps

Was this page helpful?

PiTrade

PiTrade gives investors in over 190 countries access to the U.S. stock market through real, transparent portfolios you can build yourself or invest in Strategizer Portfolios. As an SEC-registered investment adviser, powered by Interactive Brokers, PiTrade makes investing more transparent and accessible.

This content is provided for informational purposes only and is not intended as and may not be relied on in any manner as investment advice, a recommendation of any interest in any security offered herein. All investments involve risk, including the possible loss of principal. Past performance does not guarantee future results, and investors should consider their own investment goals, risk tolerance, and financial situation before investing. The information contained herein is subject to change.

The platform "PiTrade" is operated by Pioneer Advisory LLC, a subsidiary of Pioneer Investing Inc. which holds ownership rights related hereto.

Advisory services are provided by Pioneer Advisory LLC, an SEC-registered investment adviser.

Brokerage and clearing services are provided by Interactive Brokers LLC, a SEC-registered broker-dealer, member FINRA/SIPC, to retail customers for US-listed, registered securities and ETFs on a self-directed basis.

The registrations and memberships above in no way imply that the SEC, FINRA, or SIPC has endorsed the entities, products or services discussed herein.

Interactive Brokers LLC is a registered Broker-Dealer, Futures Commission Merchant and Forex Dealer Member, regulated by the U.S. Securities and Exchange Commission (SEC), the Commodity Futures Trading Commission (CFTC) and the National Futures Association (NFA), and is a member of the Financial Industry Regulatory Authority (FINRA) and several other self-regulatory organizations. Interactive Brokers does not endorse or recommend any introducing brokers, third-party financial advisors or hedge funds, including Pioneer Advisory LLC. Interactive Brokers provides execution and clearing services to customers. None of the information contained herein constitutes a recommendation, offer, or solicitation of an offer by Interactive Brokers to buy, sell or hold any security, financial product or instrument or to engage in any specific investment strategy. Interactive Brokers makes no representation, and assumes no liability to the accuracy or completeness of the information provided on this website.

For more information regarding Interactive Brokers, please visit www.interactivebrokers.com

© 2026 Pioneer Investing Inc. All Rights Reserved.