PearPear

Create an auto-rebalance config

Create a bot that watches a position and auto-rebalances it when drift crosses tolerance.

POST
/rebalance/auto
x-api-key<token>

In: header

Header Parameters

X-Trade-Account-Id*string

UUID of the trade account the request acts on. Must belong to the authenticated user.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/rebalance/auto" \  -H "X-Trade-Account-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6" \  -H "Content-Type: application/json" \  -d '{    "weightSource": "INITIAL_WEIGHT",    "minimumDriftPct": "0.05",    "positionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"  }'
{  "config": {    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",    "positionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",    "status": "ACTIVE",    "pausedReason": "USER",    "minimumDriftPct": "1250.75",    "createdAt": "2026-01-15T09:30:00.000Z",    "updatedAt": "2026-01-15T09:30:00.000Z",    "weightSource": "INITIAL_WEIGHT"  }}