btgsolutions-dataservices-python-client 4.2.0__tar.gz → 4.2.1__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.
Files changed (49) hide show
  1. {btgsolutions_dataservices_python_client-4.2.0/btgsolutions_dataservices_python_client.egg-info → btgsolutions_dataservices_python_client-4.2.1}/PKG-INFO +1 -1
  2. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/__init__.py +1 -1
  3. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/__init__.py +1 -0
  4. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/dataservices_catalog.py +195 -35
  5. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1/btgsolutions_dataservices_python_client.egg-info}/PKG-INFO +1 -1
  6. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/LICENSE +0 -0
  7. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/MANIFEST.in +0 -0
  8. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/README.md +0 -0
  9. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/config.py +0 -0
  10. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/exceptions.py +0 -0
  11. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/alternative_data_catalog.py +0 -0
  12. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/alternative_data_companies.py +0 -0
  13. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/alternative_data_funds.py +0 -0
  14. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/alternative_data_macro_markets.py +0 -0
  15. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/alternative_data_metadata.py +0 -0
  16. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/alternative_data_ownership.py +0 -0
  17. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/alternative_data_people.py +0 -0
  18. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/authenticator.py +0 -0
  19. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/book_scope.py +0 -0
  20. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/broker_analytics.py +0 -0
  21. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/broker_reference.py +0 -0
  22. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/bulk_data.py +0 -0
  23. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/company_data.py +0 -0
  24. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
  25. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/hfn.py +0 -0
  26. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
  27. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/historical_candles_crypto.py +0 -0
  28. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/intraday_candles.py +0 -0
  29. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
  30. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/public_sources.py +0 -0
  31. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/quotes.py +0 -0
  32. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/reference_data.py +0 -0
  33. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/stock_loan.py +0 -0
  34. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
  35. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/rest/ticker_last_event_polling.py +0 -0
  36. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/websocket/__init__.py +0 -0
  37. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/websocket/broker_analytics.py +0 -0
  38. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -0
  39. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/websocket/market_data_feed.py +0 -0
  40. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +0 -0
  41. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
  42. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +0 -0
  43. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
  44. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices_python_client.egg-info/requires.txt +0 -0
  45. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
  46. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/pyproject.toml +0 -0
  47. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/requirements.txt +0 -0
  48. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/setup.cfg +0 -0
  49. {btgsolutions_dataservices_python_client-4.2.0 → btgsolutions_dataservices_python_client-4.2.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: btgsolutions_dataservices_python_client
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Summary: Python package containing several classes and data for extracting and manipulating market and trading data.
5
5
  Home-page: https://github.com/BTG-Pactual-Solutions/btgsolutions-dataservices-python-client
6
6
  Author: BTG Solutions Data Services powered by BTG Pactual Solutions
@@ -1,4 +1,4 @@
1
- __version__ = "4.2.0"
1
+ __version__ = "4.2.1"
2
2
 
3
3
  from .websocket import *
4
4
  from .rest import *
@@ -41,6 +41,7 @@ from .dataservices_catalog import (
41
41
  DATASERVICES_ENDPOINT_DESCRIPTIONS,
42
42
  DATASERVICES_ENDPOINT_RELATIONSHIPS,
43
43
  DATASERVICES_ENDPOINTS,
44
+ DATASERVICES_RESULT_CONTRACTS,
44
45
  DATASERVICES_TOOL_DESCRIPTIONS,
45
46
  DATASERVICES_TOOL_ENDPOINTS,
46
47
  get_dataservices_endpoint,
@@ -44,61 +44,64 @@ DATASERVICES_ENDPOINT_RELATIONSHIPS: dict[str, str] = {
44
44
  "requesting quotes, candles, last events, bulk data or stock-loan data "
45
45
  "when the ticker universe is uncertain."
46
46
  ),
47
+ "crypto_ticker_discovery": (
48
+ "Use the crypto available-tickers endpoint for the target exchange/date "
49
+ "before requesting crypto candles when the supported crypto universe is "
50
+ "uncertain. This discovery is separate from B3 equity/derivatives "
51
+ "coverage."
52
+ ),
47
53
  "reference_enrichment": (
48
- "Use ReferenceData.ticker_reference to enrich tickers with instrument "
54
+ "Use get_ticker_reference to enrich tickers with instrument "
49
55
  "metadata such as security id, currency, lot size and tick size before "
50
56
  "joining market-data results across tools."
51
57
  ),
52
58
  "events_price_context": (
53
- "Use CorporateEvents.get to identify ex-date corporate events and then "
59
+ "Use get_corporate_events to identify ex-date corporate events and then "
54
60
  "compare with historical candles or quotes. If corporate_events_adj is "
55
61
  "true, historical candle prices are adjusted for events."
56
62
  ),
57
63
  "hfn_filter_discovery": (
58
- "Use HighFrequencyNews.get_available_filters to discover countries, "
59
- "sources, feeds and languages before calling latest or historical news "
60
- "with narrow filters."
64
+ "Use get_news_filters to discover countries, sources, feeds and "
65
+ "languages before calling latest or historical news with narrow filters."
61
66
  ),
62
67
  "broker_reference": (
63
- "Use BrokerReference.get to map broker codes and names before broker "
68
+ "Use get_broker_reference to map broker codes and names before broker "
64
69
  "analytics. Broker analytics is D0 realtime data and should not be read "
65
70
  "as historical broker flow."
66
71
  ),
67
72
  "bulk_data_discovery": (
68
- "Use BulkData.get_available_tickers and get_market_data_channels before "
73
+ "Use list_bulk_data_tickers and list_bulk_market_data_channels before "
69
74
  "requesting ticker/date bulk data or compressed market-data files."
70
75
  ),
71
76
  "book_scope_microstructure": (
72
- "BookScope.get combines trades, book snapshots and incremental book "
77
+ "get_book_scope combines trades, book snapshots and incremental book "
73
78
  "events for one symbol and a short time window. Use it for microstructure "
74
79
  "questions after a ticker, market_type and event window are known."
75
80
  ),
76
81
  "company_identifier_bridge": (
77
- "Use AlternativeDataMetadata.get_company_directory or an MCP company "
78
- "resolution workflow to translate company names, CNPJ, CVM code or ISIN "
79
- "into B3 tickers before requesting quotes, candles, intraday trades, "
80
- "last events, stock-loan, broker analytics or book-scope data. Use "
81
- "company, governance, ownership and statement endpoints after market "
82
- "data when business context is needed."
82
+ "Use search_companies or resolve_company_identifier to translate company "
83
+ "names, CNPJ, CVM code or ISIN into B3 tickers before requesting quotes, "
84
+ "candles, intraday trades, last events, stock-loan, broker analytics or "
85
+ "book-scope data. Use company, governance, ownership and statement "
86
+ "endpoints after market data when business context is needed."
83
87
  ),
84
88
  "sector_peer_market_bridge": (
85
- "Use AlternativeDataMetadata.get_company_sector and "
86
- "get_sector_companies to build a peer ticker universe, then compare "
89
+ "Use get_company_sector and get_companies_by_sector to build a peer "
90
+ "ticker universe, then compare "
87
91
  "quotes, historical candle returns, liquidity, stock-loan data or "
88
92
  "broker-flow metrics across the peer set."
89
93
  ),
90
94
  "fund_market_exposure_bridge": (
91
- "Use AlternativeDataFunds.get_fund_holdings, get_fund_exposures, "
92
- "get_fund_lookthrough or AlternativeDataOwnership.get_asset_fund_holders "
93
- "to derive underlying tickers, then use ReferenceData, Quotes, Candles "
94
- "and StockLoan to analyze the market behavior and liquidity of those "
95
- "exposures."
95
+ "Use get_fund_holdings, get_fund_exposures, get_fund_lookthrough or "
96
+ "get_asset_fund_holders to derive underlying tickers, then use "
97
+ "get_ticker_reference, quotes, candles and stock-loan tools to analyze "
98
+ "the market behavior and liquidity of those exposures."
96
99
  ),
97
100
  "ownership_liquidity_bridge": (
98
- "Use AlternativeDataOwnership.get_ownership_current, get_control_group "
99
- "and get_free_float with quotes, historical volume, stock-loan trades "
100
- "and broker analytics to contextualize float, liquidity and flow. These "
101
- "joins provide context and should not be treated as proof of causality."
101
+ "Use get_ownership_current, get_control_group and get_free_float with "
102
+ "quotes, historical volume, stock-loan trades and broker analytics to "
103
+ "contextualize float, liquidity and flow. These joins provide context "
104
+ "and should not be treated as proof of causality."
102
105
  ),
103
106
  "public_document_event_bridge": (
104
107
  "Use Public Sources disclosures, assemblies, official notices, HFN news "
@@ -107,10 +110,104 @@ DATASERVICES_ENDPOINT_RELATIONSHIPS: dict[str, str] = {
107
110
  "BookScope windows for event analysis."
108
111
  ),
109
112
  "macro_market_bridge": (
110
- "Use AlternativeDataMacroMarkets.get_macro_indicators with sector peer "
111
- "sets, company fundamentals and historical candles to frame macro "
112
- "exposure, sensitivity or co-movement. This is analytical context, not "
113
- "a causal model by itself."
113
+ "Use get_macro_observations with sector peer sets, company fundamentals "
114
+ "and historical candles to frame macro exposure, sensitivity or "
115
+ "co-movement. This is analytical context, not a causal model by itself."
116
+ ),
117
+ }
118
+
119
+
120
+ DATASERVICES_RESULT_CONTRACTS: dict[str, str] = {
121
+ "quotes": (
122
+ "MCP result is a dataset handle whose rows are current quote snapshots, "
123
+ "typically one row per ticker. Common fields include ticker, price "
124
+ "fields, financial volume, traded volume, variation fields, "
125
+ "last_close_time and currency."
126
+ ),
127
+ "candles": (
128
+ "MCP result is a dataset handle with one row per candle. Common fields "
129
+ "include symbol or ticker, candle_time or date, open_time, close_time, "
130
+ "open_price, close_price, high_price, low_price, number_of_trades, "
131
+ "financial_volume and volume. Datetime fields follow the requested "
132
+ "timezone parameter."
133
+ ),
134
+ "crypto_candles": (
135
+ "MCP result is a dataset handle with crypto OHLCV time-series rows. "
136
+ "These rows are market-data time series only and do not join naturally "
137
+ "to B3 company, CVM filing, ownership, sector or governance endpoints."
138
+ ),
139
+ "intraday_candles": (
140
+ "MCP result is a dataset handle with current-session candle rows, often "
141
+ "grouped by ticker. Use the requested timezone and candle_period when "
142
+ "joining or aggregating."
143
+ ),
144
+ "tick_data": (
145
+ "MCP result is a dataset handle with current-day tick trade rows. Use "
146
+ "trade timestamps for ordering and compare with intraday candles or "
147
+ "book-scope data only after aligning timezones."
148
+ ),
149
+ "last_event": (
150
+ "MCP result is a dataset handle with the latest snapshot rows for the "
151
+ "requested event family. It is a current snapshot, not a historical "
152
+ "time series."
153
+ ),
154
+ "reference_data": (
155
+ "MCP result is a dataset handle with instrument reference rows. Common "
156
+ "fields include ticker or symbol, security identifiers, market type, "
157
+ "currency, lot size and tick size."
158
+ ),
159
+ "corporate_events": (
160
+ "MCP result is a dataset handle with corporate-event rows by ex-date "
161
+ "and ticker when available. Use it to explain price adjustment context "
162
+ "and then confirm issuer identity before joining with disclosures or "
163
+ "news."
164
+ ),
165
+ "company_data": (
166
+ "MCP result is a dataset handle. General-info output usually has one "
167
+ "row per ticker with identity, sector and description fields. "
168
+ "Financial-table output is table-specific and can be wide; columns may "
169
+ "represent periods or financial line items, so inspect the dataset "
170
+ "schema before ranking or comparing values. Valuation tables commonly "
171
+ "include fields such as EV/Revenues, EV/EBITDA, P/E, Price/BV, Dividend "
172
+ "Yield (%), EBITDA, EBIT, market capitalization and net debt when "
173
+ "available. Income-statement, balance-sheet, cash-flow, ratios, growth "
174
+ "and interims tables have different shapes. Values, units and currency "
175
+ "must be read from the returned table fields."
176
+ ),
177
+ "news": (
178
+ "MCP result is a dataset handle with HFN item rows. Common fields "
179
+ "include _id, title, url, published_at, ingested_at, metadata, tags or "
180
+ "processed content fields. Use published_at for event windows, inspect "
181
+ "metadata/tags before assigning a company, and deduplicate by _id or "
182
+ "url when combining latest and historical queries."
183
+ ),
184
+ "stock_loan": (
185
+ "MCP result is a dataset handle with stock-loan trade rows or ticker "
186
+ "coverage rows. Common fields include ticker, trade date, quantity and "
187
+ "rate, but inspect the returned schema before calculations."
188
+ ),
189
+ "bulk_data": (
190
+ "MCP result is a dataset handle for large tick, book or security-list "
191
+ "files. For data_type='trades', expect trade-level rows; for "
192
+ "data_type='books', expect book snapshot/order-book rows; for "
193
+ "data_type='trades-and-book-events', expect a mix of trade and book "
194
+ "event records; the security-list endpoint returns one row per listed "
195
+ "instrument. Exact columns depend on source file, so inspect the schema "
196
+ "before filtering, joining or exporting."
197
+ ),
198
+ "broker_reference": (
199
+ "MCP result is a dataset handle mapping broker codes and names. Use "
200
+ "this before broker analytics when users provide broker names."
201
+ ),
202
+ "broker_analytics": (
203
+ "MCP result is a dataset handle with D0 broker-flow analytics rows or "
204
+ "named blocks. It is current-trading-day data, not a historical broker "
205
+ "position or inventory database."
206
+ ),
207
+ "book_scope": (
208
+ "MCP result is a dataset handle with selected book-scope datasets such "
209
+ "as trades, book_snapshot and book_incremental. Timestamps are UTC ISO "
210
+ "datetimes and the request window is capped at 10 minutes."
114
211
  ),
115
212
  }
116
213
 
@@ -176,6 +273,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
176
273
  "ticker_discovery", "company_identifier_bridge",
177
274
  "sector_peer_market_bridge",
178
275
  ],
276
+ "result_contract": (
277
+ "MCP result is a dataset handle with quote-coverage tickers for the "
278
+ "requested market_type and mode. It is a discovery result, not a "
279
+ "price snapshot."
280
+ ),
179
281
  },
