API Documentation

Complete reference for integrating with Public/Algo's trading platform. Our RESTful API and WebSocket streams give you everything you need.

Introduction

The Public/Algo API provides programmatic access to our trading platform. All requests use HTTPS and return JSON responses.

Base URL

https://api.publicalgo.com/v3
💡 Pro Tip

Use our sandbox environment for testing: https://sandbox.api.publicalgo.com/v3

Authentication

All API requests require authentication using API keys. Include your key in the request header:

Authorization: Bearer your_api_key_here X-API-Timestamp: 1704067200 X-API-Signature: hmac_sha256_signature
Header Description
Authorization Bearer token with your API key
X-API-Timestamp Unix timestamp in seconds
X-API-Signature HMAC-SHA256 signature of request body

Rate Limits

API requests are rate limited based on your plan:

Plan Requests/Min WebSocket Connections
Starter 60 5
Professional 300 25
Enterprise Unlimited Unlimited

Orders

POST /orders

Create a new order.

Request Body

Parameter Type Description
symbol required string Trading pair symbol (e.g., "BTC-USD")
side required string "buy" or "sell"
type required string "market", "limit", or "stop"
quantity required number Order quantity
price number Limit price (required for limit orders)

Example Request

{ "symbol": "BTC-USD", "side": "buy", "type": "limit", "quantity": 0.5, "price": 42000.00 }

Example Response

{ "id": "ord_abc123xyz", "status": "pending", "created_at": "2025-01-12T10:30:00Z" }
GET /orders/{order_id}

Retrieve details of a specific order.

DELETE /orders/{order_id}

Cancel an open order.

Market Data

GET /market/ticker/{symbol}

Get real-time ticker data for a trading pair.

Example Response

{ "symbol": "BTC-USD", "price": 42150.00, "change_24h": 2.5, "volume_24h": 1250000000, "high_24h": 42800.00, "low_24h": 41200.00 }
📧 Need Help?

Contact our developer support team at [email protected] or visit our API Status page.