narwhalapi 0.3.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- narwhalapi-0.5.0/CHANGELOG.md +212 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/PKG-INFO +15 -4
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/README.md +13 -3
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/pyproject.toml +2 -1
- narwhalapi-0.5.0/src/narwhalapi/_generated/__init__.py +3 -0
- narwhalapi-0.5.0/src/narwhalapi/_generated/models.py +7020 -0
- narwhalapi-0.5.0/src/narwhalapi/_generated/operations.py +10888 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/_transport.py +6 -1
- narwhalapi-0.5.0/src/narwhalapi/_version.py +1 -0
- narwhalapi-0.5.0/src/narwhalapi/models.py +607 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/webhooks.py +18 -1
- narwhalapi-0.3.0/CHANGELOG.md +0 -49
- narwhalapi-0.3.0/src/narwhalapi/_generated/__init__.py +0 -3
- narwhalapi-0.3.0/src/narwhalapi/_generated/models.py +0 -4007
- narwhalapi-0.3.0/src/narwhalapi/_generated/operations.py +0 -7058
- narwhalapi-0.3.0/src/narwhalapi/_version.py +0 -1
- narwhalapi-0.3.0/src/narwhalapi/models.py +0 -357
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/LICENSE +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/hatch_build.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/__init__.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/_client.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/_deadline.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/_decode.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/_meta.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/_pagination.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/codes.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/errors.py +0 -0
- {narwhalapi-0.3.0 → narwhalapi-0.5.0}/src/narwhalapi/py.typed +0 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0 — 2026-10-29
|
|
4
|
+
|
|
5
|
+
Breaking: FX bar prices are `Decimal` values now.
|
|
6
|
+
New: stocks, funds, crypto, company calendars, central banks, the Filings API and custom series.
|
|
7
|
+
|
|
8
|
+
- FX bars: `FxBar.open`, `high`, `low` and `close` are `Decimal` instead of `str`, like every
|
|
9
|
+
other price in the SDK.
|
|
10
|
+
Migrate: `Decimal(bar.close)` still works; use `str(bar.close)` where text is needed.
|
|
11
|
+
- History reads: the economics `*_history` methods (`cpi_history`, `gdp_history`,
|
|
12
|
+
`gdp_growth_history`, `inflation_history`, `labour_force_participation_history`,
|
|
13
|
+
`unemployment_history`, `trade_history`) take optional `as_of` and `version`;
|
|
14
|
+
`yield_curve_history` takes `as_of` only. Observation rows have an optional
|
|
15
|
+
`first_reported_at`, and `ResourceHistory` has an optional `as_of`.
|
|
16
|
+
- Financials: `FinancialRow.items` skips null item values instead of failing the response.
|
|
17
|
+
- Docs: GDP growth `quarter_over_quarter` says it is not annualized. Paged responses say
|
|
18
|
+
`next_cursor` is always sent and is `None` on the last page. Holiday years are 1900-2200.
|
|
19
|
+
Calendar subscription methods list their 401, 404, 429 and 503 errors.
|
|
20
|
+
- Stocks: `client.equities` reads prices (`price`, `prices`), daily bars (`bars`), profiles,
|
|
21
|
+
dividends, splits, earnings, valuation and its history, movers, search and cost of capital.
|
|
22
|
+
US listings on NYSE, Nasdaq and NYSE American, and Korea. Ids look like `XNAS:AAPL`.
|
|
23
|
+
- Funds: `client.funds` reads ETF prices and mutual fund NAVs (`price`, `prices`), bars,
|
|
24
|
+
profiles, distributions and search. `price` answers an ETF or a mutual fund NAV, told apart
|
|
25
|
+
by `type`.
|
|
26
|
+
- Crypto: `client.crypto` reads pair prices (`price`, `prices`), bars and the pair list
|
|
27
|
+
(`list_pairs`).
|
|
28
|
+
- Company calendars: `client.company_calendars` lists upcoming `dividends` and `splits`.
|
|
29
|
+
- Central banks: `economics` reads policy rates (`policy_rate`, `policy_rate_history`), central
|
|
30
|
+
bank balance sheets (`central_bank_balance_sheet`) and reserves (`central_bank_reserves`). A
|
|
31
|
+
policy rate is a point rate (`PointPolicyRate`) or a target range (`RangePolicyRate`).
|
|
32
|
+
- Equity risk premium: `economics` reads the premium investors need for a country's shares
|
|
33
|
+
(Free plan): `list_equity_risk_premium` for every country, `get_equity_risk_premium` for one
|
|
34
|
+
country (optional `date`) and `equity_risk_premium_history` (with `equity_risk_premium_history_iter`).
|
|
35
|
+
`EquityRiskPremium` splits `total_erp` into `mature_erp` and `country_risk_premium`, all in
|
|
36
|
+
percent as `Decimal`, with a `basis` for each part.
|
|
37
|
+
- Companies: `filings.company` returns `CompanyWithListings`, a company with the stock listing
|
|
38
|
+
ids (`listings`) you can pass to `client.equities`.
|
|
39
|
+
- Filings API: `client.filings` (and `AsyncNarwhal`) reads company financials, filings,
|
|
40
|
+
holders and as-reported statements: `search_companies`, `company`, `financials`,
|
|
41
|
+
`list_company_filings`, `filing`, `list_latest_filings`, `list_holders` and `as_reported`.
|
|
42
|
+
Every money, share, percent and ratio value is a `Decimal` with the exact wire text.
|
|
43
|
+
A `FinancialRow` holds its period fields (`fy`, `fq`, `fh`, `end`, `currency`, `derived`) and
|
|
44
|
+
all financial items in `row.items`, a `dict[str, Decimal]` such as `row.items["revenue"]`.
|
|
45
|
+
- Custom series: `economics` can search the series catalogue (`search_catalogue`), read one series
|
|
46
|
+
(`read_catalogue_series`), its observations (`read_catalogue_observations`) and the latest value
|
|
47
|
+
of several at once (`read_catalogue_latest_batch`). Series ids look like `fred:unrate`.
|
|
48
|
+
`read_series_observations` also takes `as_of` and `version` (Pro plan).
|
|
49
|
+
- Registries: filings cover 31 registries (`usa`, `jpn`, `kor`, `twn`, `gbr` and 26 EU and EEA
|
|
50
|
+
countries). The UK is covered for UK issuers on regulated markets (annual reports), and `gbr`
|
|
51
|
+
company ids are LEIs, for example `gbr:549300MKFYEKVRWML317`. Taiwan includes TPEx issuers
|
|
52
|
+
(listing MIC `ROCO`) besides `XTAI`.
|
|
53
|
+
- Taiwan: filings accept `period="semiannual"`. Taiwan reports semiannual year-to-date income
|
|
54
|
+
statements and balance sheets.
|
|
55
|
+
- As-reported statements are available for US filings only; other registries answer
|
|
56
|
+
`as_reported_unavailable` (404).
|
|
57
|
+
- Webhooks: the new `filings` family and the `companies` watch list on destinations;
|
|
58
|
+
deliveries for it carry a `filing` record (`FilingWebhookEvent`).
|
|
59
|
+
|
|
60
|
+
## 0.4.0 — 2026-10-22
|
|
61
|
+
|
|
62
|
+
Breaking: 0.3.x fails on calls changed by the API contracts of 21-22 October 2026.
|
|
63
|
+
Upgrade to 0.4.0 for these calls. 0.4.0 fails against gateways using the old response
|
|
64
|
+
formats. Fields the API omits when empty are now optional (`None`). Lists are always present.
|
|
65
|
+
|
|
66
|
+
- Trade: the four separate export and import methods are removed (`economics.trade_exports`,
|
|
67
|
+
`trade_exports_history`, `trade_imports`, `trade_imports_history`). Their routes no longer
|
|
68
|
+
exist. `economics.trade` and `economics.trade_history` return exports and imports in one
|
|
69
|
+
row. The models `TradeExports`, `TradeImports` and `TradeProductFilter` are removed, and
|
|
70
|
+
`TradeSummary` has no `coverage`.
|
|
71
|
+
Migrate: call the combined methods and read `exports` and `imports` from the row.
|
|
72
|
+
- Economics series: `Cpi` has an `index_base` string instead of `base_period` and
|
|
73
|
+
`base_value`. `Inflation`, `Unemployment` and `LabourForceParticipation` have no `unit`.
|
|
74
|
+
`SeriesSource` has no `released_on_basis`.
|
|
75
|
+
Migrate: read `index_base`; drop reads of `unit`.
|
|
76
|
+
- GDP: `Gdp` drops `seasonal_adjustment`, `annualization` and `price_basis`. `GdpGrowth` drops
|
|
77
|
+
`seasonal_adjustment`, `quarter_over_quarter_seasonal_adjustment`,
|
|
78
|
+
`year_over_year_seasonal_adjustment`, `annualization`, `price_basis` and `unit`. The
|
|
79
|
+
optional flags `annualized` and `not_seasonally_adjusted` (and, on growth,
|
|
80
|
+
`quarter_over_quarter_not_seasonally_adjusted` and `year_over_year_not_seasonally_adjusted`)
|
|
81
|
+
are present only when true.
|
|
82
|
+
Migrate: treat a missing flag as false.
|
|
83
|
+
- Economics history: `HistoricalEconomicsResponse` and `HistoricalObservation` are removed.
|
|
84
|
+
Each indicator has its own response type (`CpiHistory`, `GdpHistory`, `GdpGrowthHistory`,
|
|
85
|
+
`InflationHistory`, `RateHistory`, `TradeHistory`) with matching `...Observation` rows.
|
|
86
|
+
Rows contain only `period` and `value` (trade rows hold `exports` and `imports`).
|
|
87
|
+
Migrate: use the new response and observation types.
|
|
88
|
+
- Economic calendar: `EconomicRelease` is replaced by `EconomicReleaseSummary` (lists) and
|
|
89
|
+
`EconomicReleaseDetail` (`economics.get_release`). `indicators` is now `values`
|
|
90
|
+
(`EconomicReleaseValue`). The `EconomicReleaseIndicator` and `EconomicReleaseSchedule`
|
|
91
|
+
models are removed. The schedule now uses the flat fields `at`, `date`, `between` and `by`.
|
|
92
|
+
`reference_period` is renamed to `period`. `title`, `variant` and `officially_published_at`
|
|
93
|
+
are removed. `EconomicCalendar` has no `as_of`, `snapshot` or `status`. `between` is a list
|
|
94
|
+
of two dates.
|
|
95
|
+
Migrate: read the flat schedule fields and `values`.
|
|
96
|
+
- Holidays: `CalendarHolidays.year`, `CalendarHolidaysOnDate.date`,
|
|
97
|
+
`CalendarNextHoliday.from_date`, `nationwide` (on coverage and holidays) and
|
|
98
|
+
`TopicCalendar.variant` are removed.
|
|
99
|
+
Migrate: use the values from your request.
|
|
100
|
+
- FX and commodities: `FxConversion` has no `amount`. `FxHistory` has no `has_more`; its
|
|
101
|
+
`start_date` and `end_date` are optional. `FxBars` and `CommodityBars` have no `interval`,
|
|
102
|
+
and `start` and `end` appear only when the range was clipped. `Quote.role` is removed.
|
|
103
|
+
`PhysicalSeries` has `country` and no `market` or `publisher`; its list call has no `market`
|
|
104
|
+
parameter. `attribution` is now required on `PhysicalSeries`, `PhysicalLatest` and
|
|
105
|
+
`PhysicalObservations`.
|
|
106
|
+
Migrate: use the amount you sent; filter series by country.
|
|
107
|
+
- Palm oil: `PalmoilScalarSeries.commodity`, `PalmoilScheduleSeries.commodity` and
|
|
108
|
+
`PalmoilScheduleSeries.producer_type` are removed.
|
|
109
|
+
Migrate: remove reads of these fields.
|
|
110
|
+
- Prediction event fields: events no longer have `body`, `quality` or `shape`. The models
|
|
111
|
+
`BinaryBody`, `ScalarBody`, `ExtremeBody`, `TimingBody`, `PredictionQuality`,
|
|
112
|
+
`PredictionResolution`, `ScalarSummary` and `ScalarSummaryBounds` are removed. Each event
|
|
113
|
+
type carries its own fields: binary `probability`, `quotes`, `labels`; scalar `median`,
|
|
114
|
+
`p10`, `p90`, `above`, `outcomes`; extreme `up`, `down`, `observation`, `window`; timing
|
|
115
|
+
`steps`, `not_within_window`. All have `resolves_with` and `stale`. `resolution` is now a
|
|
116
|
+
plain string instead of an object with `description` and `resolves_with`.
|
|
117
|
+
Migrate: read event fields directly; use `resolves_with` for `resolution.resolves_with`.
|
|
118
|
+
- Prediction venues, lists and history: `PredictionVenue` has no `role`, `venue_event_id`,
|
|
119
|
+
`depth_usd` or `fetched_at`. `settlement` is now an optional string instead of an object
|
|
120
|
+
with `status`. The `VenueSettlement` model is removed. `match` is optional.
|
|
121
|
+
`PredictionEventSummary` has no `as_of`. `PredictionTopicDetail.events` is a list of the new
|
|
122
|
+
`PredictionTopicEvent` (no `topic_id` or `shape`). `next_event_id` is removed.
|
|
123
|
+
`PredictionHistory` has no `event_id`, `shape`, `interval`, `start` or `captured_from`, and
|
|
124
|
+
`end` is optional. `PredictionBar` has `timestamp` instead of `start` and `end`.
|
|
125
|
+
`PolicyPath` and `PolicyPathHistory` have no `authority`, `method` or `unit`; the history
|
|
126
|
+
has `meeting_dates` (`PolicyPathMeetingDate`), and `PolicyPathDay.meetings` is a list of the
|
|
127
|
+
new `PolicyPathOdds` (no `resolves_at`). `PredictionWebhookEvent.event_id` is
|
|
128
|
+
`prediction_event_id`.
|
|
129
|
+
Migrate: use the new types and read the settlement string directly.
|
|
130
|
+
- Prediction results: events and event summaries now include `result` (`PredictionResult`)
|
|
131
|
+
with `final`, `settled_at`, `amended_at` and the settled `markets` for each venue.
|
|
132
|
+
`unavailable` is sent for each venue only when true.
|
|
133
|
+
Migrate: read results from events or event summaries.
|
|
134
|
+
- Events and webhooks: `EventDetail` is now the event itself, with no `event` wrapper or
|
|
135
|
+
`status`. `EventsPage` has no `status`. `DeliveryEvent` has no `event_type`,
|
|
136
|
+
`schema_version`, `publication_id` or `holiday_country`. `WebhookEvent` has no `is_test`,
|
|
137
|
+
`publication_id` or `holiday_country`. Test deliveries use the event type `webhook.test`.
|
|
138
|
+
The webhook verifier accepts both new bodies with null fields omitted and old bodies. For
|
|
139
|
+
old prediction bodies whose market is named `event_id`, it fills `prediction_event_id`.
|
|
140
|
+
Migrate: read event fields directly; check `type` instead of `is_test`.
|
|
141
|
+
- Webhook records: `WebhookConfigurationHistory` renames `version` to `config_version` and
|
|
142
|
+
removes `destination_id` and `activation_snapshot`. `WebhookDestinationList.limit` is renamed
|
|
143
|
+
to `destination_limit`. `WebhookDeliveriesResponse` has no `limit`.
|
|
144
|
+
`WebhookDelivery.next_attempt_at`, `retry_until` and `replays` are optional.
|
|
145
|
+
`WebhookTestResponse` has no `destination_id`. `CalendarSubscriptionCreated` has no
|
|
146
|
+
`refresh_note`.
|
|
147
|
+
Migrate: rename the fields; handle missing values.
|
|
148
|
+
- No-content responses: `webhooks.delete_destination`, `webhooks.replay_delivery` and
|
|
149
|
+
`calendar_subscriptions.revoke` respond with `204` and return an empty `NoContent` object.
|
|
150
|
+
The models `WebhookDeleteResponse`, `WebhookReplayResponse` and
|
|
151
|
+
`CalendarSubscriptionRevoked` are removed.
|
|
152
|
+
Migrate: stop reading `deleted`, `replayed` and `revoked`; success means no error.
|
|
153
|
+
- Errors: `Problem` has no `instance` or `ok`.
|
|
154
|
+
Migrate: remove reads of these fields.
|
|
155
|
+
- Calendar `view`: the SDK no longer offers or sends this parameter. The API ignores it. Lists
|
|
156
|
+
always contain the full release.
|
|
157
|
+
Migrate: no changes needed.
|
|
158
|
+
- Enums removed with their fields: `Annualization`, `CentralBank`,
|
|
159
|
+
`GrowthSeasonalAdjustment`, `IndicatorValueStatus`, `PredictionInterval`, `QuoteFreshness`,
|
|
160
|
+
`QuoteRole`, `SchedulePrecision`, `ScheduleTimeBasis`, `SeasonalAdjustment`, `ValueScale`,
|
|
161
|
+
`ValueTransformation`. New: `EconomicReleaseValueValueStatus`, `PredictionVenueSettlement`,
|
|
162
|
+
`ScalarEventAbove`.
|
|
163
|
+
Migrate: remove references to the removed enums.
|
|
164
|
+
- README lists the product's key pages as full URLs.
|
|
165
|
+
|
|
166
|
+
## 0.3.0 — 2026-10-18
|
|
167
|
+
|
|
168
|
+
- Breaking: `webhooks.verify` now returns a `WebhookEvent`, read from the delivery bodies the
|
|
169
|
+
API documents. 0.2.0 read deliveries as the REST `DeliveryEvent`, which needs an `event_type`
|
|
170
|
+
field that webhook bodies never carry, so it rejected real deliveries with `invalid_body`.
|
|
171
|
+
`WebhookEvent` reads economics, release calendar and holiday events, prediction events
|
|
172
|
+
(`prediction`, with the event status and venue settlements) and test deliveries (`is_test`,
|
|
173
|
+
no `cursor`). Unknown event types still decode, with the type kept as a string.
|
|
174
|
+
- `economics.read_series_observations(series_id, ...)` reads the observations of one economic
|
|
175
|
+
series by its id, with a page iterator (`read_series_observations_iter`).
|
|
176
|
+
- Prediction history (`binary_history`, `scalar_history`, `extreme_history`, `timing_history`)
|
|
177
|
+
now comes in pages of about 5,000 bars with a `next_cursor`. Pass `cursor`, or use the new
|
|
178
|
+
`…_iter` iterators, to read a whole window; each page repeats the series keys with the next
|
|
179
|
+
slice of bars. The API pages these responses for every version, so 0.2.0 sees only the first
|
|
180
|
+
page of a wide window.
|
|
181
|
+
- Webhook destinations carry `disabled_reason`: `customer` (switched off by the account),
|
|
182
|
+
`plan_limit` (paused because the plan no longer includes it) or none.
|
|
183
|
+
- New code constants for the documented errors: `SNAPSHOT_UNAVAILABLE`, `REQUEST_TOO_LARGE`,
|
|
184
|
+
`RIGHTS_STATE_CHANGING`, `COMMAND_UNAVAILABLE`, `PHYSICAL_SERIES_NOT_FOUND`,
|
|
185
|
+
`PHYSICAL_REFERENCE_UNAVAILABLE`, `EVENT_NOT_FOUND`, `PREDICTIONS_UNAVAILABLE` and
|
|
186
|
+
`LIMIT_REACHED`.
|
|
187
|
+
- No change on the wire: the contract now names the palm oil price unions and the shared
|
|
188
|
+
problem response, and documents `400` instead of `422` for webhook and calendar subscription
|
|
189
|
+
validation errors, which is what the API always returned.
|
|
190
|
+
|
|
191
|
+
## 0.2.0 — 2026-10-12
|
|
192
|
+
|
|
193
|
+
- Breaking: economic calendar releases now carry Narwhal's English `name`, a permanent
|
|
194
|
+
`series_id`, a `topic` and a `stage` beside the publisher's `title`, and each schedule
|
|
195
|
+
carries its `local_date`. The API lists releases compactly by default; the SDK always asks
|
|
196
|
+
for the full release (`view=full`), so every field stays typed. Research articles are no
|
|
197
|
+
longer listed.
|
|
198
|
+
- `CALENDAR_NOT_PUBLISHED` for the 404 returned when a holiday calendar year is not published.
|
|
199
|
+
- FX bars publish their five fields again in the contract (no wire change).
|
|
200
|
+
|
|
201
|
+
## 0.1.0 — 2026-10-09
|
|
202
|
+
|
|
203
|
+
- Initial typed synchronous and asynchronous clients for the stable API: economics,
|
|
204
|
+
FX, calendars, physical palm oil, spot prices (`commodities.spot_price`), events,
|
|
205
|
+
webhook destinations and calendar subscriptions.
|
|
206
|
+
- `nw.unstable` holds operations not yet in the live API; it is empty in this release.
|
|
207
|
+
- Exact decimals, typed errors, bounded retries, page iterators, response metadata,
|
|
208
|
+
and local webhook signature verification.
|
|
209
|
+
- `codes.PLAN_UPGRADE_REQUIRED` for the 403 returned when a request reaches before the
|
|
210
|
+
plan's history window.
|
|
211
|
+
- The release also covers prediction market reads, FX and commodity bar history, and physical commodity reference price series.
|
|
212
|
+
- Spot `bid` and `ask` are optional because the API may omit them.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: narwhalapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Typed clients for the Narwhal API
|
|
5
5
|
Project-URL: Homepage, https://narwhalapi.com
|
|
6
|
+
Project-URL: Repository, https://github.com/narwhalapi/narwhalapi-python
|
|
6
7
|
Author-email: Narwhal API Team <support@narwhalapi.com>
|
|
7
8
|
License-Expression: MIT
|
|
8
9
|
License-File: LICENSE
|
|
@@ -25,8 +26,8 @@ Description-Content-Type: text/markdown
|
|
|
25
26
|
|
|
26
27
|
# Narwhal API for Python
|
|
27
28
|
|
|
28
|
-
Typed synchronous and asynchronous clients for economics, foreign exchange, calendars,
|
|
29
|
-
physical palm oil, physical commodity reference prices, spot gold and silver, prediction markets, FX and commodity bar history, and webhook delivery. Python 3.10 or newer. Install with `pip install narwhalapi`.
|
|
29
|
+
Typed synchronous and asynchronous clients for economics (including the equity risk premium), foreign exchange, calendars,
|
|
30
|
+
stocks, funds, crypto, company calendars, company filings and financials, physical palm oil, physical commodity reference prices, spot gold and silver, prediction markets, FX and commodity bar history, and webhook delivery. Python 3.10 or newer. Install with `pip install narwhalapi`.
|
|
30
31
|
|
|
31
32
|
Set `NARWHAL_API_KEY` in the environment. Keep keys on the server. The default base URL is
|
|
32
33
|
`https://api.narwhalapi.com`; override it with `NARWHAL_BASE_URL` or `base_url=`.
|
|
@@ -74,7 +75,8 @@ Context managers close connections; explicit `close()` and `await aclose()` also
|
|
|
74
75
|
|
|
75
76
|
## Operations and types
|
|
76
77
|
|
|
77
|
-
Namespaces are `economics`, `fx`, `calendars`, `commodities`, `
|
|
78
|
+
Namespaces are `economics`, `fx`, `calendars`, `commodities`, `equities`, `funds`, `crypto`,
|
|
79
|
+
`company_calendars`, `filings`, `predictions`, `events`, `webhooks`, and
|
|
78
80
|
`calendar_subscriptions`. Operations not yet in the live API appear under `nw.unstable`;
|
|
79
81
|
there are none today.
|
|
80
82
|
Models and known string constants are available through `narwhalapi.models`,
|
|
@@ -155,3 +157,12 @@ event = verify(raw_body, request.headers, webhook_secret)
|
|
|
155
157
|
|
|
156
158
|
Do not parse and re-serialize the body before verification. A verification failure raises
|
|
157
159
|
`errors.WebhookVerificationError` with a `reason`. Neither framework is a package dependency.
|
|
160
|
+
|
|
161
|
+
## Links
|
|
162
|
+
|
|
163
|
+
- https://narwhalapi.com/
|
|
164
|
+
- https://narwhalapi.com/docs
|
|
165
|
+
- https://narwhalapi.com/pricing
|
|
166
|
+
- https://narwhalapi.com/compare/economic-data-apis
|
|
167
|
+
- https://narwhalapi.com/commodities/gold
|
|
168
|
+
- https://narwhalapi.com/economics/united-states
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Narwhal API for Python
|
|
2
2
|
|
|
3
|
-
Typed synchronous and asynchronous clients for economics, foreign exchange, calendars,
|
|
4
|
-
physical palm oil, physical commodity reference prices, spot gold and silver, prediction markets, FX and commodity bar history, and webhook delivery. Python 3.10 or newer. Install with `pip install narwhalapi`.
|
|
3
|
+
Typed synchronous and asynchronous clients for economics (including the equity risk premium), foreign exchange, calendars,
|
|
4
|
+
stocks, funds, crypto, company calendars, company filings and financials, physical palm oil, physical commodity reference prices, spot gold and silver, prediction markets, FX and commodity bar history, and webhook delivery. Python 3.10 or newer. Install with `pip install narwhalapi`.
|
|
5
5
|
|
|
6
6
|
Set `NARWHAL_API_KEY` in the environment. Keep keys on the server. The default base URL is
|
|
7
7
|
`https://api.narwhalapi.com`; override it with `NARWHAL_BASE_URL` or `base_url=`.
|
|
@@ -49,7 +49,8 @@ Context managers close connections; explicit `close()` and `await aclose()` also
|
|
|
49
49
|
|
|
50
50
|
## Operations and types
|
|
51
51
|
|
|
52
|
-
Namespaces are `economics`, `fx`, `calendars`, `commodities`, `
|
|
52
|
+
Namespaces are `economics`, `fx`, `calendars`, `commodities`, `equities`, `funds`, `crypto`,
|
|
53
|
+
`company_calendars`, `filings`, `predictions`, `events`, `webhooks`, and
|
|
53
54
|
`calendar_subscriptions`. Operations not yet in the live API appear under `nw.unstable`;
|
|
54
55
|
there are none today.
|
|
55
56
|
Models and known string constants are available through `narwhalapi.models`,
|
|
@@ -130,3 +131,12 @@ event = verify(raw_body, request.headers, webhook_secret)
|
|
|
130
131
|
|
|
131
132
|
Do not parse and re-serialize the body before verification. A verification failure raises
|
|
132
133
|
`errors.WebhookVerificationError` with a `reason`. Neither framework is a package dependency.
|
|
134
|
+
|
|
135
|
+
## Links
|
|
136
|
+
|
|
137
|
+
- https://narwhalapi.com/
|
|
138
|
+
- https://narwhalapi.com/docs
|
|
139
|
+
- https://narwhalapi.com/pricing
|
|
140
|
+
- https://narwhalapi.com/compare/economic-data-apis
|
|
141
|
+
- https://narwhalapi.com/commodities/gold
|
|
142
|
+
- https://narwhalapi.com/economics/united-states
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "narwhalapi"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.5.0"
|
|
8
8
|
description = "Typed clients for the Narwhal API"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -33,6 +33,7 @@ classifiers = [
|
|
|
33
33
|
|
|
34
34
|
[project.urls]
|
|
35
35
|
Homepage = "https://narwhalapi.com"
|
|
36
|
+
Repository = "https://github.com/narwhalapi/narwhalapi-python"
|
|
36
37
|
|
|
37
38
|
[tool.hatch.build.targets.wheel]
|
|
38
39
|
packages = ["src/narwhalapi"]
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Generated from spec/live/openapi.json sha256 5071bd97e9507eb56b344d00a24ba056ce1340fe1184faa4d755fe7e407e1cf6. Do not edit.
|
|
2
|
+
# Generated from spec/next/openapi.json sha256 5071bd97e9507eb56b344d00a24ba056ce1340fe1184faa4d755fe7e407e1cf6. Do not edit.
|
|
3
|
+
"""Generated contract surface."""
|