180
282
  "HistoricalCandles.get_intraday_history_candles": {
181
283
  "category": "candles",
@@ -271,6 +373,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
271
373
  "ticker_discovery", "company_identifier_bridge",
272
374
  "sector_peer_market_bridge",
273
375
  ],
376
+ "result_contract": (
377
+ "MCP result is a dataset handle with tickers that have historical "
378
+ "candle coverage for the requested market_type and date. It is a "
379
+ "discovery result, not candle OHLCV data."
380
+ ),
274
381
  },
275
382
  "HistoricalCandlesCrypto.get_intraday_history_candles": {
276
383
  "category": "crypto_candles",
@@ -289,9 +396,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
289
396
  "candle": "Candle interval such as 1s, 30s, 1m, 5m, 15m, 30m or 1h.",
290
397
  "timezone": "Datetime timezone: America/Sao_Paulo or UTC.",
291
398
  },
292
- "relationships": [
293
- "ticker_discovery", "company_identifier_bridge",
294
- "public_document_event_bridge",
399
+ "relationships": ["crypto_ticker_discovery"],
400
+ "caveats": [
401
+ "Crypto candles are standalone crypto time series; do not route them "
402
+ "through B3 company, CVM, ownership, sector or governance joins "
403
+ "unless the user explicitly asks for cross-asset context."
295
404
  ],
296
405
  },
