PiTrade Client APIs Overview

Welcome to the PiTrade Client APIs documentation. This comprehensive guide provides developers with everything needed to integrate with our trading platform and build powerful applications.

PiTrade offers two distinct API integration flows to suit different use cases:

Integration Flows

Flow 1: PiTrade Native APIs (Standard Flow)

Our native APIs provide a comprehensive, streamlined interface for trading and portfolio management. Ideal for clients who need essential trading, portfolio, and rebalancing functionality.

Capabilities:

  • Place market orders
  • Check and cancel trade orders
  • Retrieve portfolio information and holdings
  • View transaction history
  • Rebalance portfolios with percentage-based target allocations
  • Monitor trade execution status

Advantages:

  • Simple, intuitive API design
  • Quick integration
  • Market order execution
  • Portfolio rebalancing with percentage-based allocation
  • Multi-portfolio support
  • Full portfolio and holdings management

Flow 2: Interactive Brokers Direct API Access (Advanced Flow)

For advanced trading requirements, connect directly to Interactive Brokers APIs through our bearer token gateway. This flow unlocks full Interactive Brokers functionality while maintaining PiTrade's security standards.

Capabilities:

  • Market and limit orders
  • Advanced order types (stop-loss, conditional orders, etc.)
  • Full Interactive Brokers API ecosystem access
  • Real-time margin impact calculations
  • Order preview validation

Limitations:

  • Single trading portfolio per account
  • Requires Interactive Brokers session management
  • More complex implementation

Getting Contract IDs:

To place orders via Interactive Brokers APIs, you need contract IDs for the securities. Interactive Brokers provides a CSV file with contract IDs:

  • Download: Interactive Brokers Contract IDs CSV
  • Format: Symbol, Main Exchange, Description, IB Contract ID, Scheduled Ineligibility Date
  • Usage: Look up the IB_CONTRACT_ID for your ticker symbol, use in order requests

Getting Started

To begin using the Client APIs:

  1. Obtain Credentials - Get your clientId and apiKey from PiTrade Support
  2. Generate IdToken - For Native APIs, create signed JWT tokens and exchange for IdToken
  3. Make API Calls - Use the IdToken in the Authorization header for all requests
  4. Handle Responses - Process responses and implement error handling

Base URLs

All API requests use the following base URLs:

Authentication Endpoint

Production:

https://api.pitrade.com/public

Development:

https://devo.api.pitrade.com/public

Used for authentication operations:

  • POST /auth/token - Generate or exchange tokens
  • POST /auth/refresh - Refresh expired IdToken

Client API Endpoint

Production:

https://api.pitrade.com/client

Development:

https://devo.api.pitrade.com/client

Used for all PiTrade Native API operations:

  • Trading endpoints (Place, Check, Cancel trades)
  • Portfolio endpoints (Get portfolios, holdings, transactions)
  • Rebalancer endpoints (Portfolio rebalancing operations)

Authentication Flow

PiTrade Native APIs (Standard Flow)

Two-step authentication:

  1. Create a JWT payload with your clientId and expiration time
  2. Sign the JWT with your client apiKey
  3. POST to /auth/token with your JWT to receive IdToken, RefreshToken, and AccessToken
  4. Use IdToken in the Authorization: Bearer <ID_TOKEN> header for all API requests

Interactive Brokers Direct Access (Advanced Flow)

Multi-step authentication:

  1. Generate IdToken using the same two-step Native flow above
  2. Use IdToken to call /user/bearer-token to get broker bearer token
  3. Use broker bearer token for Interactive Brokers API access

More in PiTrade Client APIs

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.