PearPear

Apply external fills

Find-or-create positions from applicable baskets, then verify exposure against the snapshot

POST
/sync/fills/create
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/sync/fills/create" \  -H "X-Trade-Account-Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6" \  -H "Content-Type: application/json" \  -d '{    "applicables": [      {        "positionKey": "string",        "exposure": {          "property1": "+42.5",          "property2": "+42.5"        },        "origin": "PEAR",        "status": "OPEN",        "fills": [          {            "exchangeFillId": "string",            "cloid": "string",            "connector": "hyperliquid",            "symbol": "BTC",            "side": "BUY",            "quantity": "1250.75",            "price": "1250.75",            "usd": "1250.75",            "timestamp": 1,            "reduceOnly": true,            "synthetic": true,            "isExternal": true,            "tradeFee": "-42.5",            "builderFee": "1250.75"          }        ],        "metadata": {          "initialExposureUSD": {            "property1": "+42.5",            "property2": "+42.5"          }        }      }    ],    "exchangePositions": [      {        "symbol": "BTC",        "size": "1250.75",        "side": "BUY",        "entryPrice": "1250.75",        "markPrice": "1250.75"      }    ],    "meta": {      "externalMaxTs": 0    }  }'
{}