297
406
  "HistoricalCandlesCrypto.get_interday_history_candles": {
@@ -311,7 +420,12 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
311
420
  "end_date": "End date in YYYY-MM-DD.",
312
421
  "timezone": "Datetime timezone: America/Sao_Paulo or UTC.",
313
422
  },
314
- "relationships": ["ticker_discovery"],
423
+ "relationships": ["crypto_ticker_discovery"],
424
+ "caveats": [
425
+ "Crypto candles are standalone crypto time series; do not route them "
426
+ "through B3 company, CVM, ownership, sector or governance joins "
427
+ "unless the user explicitly asks for cross-asset context."
428
+ ],
315
429
  },
316
430
  "HistoricalCandlesCrypto.get_available_tickers": {
317
431
  "category": "crypto_candles",
@@ -323,7 +437,15 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
323
437
  "exchange": "Exchange: coinbase, mercado_bitcoin or consolidated.",
324
438
  "date": "Coverage date in YYYY-MM-DD.",
325
439
  },
326
- "relationships": ["ticker_discovery"],
440
+ "relationships": ["crypto_ticker_discovery"],
441
+ "result_contract": (
442
+ "MCP result is a dataset handle with crypto ticker coverage for the "
443
+ "requested exchange/date. It is a discovery result, not candle OHLCV "
444
+ "data."
445
+ ),
446
+ "caveats": [
447
+ "Crypto coverage discovery is separate from B3 ticker discovery."
448
+ ],
327
449
  },
