Resources / API

API Reference

REST and WebSocket APIs for programmatic access to markets, orders, positions, and real-time data on Hyperliquid DEX.

Base URLapi.perpex.io/v1
AuthJWT Bearer
01

REST Endpoints

Method
Endpoint
Description
GET
/api/v1/markets
List all available trading pairs and market data
GET
/api/v1/orderbook/:symbol
Real-time orderbook depth for a symbol
GET
/api/v1/account
Account balances, positions, and margin info
POST
/api/v1/orders
Place a new order (limit, market, stop, etc.)
DELETE
/api/v1/orders/:id
Cancel an existing open order
GET
/api/v1/trades
Trade history with pagination and filters
02

WebSocket Channels

Endpointwss://ws.perpex.io
trades

Real-time trade stream for subscribed symbols

orderbook

Orderbook updates with configurable depth

positions

User position changes and liquidation alerts

candles

OHLCV candlestick data at various intervals

03

Authentication

Authentication requires API keys which can be generated from your account dashboard with customizable permissions for enhanced security. All authenticated requests must include a JWT Bearer token in the Authorization header.

Our API is designed for high performance with low latency and includes rate limiting to ensure fair usage. SDKs and client libraries are available in JavaScript, Python, and TypeScript to simplify integration.