Organizations / Crypto / Client Spread
Client Spread on Crypto Rate Locks
As an organization admin you can add your own markup to a member's crypto rate lock (option or forward). Send an optional spread_percent with your admin keys and X-Crebit-Acting-As-Partner-Id. The member pays a slightly higher upfront amount; the locked rate and settlement payout stay the same. Your organization earns the difference when the contract is funded.
Everything else about the lock (customer reference, quote, contract, funding, exercise, margin calls and webhooks) works as described on the Crypto page. This page only covers what the spread adds. Examples use thesandbox host https://lock-apis-sandbox.crebitpay.com.
Who Can Set a Spread
- Only an organization admin calling with the acting-as header for an active member of their own organization.
- A member calling with its own keys, or an admin calling for its own partner without the acting-as header, gets
403 client_spread_not_allowedfor any non-zero spread. - The spread is chosen per quote. There is no saved default per member: if you leave it out, no spread is applied.
- Applies to both
contract_typeforwardandoption.
The spread_percent Value
| Rule | Detail |
|---|---|
| Unit | Percent of USD notional: "0.5" means 0.5% (not 50%) |
| Range | 0 to 5 |
| Precision | Up to 8 decimal places (for example 0.1, 0.125, 0.1255, 0.0001) |
| Type | Decimal string (recommended) or JSON number; booleans are rejected |
| Optional | Omitted, empty string and 0 are the same: no spread |
| Accepted on | POST /api/v1/fx/quotes (and the portal quote preview and quotes) |
How the Economics Work
Unlike fiat, crypto client spread does not change locked_rate. It is a fixed USD add-on to what the member pays upfront:
| Quantity | Formula |
|---|---|
| spread_revenue_amount | usd_notional × spread_percent / 100, rounded half-up to cents |
| amount_due (and premium / upfront fee) | Crebit base amount_due + spread_revenue_amount |
| locked_rate | Unchanged |
| deposit / settlement payout | Unchanged |
Example: USD notional 50,000 with a 0.5% spread. Revenue is 250.00 USD. If Crebit's amount due was 5,565.00, the member's amount_due becomes 5,815.00. The strike stays 5.4200 and the settlement formula is unchanged.
Quote with a Spread
Preview
Add spread_percent to the normal preview body. The response includes the breakdown fields when you call as an org admin acting as the member.
curl -sS -X POST "https://lock-apis-sandbox.crebitpay.com/api/v1/fx/quote-preview" \
-H "Content-Type: application/json" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: sandbox" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b" \
-d '{"contract_type":"option","direction":"USD_TO_BRL","notional_currency":"USD","notional_amount":"50000.00","strike_mode":"live_spot","window_start":"2026-11-02T00:00:00Z","window_end":"2026-11-09T00:00:00Z","chain":"solana","settlement_currency":"USDC","spread_percent":"0.5"}'Create the Quote
Send the same spread_percent on quote create. The spread is frozen on the quote: amount_due, premium_amount /upfront_fee and total_amount already include it.
curl -sS -X POST "https://lock-apis-sandbox.crebitpay.com/api/v1/fx/quotes" \
-H "Content-Type: application/json" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: sandbox" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"customer_reference_id":"member-cust-0042","customer_name":"Member Customer Ltda","contract_type":"forward","direction":"USD_TO_BRL","notional_currency":"USD","notional_amount":"50000.00","strike_mode":"live_spot","window_start":"2026-11-02T00:00:00Z","window_end":"2026-11-09T00:00:00Z","chain":"solana","settlement_currency":"USDC","payout_wallet_address":"EndUserSettlementWa11et1111111111111111111","oracle":"redstone","spread_percent":"0.5"}'{
"id": "22222222-2222-4222-8222-222222222222",
"status": "created",
"locked_rate": "5.4200",
"premium_amount": "815.00",
"deposit_amount": "5000.00",
"total_amount": "5815.00",
"amount_due": "5815.00",
"collateral_amount": "5000.00",
"upfront_fee": "815.00",
"spread_percent": "0.5",
"base_amount_due": "5565.00",
"spread_revenue_amount": "250.00",
"spread_revenue_currency": "USD",
"expires_at": "2026-09-28T14:16:30Z"
}Contract and Funding
Create the contract from the quote as usual (POST /api/v1/fx/contracts). The contract inherits the frozen spread from the quote. You cannot change the spread after the quote is created.
When the member funds the deposit and the contract becomes active, Crebit credits spread_revenue_amountonce to your organization's spread ledger. Recovering a failed contract to active also credits once (idempotent per contract).
{
"id": "33333333-3333-4333-8333-333333333333",
"status": "quote_created",
"locked_rate": "5.4200",
"amount_due": "5815.00",
"deposit_amount": "5000.00",
"premium_amount": "815.00",
"spread_percent": "0.5",
"base_amount_due": "5565.00",
"spread_revenue_amount": "250.00",
"spread_revenue_currency": "USD"
}client_spread when you are acting as a member. Public GET /api/v1/fx/contracts responses currently omit the breakdown until that path wires include_spread; use quote responses or the partner portal for reconciliation in the meantime.Response Fields
| Field | Meaning |
|---|---|
| spread_percent | Applied spread as a percent string; "0" when none |
| base_amount_due | Crebit amount_due before your markup |
| spread_revenue_amount | Your organization's revenue for this lock (USD) |
| spread_revenue_currency | Always USD |
| amount_due / premium_amount / upfront_fee | Already include the revenue |
| locked_rate | Unchanged by the spread |
Frozen at Create
The spread percent, base amount due and revenue are saved on the quote and copied to the contract. They never change afterwards, through funding, exercise and settlement. A different spread on a later quote does not affect earlier contracts.
curl -sS -X GET "https://lock-apis-sandbox.crebitpay.com/api/v1/fx/quotes/22222222-2222-4222-8222-222222222222" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: sandbox" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b"What the Member Sees
Your spread is not shown to the member. When the member calls with its own keys (or uses its own partner portal), the breakdown fields are null. The member still sees the higher amount_due they must fund — they just do not see that part of it is your markup.
curl -sS -X GET "https://lock-apis-sandbox.crebitpay.com/api/v1/fx/contracts/33333333-3333-4333-8333-333333333333" \
-H "X-Crebit-Key-Id: MEMBER_KEY_ID" \
-H "X-Crebit-Key-Secret: MEMBER_KEY_SECRET" \
-H "X-Crebit-Environment: sandbox"{
"id": "33333333-3333-4333-8333-333333333333",
"status": "active",
"locked_rate": "5.4200",
"amount_due": "5815.00",
"deposit_amount": "5000.00",
"premium_amount": "815.00",
"spread_percent": null,
"base_amount_due": null,
"spread_revenue_amount": null,
"spread_revenue_currency": null
}Spread Revenue
- Revenue is calculated in USD when the quote is created and shown in
spread_revenue_amount. - When the contract reaches
active(deposit funded), Crebit records that amount once for your organization. Quotes that expire unused, and locks with no spread, record nothing. - Fiat and crypto credits share one organization ledger (all USD). Net revenue = credits − reversals. Crebit ops can reverse a crypto credit (for example after a refund).
- In the partner portal, open Organization → Revenue for combined totals, per-member breakdown and the ledger (period filters: all time, this month, last month, last 30 days).
- The same data is available to the signed-in organization admin (not while acting as a member) at
GET /api/v1/portal/organisation/spread-revenue.
curl -sS -X GET "https://lock-apis-sandbox.crebitpay.com/api/v1/portal/organisation/spread-revenue?limit=50" \
-H "Authorization: Bearer PORTAL_SESSION_TOKEN"{
"organisation_id": "oooooooo-oooo-4ooo-8ooo-oooooooooooo",
"currency": "USD",
"total_credited": "245.00",
"entry_count": 3,
"totals": {
"credited": "250.00",
"reversed": "5.00",
"net": "245.00",
"fiat_net": "0",
"crypto_net": "245.00",
"credit_count": 2,
"reversal_count": 1
},
"members": [
{
"member_partner_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"member_name": "Member Partner Ltda",
"credited": "250.00",
"reversed": "5.00",
"net": "245.00",
"fiat_net": "0",
"crypto_net": "245.00",
"credit_count": 2,
"reversal_count": 1
}
],
"payout_wallet": null,
"entries": [
{
"id": "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
"entry_type": "spread_credit",
"source_product": "fx_forward",
"fx_contract_id": "33333333-3333-4333-8333-333333333333",
"member_partner_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"member_name": "Member Partner Ltda",
"amount": "250.00",
"currency": "USD",
"spread_percent": "0.5",
"created_at": "2026-09-28T14:35:08Z"
}
],
"next_cursor": null
}Query parameters: created_from / created_to (period), member_partner_id (filters the entry list only; totals stay org-wide for the period), limit and cursor for paging entries.
Errors
| Status | code | When |
|---|---|---|
| 400 | invalid_spread_percent | Not a number, negative, above 5, or more than 8 decimal places |
| 422 | validation_error | spread_percent sent as a boolean, or unknown fields on the body |
| 403 | client_spread_not_allowed | Non-zero spread without the acting-as header, or by a caller that is not the member's organization admin |
| 403 | acting_as_not_allowed | The partner is not an active member of your organization |
| 400 | acting_as_self | Acting-as header names your own partner id |
Shared crypto errors are on the Crypto page.