---
title: "Sync external fills into internal state"
method: POST
path: "/sync/fills"
tags: ["Sync"]
---

# Sync external fills into internal state

`POST /sync/fills`

## Request body

- SyncFillsRequestDto
  - `user` string, required — User EVM address
  - `fills` ExternalFillDto[], required — External fills to sync
    - `coin` string, required — Asset symbol
    - `px` string, required — Fill price
    - `sz` string, required — Fill size
    - `side` 'B' | 'A', required — Side
    - `time` number, required — Timestamp in ms
    - `dir` string, required — Direction (e.g. Open Long, Close Short)
    - `fee` string, required — Fee amount
    - `builderFee` string — Builder fee
    - `startPosition` string — Start position size
    - `oid` string — Order ID
    - `tid` string — Trade ID
    - `cloid` string, nullable — Client order ID
    - `hash` string, nullable — Transaction hash
    - `feeToken` string, nullable — Fee token
    - `liquidation` ExternalLiquidationDto
      - `liquidatedUser` string, required — Liquidated user address
      - `markPx` string, required — Mark price at liquidation
      - `method` string, required — Liquidation method
    - `closedPnl` object, nullable — Closed PnL
    - `crossed` object, nullable — Whether fill crossed the spread
    - `twapId` object, nullable — TWAP order ID
  - `assetPositions` string[] — Current asset positions from clearinghouse state

## Response `200`

Sync completed

---

[API](https://skmtc.dev/pearprotocol/apis/pear-protocol-trading-api.md) · [All operations](https://skmtc.dev/pearprotocol/apis/pear-protocol-trading-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pearprotocol/pear-protocol-trading-api/revisions/d5e1438dfaa7/schema)
