Count the positions and traders that ever opened each basket
Reports, per requested basket key, how many positions — and how many distinct traders — have ever opened that basket: cumulative best-effort counters bumped at open, never decremented on close. A basket is named by its canonical key — the basketKey /markets/baskets reports, derivable client-side with deriveBasketKey from @pear-protocol/utils. Counts are summed over the connectors in scope that stored the key, and an absent connector puts every venue in scope, so a trader active on two venues counts on each. Positions opened entirely on the exchange are excluded, so a count only reports Pear activity.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/markets/baskets/positions" \ -H "Content-Type: application/json" \ -d '{ "basketKeys": [ "9f2c1b7a4e6d3f8091a5c7e2b4d6f8a0c3e5079b1d3f5a7c9e1b3d5f7a9c1e3d5" ] }'{ "counts": [ { "basketKey": "string", "opened": 0, "traders": 0 } ]}