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:
- Obtain Credentials - Get your
clientIdandsecretfrom your partner account manager - Generate JWT Token - Create signed JWT tokens using your credentials
- Make API Calls - Use the token in the Authorization header for all requests
- Handle Responses - Process responses and implement error handling
Authentication Flow
All API requests require JWT authentication. Here's the basic flow:
- Create a JWT payload with your
clientIdand expiration time - Sign the JWT with your partner secret key
- Include the token in the
Authorization: Bearer <JWT_TOKEN>header - Make your API request
Error Handling
All API responses include appropriate HTTP status codes:
200 OK- Request successful400 Bad Request- Invalid request parameters401 Unauthorized- Authentication failed or token expired403 Forbidden- Insufficient permissions429 Too Many Requests- Rate limit exceeded500 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
- Create Account - Set up Trading or Signal Account
- Link Bank - Connect bank account for fund transfers
- Deposit Funds - Transfer money from linked bank
- Place Trades - Execute buy/sell orders
- Monitor Portfolio - Track holdings and performance
- Withdraw Funds - Transfer profits back to bank
Next Steps
- Authentication Guide - Learn how to authenticate requests
- Account Management - Create and manage accounts
- Bank Linking - Link bank accounts
- Fund Deposits & Withdrawals - Transfer funds
- Trading Endpoints - Place and manage trades
- Portfolio Endpoints - Access portfolio data