nozle.margin. All methods accept optional query params such as from and to date strings.
Python reserves from as a keyword, so pass date filters with dictionary expansion when you need the exact query parameter name:
Summary
By Customer
By Metric
By Plan
By Model
Trend
Parameters
Margin query params:from(string, optional) — Start date (ISO 8601)to(string, optional) — End date (ISO 8601)
granularity("hour"|"day"|"week"|"month", default:"day")
All margin endpoints require a secret key (
sk_). These are the same endpoints exposed at GET /api/v1/margin/* on the Nozle API.