You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: consolidate API into unified fetchMarkets and fetchEvents (v1.7.0)
- Add fetchMarkets() with query/slug parameters (replaces searchMarkets/getMarketsBySlug)
- Add fetchEvents() with query parameter (replaces searchEvents)
- Deprecate old methods with console warnings (removal in v2.0)
- Update all examples and tests to use new API
- Update API references, changelog, and migration guide
Copy file name to clipboardExpand all lines: MIGRATION.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,55 @@
1
1
# Migration Guide
2
2
3
-
## Feb 3, 2026 - v1.5.8: Unified Filtering
3
+
## Feb 3, 2026 - v1.7.0: CCXT-Style Unified API
4
+
5
+
### Change
6
+
Consolidated `searchMarkets()`, `getMarketsBySlug()`, and `searchEvents()` into unified `fetchMarkets()` and `fetchEvents()` methods that accept optional parameters, following CCXT conventions.
7
+
8
+
### What's Deprecated
9
+
The following methods are now deprecated and will be removed in v2.0:
10
+
-`searchMarkets(query, params)` → Use `fetchMarkets({ query, ...params })`
11
+
-`getMarketsBySlug(slug)` → Use `fetchMarkets({ slug })`
12
+
-`searchEvents(query, params)` → Use `fetchEvents({ query, ...params })`
13
+
14
+
Deprecation warnings will appear in the console when using the old methods.
Copy file name to clipboardExpand all lines: changelog.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,25 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [1.7.0] - 2026-02-03
6
+
7
+
### Added
8
+
-**Unified API Consolidation**: Consolidated `searchMarkets()`, `getMarketsBySlug()`, and `searchEvents()` into new CCXT-style `fetchMarkets()` and `fetchEvents()` methods.
9
+
- New methods accept a unified `params` object (TS) or keyword arguments (Python).
10
+
- Supports `query` and `slug` as standard parameters.
11
+
-**Improved CCXT Compatibility**: Aligned the API structure more closely with the CCXT standard for easier cross-platform migration.
12
+
13
+
### Deprecated
14
+
-`searchMarkets(query, params)`: Use `fetchMarkets({ query, ...params })` instead.
15
+
-`getMarketsBySlug(slug)`: Use `fetchMarkets({ slug })` instead.
16
+
-`searchEvents(query, params)`: Use `fetchEvents({ query, ...params })` instead.
17
+
- These methods will be removed in v2.0. Deprecation warnings have been added.
18
+
19
+
### Improved
20
+
-**BaseExchange Architecture**: Moved search routing logic into the `BaseExchange` class to reduce duplication across exchange implementations.
21
+
-**Example Modernization**: All core and SDK examples updated to use the new unified API patterns.
22
+
-**Test Coverage**: Added compliance tests for the new `fetchMarkets` and `fetchEvents` implementations.
| Platform | Example Market URL | What to extract (Slug/Ticker) | Logic |
77
-
|---|---|---|---|
78
-
|**Kalshi**|`kalshi.com/markets/kxfedchairnom/.../kxfedchairnom-29`|`KXFEDCHAIRNOM-29`| The **last** path segment of the URL. |
79
-
|**Polymarket**|`polymarket.com/event/who-will-trump-nominate-as-fed-chair`|`who-will-trump-nominate-as-fed-chair`| The slug immediately after `/event/`. |
80
90
81
91
---
82
92
@@ -90,7 +100,7 @@ Get historical price candles.
90
100
-**Kalshi**: `outcome.outcomeId` is the Market Ticker
0 commit comments