PearPear
API Integration

Executing Trade

Open pair and basket trades across venues, and choose how they execute.

A trade on Pear is a basket: one or more long legs and one or more short legs, each with a weight. You open the whole basket in a single call, scoped to a connected trade account.

Open a trade

POST /trade/open opens (or adjusts) a basket. With the SDK:

await sdk.core.trade.open(body); // returns an execution acknowledgement

Opening the same basket again adjusts the existing position rather than creating a second one.

Execution is asynchronous

/trade/open returns immediately with an execution whose status starts at IDLE. The fill and resulting position arrive over the WebSocket (execution.completed, then position.created / position.updated), not in the HTTP response. See Error Handling.

Execution styles

Choose how the basket fills:

StyleEndpointBehaviour
MarketPOST /trade/openFill now, at market.
TriggerPOST /triggers/openOpen when a price or ratio condition is met.
TWAPPOST /schedulesSplit the order into timed chunks.
LadderPOST /laddersStagger entries across a ratio range.

Once open, see Managing Open Position and Managing Open Order.

On this page