Draw funds (revolving)
Take loan proceeds against an approved facility, and confirm the transfer landed before you act on it.
Draw loan proceeds against an active facility, T+0. For SPOT_MARGIN, set re_pledge for leveraged buying power, and CLC computes the closed-form max and disburses once. Loan and trade are strictly sequential.
Scope draw:create
Prerequisites: facility is APPROVED
1. Request a draw
Leverage: product SPOT_MARGIN + re_pledge: true → CLC disburses the full leveraged amount in one call and locks it to trading (max_withdrawable_usd = 0).
curl -X POST https://api.clc.solutions/v1/facilities/fac_7a1b/draws \
-H "X-CLC-Key-Id: $CLC_KEY_ID" \
-H "X-CLC-Timestamp: $CLC_TIMESTAMP" \
-H "X-CLC-Signature: $CLC_SIGNATURE" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"amount": "25000.00",
"asset": "USDC",
"re_pledge": false
}'{
"id": "drw_5c8",
"facility_id": "fac_7a1b",
"status": "PENDING",
"amount": "25000.00",
"asset": "USDC",
"instructions": [
{
"operation": "transfer",
"source": "clc",
"destination": "borrower",
"amount": "25000.00",
"asset": "USDC"
}
],
"requested_at": "2026-07-21T14:39:10Z",
"resource_version": 4
}What instructions is
instructions isEvery draw, repayment and margin call comes back with an instructions array: the steps the broker executes, in the order given. Run them one after another, and do not start one until the previous has settled.
The whole set arrives in one response on purpose. There is no follow-up call that reveals step two, so you can decide up front whether you can complete the sequence rather than discovering halfway through that you cannot.
CLC names parties, never addresses. source and destination are clc or borrower, and resolving those to real destinations is yours — an address in an API response is an address that can be tampered with in transit.
A draw is a single transfer today. It is still an array, and handling it as a sequence here means a margin call, which is not, needs no special case.
Tell CLC you executed it
CLC learns the collateral moved from the portfolio you push, but a movement on its own is ambiguous: a draw CLC instructed, a repayment CLC instructed and the borrower depositing on their own all look identical in a portfolio diff. One report per entity resolves it — CLC does not track which holdings you sold to raise the money, only what arrived.
curl -X POST https://api.clc.solutions/v1/facilities/fac_7a1b/draws/drw_5c8/execution \\
-H "X-CLC-Key-Id: $CLC_KEY_ID" \\
-H "X-CLC-Timestamp: $CLC_TIMESTAMP" \\
-H "X-CLC-Signature: $CLC_SIGNATURE" \\
-H "Idempotency-Key: $(uuidgen)" \\
-d '{
"status": "completed",
"delivered": {
"amount": "25000.00",
"asset": "USDC"
},
"reference": "0xbb41d902"
}'One report for the whole set, once the last instruction has settled. CLC validates it against its own receipts and the portfolio you push, so this is a report to reconcile rather than a figure taken on trust.
{
"execution_id": "exe_5b1d",
"recorded_at": "2026-07-21T14:40:01Z",
"draw": {
"id": "drw_5c8",
"status": "COMPLETED",
"amount": "25000.00",
"asset": "USDC"
}
}Keep execution_id. It is CLC's handle for this report — the raw figures exactly as they arrived — and it is what a reconciliation or a support thread quotes to point at this one.
2. Get the draw result
Hard ordering: do not route the margin trade until you see draw.completed. Loan and trade never overlap, not even by 1 ms. Emits draw.completed / draw.failed.
curl -X GET https://api.clc.solutions/v1/facilities/fac_7a1b/draws/drw_5c8 \
-H "X-CLC-Key-Id: $CLC_KEY_ID" \
-H "X-CLC-Timestamp: $CLC_TIMESTAMP" \
-H "X-CLC-Signature: $CLC_SIGNATURE"{
"id": "drw_5c8",
"facility_id": "fac_7a1b",
"status": "COMPLETED",
"amount": "25000.00",
"asset": "USDC",
"transfer_id": "txn_991",
"requested_at": "2026-07-21T14:39:10Z",
"completed_at": "2026-07-21T14:40:02Z",
"resource_version": 5
}Updated about 2 months ago