nozle.margin and call GET /api/v1/margin/*.
Methods
Date filters
All methods accept optionalfrom and to strings: a YYYY-MM-DD date or an RFC3339 timestamp. A plain date to includes that whole day; an RFC3339 to is an exclusive instant. If you send only one end, the API derives the other (only to: the month before it; only from: until now). Additional string query parameters are forwarded as provided.
Invalid ranges
An unparseable date, or an end that is not after the start, makes the API answer400. The SDK throws a NozleApiError with the usual margin/summary failed: 400 Bad Request message and the response code on err.code.
Trend granularity
granularity accepts hour, day, week, or month and defaults to day.
Result typing
Margin methods return payloads asunknown; narrow them in your application or validate them with your schema library before use.
The Node SDK does not expose the Margin Simulate API. Call the Margin simulate API directly from your backend when needed.