Commerce

Margin, markup, and profit from cost — give cost plus any one of price, target margin %, or markup %, and it solves the rest.

Margin, markup, and profit from cost — give cost plus any one of price, target margin %, or markup %, and it solves the rest.

Payment: x402 ($0.02 USDC on eip155:8453). Call unpaid to receive an HTTP 402 with requirements, then retry with the PAYMENT-SIGNATURE header. Method: from price: profit=price-cost, margin=profit/price, markup=profit/cost; from margin: price=cost/(1-m); from markup: price=cost*(1+mk)

post/v1/commerce/margin

Request

  • Base URL: (relative, and it does not resolve against the document’s source URL)
  • URL: /v1/commerce/margin
  • Auth: none declared

Request body

costnumber required
pricenumber
marginPctnumber
markupPctnumber

Response

Verified result + provenance (formula, sources, reproducible SHA-256 hash).

Changes

No recorded changes to this operation across all 1 revision of this API.