328
450
  "IntradayCandles.get_intraday_candles": {
329
451
  "category": "intraday_candles",
@@ -360,6 +482,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
360
482
  "delay": "Data delay: realtime or delayed.",
361
483
  },
362
484
  "relationships": ["ticker_discovery"],
485
+ "result_contract": (
486
+ "MCP result is a dataset handle with tickers that have current-session "
487
+ "intraday-candle coverage for the requested market_type and delay. "
488
+ "It is a discovery result, not candle OHLCV data."
489
+ ),
363
490
  },
364
491
  "IntradayTickData.get_trades": {
365
492
  "category": "tick_data",
@@ -442,6 +569,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
442
569
  "relationships": [
443
570
  "ticker_discovery", "company_identifier_bridge",
444
571
  ],
572
+ "result_contract": (
573
+ "MCP result is a dataset handle with tickers available for the "
574
+ "requested last-event family and data_type. It is a discovery result, "
575
+ "not a last trade or top-of-book snapshot."
576
+ ),
445
577
  },
446
578
  "ReferenceData.ticker_reference": {
447
579
  "category": "reference_data",
@@ -614,6 +746,12 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
614
746
  "text_languages": "Optional language filter list.",
615
747
  },
616
748
  "relationships": ["hfn_filter_discovery"],
