Skip to Content
VPerpAPI

Overview

Core REST and WebSocket endpoints for programmatic trading on VPerp.

VPerp provides three primary interfaces for programmatic trading and market data:

InterfaceMethod & PathPurpose
InfoPOST /infoRead-only market data, order books, account positions, fills, and funding history
ExchangePOST /exchangeEIP-712 signed actions: placing/cancelling orders, leverage updates, transfers, and withdrawals
WebSocketGET /wsReal-time market feeds, user order/fill events, and WebSocket RPC (post)

Hyperliquid-Compatible Schema

VPerp's REST and WebSocket payloads follow the Hyperliquid JSON schema. The key difference is the signing domain: VPerp signs under domain name: "vperp", version: "1", and uses vperpChain (instead of hyperliquidChain) for user-signed actions. See Authentication & Signing.

Request Basics

  • Content-Type: All REST requests use POST with Content-Type: application/json and a type field in the JSON body (max 1 MiB).
  • Numbers as Strings: Prices (px), sizes (sz), and USD amounts are encoded as decimal strings without trailing zeros (e.g., "98420.5", "0.25").
  • Timestamps: Unix timestamps in milliseconds (e.g., 1700000000000).

Read-After-Write Consistency

Every POST /exchange and POST /info response includes the x-vcore-height header showing the block height executed by the node (POST /exchange also returns x-vcore-tx-hash).

To guarantee that a subsequent POST /info query reflects a trade you just submitted, pass "minHeight" in the request body. The node waits up to 500 ms until it reaches that height before responding:

{
  "type": "clearinghouseState",
  "user": "0x0000000000000000000000000000000000000000",
  "minHeight": 1234567
}

Historical Data Retention

Hot API nodes retain 30 days of rolling history. Queries for older timestamps return HTTP 307 Temporary Redirect to an archive node.

On this page