Developer API

The most realistic paper trading API
for developers

Build trading bots, test algorithms, and integrate paper trading into your platform. Experience real market conditions with slippage, partial fills, and accurate order matching.

Quick Start Example

Get JWT Token & Place Order

// First, get JWT token from API key
const tokenResponse = await fetch('https://api.paperinvest.io/v1/auth/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ apiKey: 'your_api_key' })
});
const { access_token } = await tokenResponse.json();

// Place a market order
const response = await fetch('https://api.paperinvest.io/v1/orders', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${access_token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    accountId: 'your-account-id',
    portfolioId: 'your-portfolio-id',
    symbol: 'AAPL',
    quantity: 100,
    side: 'buy',
    type: 'market',
    timeInForce: 'day'
  })
});

const order = await response.json();
console.log(`Order status: ${order.status}`);
console.log(`Filled at: $${order.avgFillPrice}`);

Get Real-Time Quotes

// Get real-time quote for a symbol
const quoteResponse = await fetch(
  'https://api.paperinvest.io/v1/market-data/quote/AAPL',
  {
    headers: {
      'Authorization': `Bearer ${access_token}`
    }
  }
);

const quote = await quoteResponse.json();
console.log(`Current price: $${quote.last}`);
console.log(`Bid: $${quote.bid} x ${quote.bidSize}`);
console.log(`Ask: $${quote.ask} x ${quote.askSize}`);

// Get batch quotes for multiple symbols
const batchResponse = await fetch(
  'https://api.paperinvest.io/v1/market-data/quotes/batch',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${access_token}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      symbols: ['AAPL', 'GOOGL', 'MSFT']
    })
  }
);

Built for serious algorithmic trading

Every API endpoint designed to mirror real trading conditions and help you build better trading systems

Realistic Execution

NBBO matching, queue position simulation, partial fills, and slippage modeling. Test your algorithms with real market conditions.

  • Market microstructure simulation
  • 22 broker rule sets
  • Realistic latency profiles

Authentication & Security

Enterprise-grade security with API key authentication, JWT tokens, and comprehensive audit logging.

  • API key management
  • JWT token authentication
  • Activity audit logs

Production-Ready Infrastructure

Smart rate limiting, comprehensive error handling, and detailed documentation. Built for serious trading applications.

  • WebSocket & SSE streaming
  • Batch operations support
  • Comprehensive error codes

Complete trading API suite

Everything you need to build sophisticated trading systems

Order Management

POST /v1/ordersCreate Order

Submit market, limit, stop, and bracket orders

GET /v1/orders/{orderId}Get Order

Retrieve order details with fill information

PUT /v1/orders/{orderId}/cancelCancel Order

Cancel pending orders with realistic latency

POST /v1/orders/batchBatch Orders

Submit multiple orders in a single request

Portfolio & Market Data

GET /v1/accounts/portfolios/{id}Portfolio

Real-time portfolio value, positions, and P&L

GET /v1/market-data/quote/{symbol}Quote

Real-time NBBO quotes with bid/ask sizes

POST /v1/market-data/quotes/batchBatch Quotes

Get quotes for multiple symbols efficiently

GET /v1/activity-log/portfolio/{id}Activity Log

Track all trading activity and events

Perfect for every trading use case

Trading Bot Development

Test your trading bots with realistic market conditions before deploying real capital. Perfect for momentum, mean reversion, and arbitrage strategies.

Strategy Backtesting

Forward-test your strategies with live market data. See how your algorithms perform with real slippage and market impact.

Education Platforms

Integrate paper trading into your educational platform. Give students realistic trading experience without financial risk.

Start building with Paper Trading API

Get your free API key and start building in minutes. No credit card required.

Free tier includes 5 trades per day. View pricing for unlimited access.