749
+ "result_contract": (
750
+ "MCP result is a dataset handle containing "
751
+ "available HFN filter values such as countries, sources, source "
752
+ "types, feeds and text languages. It is discovery metadata, not news "
753
+ "items."
754
+ ),
617
755
  },
618
756
  "StockLoan.get_paginated_trades": {
619
757
  "category": "stock_loan",
@@ -645,6 +783,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
645
783
  "ticker_discovery", "company_identifier_bridge",
646
784
  "ownership_liquidity_bridge", "fund_market_exposure_bridge",
647
785
  ],
786
+ "result_contract": (
787
+ "MCP result is a dataset handle with tickers covered by stock-loan "
788
+ "daily-trade queries. It is a discovery result, not stock-loan trade "
789
+ "data."
790
+ ),
648
791
  },
649
792
  "BulkData.get_available_tickers": {
650
793
  "category": "bulk_data",
@@ -664,6 +807,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
664
807
  "bulk_data_discovery", "ticker_discovery",
665
808
  "company_identifier_bridge", "book_scope_microstructure",
666
809
  ],
810
+ "result_contract": (
811
+ "MCP result is a dataset handle with bulk-data ticker coverage for "
812
+ "the requested date, data_type and optional prefix. It is a discovery "
813
+ "result, not the bulk file contents."
814
+ ),
667
815
  "caveats": [
668
816
  "Use a narrow prefix when possible. Broad prefixes or highly active "
669
817
  "B3 roots can be slow or time out upstream; a precise prefix such as "
@@ -683,6 +831,11 @@ DATASERVICES_ENDPOINTS: dict[str, dict[str, Any]] = {
683
831
  "date": "Coverage date in YYYY-MM-DD.",
684
832
  },
685
833
  "relationships": ["bulk_data_discovery"],
834
+ "result_contract": (
835
+ "MCP result is a dataset handle with available compressed market-data "
836
+ "channels for the requested date. It is discovery metadata for bulk "
837
+ "downloads."
838
+ ),
686
839
  },
687
840
  "BulkData.get_data": {
688
841
  "category": "bulk_data",
@@ -881,6 +1034,9 @@ def _compose_endpoint_description(endpoint: dict[str, Any]) -> str:
881
1034
  "Related workflow: "
882
1035
  + " ".join(DATASERVICES_ENDPOINT_RELATIONSHIPS[key] for key in relationships)
883
1036
  )
1037
+ result_contract = endpoint.get("result_contract") or DATASERVICES_RESULT_CONTRACTS.get(endpoint.get("category", ""))
1038
+ if result_contract:
1039
+ parts.append("Result contract: " + result_contract)
884
1040
  caveats = endpoint.get("caveats") or []
885
1041
  if caveats:
886
1042
  parts.append("Caveats: " + " ".join(caveats))
@@ -902,7 +1058,11 @@ DATASERVICES_TOOL_DESCRIPTIONS: dict[str, str] = {
902
1058
  def get_dataservices_endpoint(name: str) -> dict[str, Any]:
903
1059
  endpoint_key = DATASERVICES_TOOL_ENDPOINTS.get(name, name)
904
1060
  try:
905
- return deepcopy(DATASERVICES_ENDPOINTS[endpoint_key])
1061
+ endpoint = deepcopy(DATASERVICES_ENDPOINTS[endpoint_key])
1062
+ result_contract = endpoint.get("result_contract") or DATASERVICES_RESULT_CONTRACTS.get(endpoint.get("category", ""))
1063
+ if result_contract:
1064
+ endpoint["result_contract"] = result_contract
1065
+ return endpoint
906
1066
  except KeyError:
907
1067
  raise KeyError(f"Unknown Data Services endpoint or MCP tool: {name}") from None
908
1068
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: btgsolutions_dataservices_python_client
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Summary: Python package containing several classes and data for extracting and manipulating market and trading data.
5
5
  Home-page: https://github.com/BTG-Pactual-Solutions/btgsolutions-dataservices-python-client
6
6
  Author: BTG Solutions Data Services powered by BTG Pactual Solutions