Partner APIs Overview

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

What are Partner APIs?

Partner APIs enable authorized partners to programmatically access PiTrade's trading and portfolio management functionality. With secure JWT authentication, you can build applications that:

  • Create and manage user accounts
  • Place trading orders (immediate or scheduled)
  • Retrieve portfolio information
  • Monitor trade execution status
  • Manage different account types (Trading & Signal accounts)
  • Handle fund deposits and withdrawals

Key Features

Secure Authentication

  • JWT-based authentication with partner credentials
  • Client ID and secret key management

Account Management

  • Create trading accounts for real market orders
  • Create signal accounts for signal-only operations
  • Flexible account type selection

Fund Management

  • Link bank accounts for deposits and withdrawals
  • Support for checking and savings accounts
  • Automatic bank verification with micro-deposits

Trading Capabilities

  • Place immediate buy/sell orders
  • Schedule trades for future execution
  • Support for both amount-based (BUY) and quantity-based (SELL) orders
  • Real-time trade status tracking

Portfolio Access

  • Retrieve complete portfolio information
  • Access detailed portfolio properties and metadata
  • Monitor holdings and performance

Getting Started

To begin using the Partner APIs:

  1. Obtain Credentials - Get your clientId and secret from your partner account manager
  2. Generate JWT Token - Create signed JWT tokens using your credentials
  3. Make API Calls - Use the token in the Authorization header for all requests
  4. Handle Responses - Process responses and implement error handling

Authentication Flow

All API requests require JWT authentication. Here's the basic flow:

  1. Create a JWT payload with your clientId and expiration time
  2. Sign the JWT with your partner secret key
  3. Include the token in the Authorization: Bearer <JWT_TOKEN> header
  4. Make your API request

Error Handling

All API responses include appropriate HTTP status codes:

  • 200 OK - Request successful
  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Authentication failed or token expired
  • 403 Forbidden - Insufficient permissions
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error

Support

For technical support or questions about the Partner APIs:

  • Review the detailed endpoint documentation
  • Check common issues and troubleshooting guides
  • Contact your partner account manager

Typical Integration Flow

  1. Create Account - Set up Trading or Signal Account
  2. Link Bank - Connect bank account for fund transfers
  3. Deposit Funds - Transfer money from linked bank
  4. Place Trades - Execute buy/sell orders
  5. Monitor Portfolio - Track holdings and performance
  6. Withdraw Funds - Transfer profits back to bank

Next Steps

Was this page helpful?