PearPear
API Integration

API Specification

The full V3 gateway REST surface, and where to find exact request and response schemas.

The V3 gateway is a typed REST API served from https://pro-gateway.pearprotocol.io. The source of truth for every request and response shape is the TypeScript SDK and its types package:

  • @pear-protocol/core-sdk, the typed REST client (sdk.auth, sdk.core).
  • @pear-protocol/types, Zod schemas and DTOs for every request, response, and entity.

Prefer the SDK over raw HTTP: it wraps authentication, x-trade-account-id scoping, and returns fully typed results.

Endpoint groups

GroupRoutesSDK
Auth/auth/nonce, /auth/login, /auth/session/*, /auth/api-key/mesdk.auth
Trade accounts/trade-accounts, /trade-accounts/:id, .../credentialssdk.core.accounts
API keys/api-keys, /api-keys/:idsdk.core.apiKeys
Trade/trade/open, /trade/:id/adjust, /trade/:id/close, /trade/:id/reverse, /trade/close-all, PUT /leveragesdk.core.trade
Triggers/triggers/open, /triggers/close, /triggers, /triggers/:id/cancelsdk.core.triggers
Schedules (TWAP)/schedules, /schedules/:id/cancelsdk.core.schedules
Ladders/ladders, /ladders/:id, /ladders/:id/cancelsdk.core.ladders
Rebalance/rebalance/manual/:id, /rebalance/auto, /rebalance/:id/eventssdk.core.rebalance
Positions/positions, /positions/litesdk.core.positions
Executions/executions, /executions/:idsdk.core.executions
Fills/fills, /fills/:positionIdsdk.core.fills
Portfolio/portfolio, /portfolio/analyticssdk.core.portfolio
Markets/markets, /markets/basketssdk.core.markets
Instruments and prices/instruments, /prices, /fundingsdk.core.instruments / prices / funding
Saved baskets/saved-baskets, /saved-baskets/:idsdk.core.savedBaskets
Notifications/notifications, /notifications/readsdk.core.notifications
Statistics and TCA/statistics/*, /tca/*sdk.core.statistics / tca
Users/users/profile, /users/preferencessdk.core.users

Real-time updates (prices, funding, fills, positions, triggers) come over the WebSocket, not REST.

Interactive reference

A full interactive OpenAPI reference (every field, enum, and example) is generated from the gateway's OpenAPI spec. Until it is mounted here, use the SDK types (@pear-protocol/types) as the authoritative schema.

On this page