Replace a borrower portfolio

Send this the moment the portfolio changes on your side: a withdrawal, a
trade, a deposit. Collateral value is what sets the margin call price, so a
change CLC does not know about is a margin call price that is wrong.

This is a full replace, not a delta. An asset you leave out is read as zero,
so always send the complete set of holdings.

as_of is when the portfolio was true on your side, not when you sent it. CLC
keeps the newest as_of it has seen and ignores anything older, so two updates
that arrive out of order cannot roll the portfolio backwards. When that happens
the response comes back with applied: false and the state CLC kept.

Deliberately takes no Idempotency-Key: a full replace ordered by as_of is
already safe to repeat, and this endpoint fires far too often to make you mint a
key each time.

Requires scope borrower:write.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Body Params
date-time
required

When the portfolio was true on your side, not when you sent it. CLC keeps the newest it has seen and discards older ones.

positions
array of objects
required

The complete holdings. This replaces what CLC holds, so an asset that is absent is read as zero.

positions*
Headers
string
required
^[0-9]{10}$

Unix seconds. Requests outside a ±5 minute window are rejected, and the value is part of the signed canonical request.

string
required
length between 88 and 88
^[A-Za-z0-9+/]{86}==$

Base64 of the Ed25519 signature over the canonical request. Ed25519 signatures are always 64 bytes, so this is always 88 characters ending in ==.

Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json