PearPear
API Integration

Important Terms

The concepts a pair-trading integration has to get right.

Pear trades baskets, not single assets, so a few terms mean something specific here. Read these before you build against the API.

TermWhat it explains
Instrument IDWhy a trade leg's symbol is "0" on Hyperliquid, and how to resolve, send, and read one.
Client IDThe code that attributes the trades your integration routes, and the metrics you read back with it.
Orders and ExecutionsWhat a trigger, schedule, ladder, execution, order, and fill each are, and how one becomes the next.
Price RatioHow one long and one short collapse into a single line, and why you trade its direction.
Weighted Price RatioThe same idea for a multi-leg basket, and where the weights come from.
Net FundingWhat it costs to hold a basket, once the paid and received funding legs net out.
Position KeyThe hash that decides whether a trade adjusts a position you already hold or opens a new one.
Synthetic PositionWhy Pear's positions, entry prices, and PnL differ from the exchange's own view.

Two of these are values you can read straight from the API:

Those two market fields use that endpoint's own unweighted formulas, which are not the weighted ones a trigger condition or a chart uses, and netFunding carries the opposite sign to the trader's-cost convention. Read Which formula runs where before you display either.

Read Instrument ID before your first call. Every symbol field in the API takes one, and it is not the ticker.