fmp-data 0.0.0__py3-none-any.whl
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.
- fmp_data/__init__.py +138 -0
- fmp_data/alternative/__init__.py +34 -0
- fmp_data/alternative/client.py +150 -0
- fmp_data/alternative/endpoints.py +533 -0
- fmp_data/alternative/mapping.py +737 -0
- fmp_data/alternative/models.py +296 -0
- fmp_data/alternative/schema.py +165 -0
- fmp_data/base.py +316 -0
- fmp_data/client.py +269 -0
- fmp_data/company/__init__.py +40 -0
- fmp_data/company/client.py +238 -0
- fmp_data/company/endpoints.py +711 -0
- fmp_data/company/hints.py +77 -0
- fmp_data/company/mapping.py +1361 -0
- fmp_data/company/models.py +543 -0
- fmp_data/company/schema.py +132 -0
- fmp_data/config.py +207 -0
- fmp_data/economics/__init__.py +16 -0
- fmp_data/economics/client.py +52 -0
- fmp_data/economics/endpoints.py +164 -0
- fmp_data/economics/mapping.py +641 -0
- fmp_data/economics/models.py +75 -0
- fmp_data/economics/schema.py +91 -0
- fmp_data/exceptions.py +54 -0
- fmp_data/fundamental/__init__.py +40 -0
- fmp_data/fundamental/client.py +87 -0
- fmp_data/fundamental/endpoints.py +403 -0
- fmp_data/fundamental/mapping.py +867 -0
- fmp_data/fundamental/models.py +913 -0
- fmp_data/fundamental/schema.py +40 -0
- fmp_data/institutional/__init__.py +26 -0
- fmp_data/institutional/client.py +141 -0
- fmp_data/institutional/endpoints.py +321 -0
- fmp_data/institutional/mapping.py +749 -0
- fmp_data/institutional/models.py +301 -0
- fmp_data/institutional/schema.py +99 -0
- fmp_data/intelligence/__init__.py +58 -0
- fmp_data/intelligence/client.py +331 -0
- fmp_data/intelligence/endpoints.py +788 -0
- fmp_data/intelligence/mapping.py +1677 -0
- fmp_data/intelligence/models.py +707 -0
- fmp_data/intelligence/schema.py +57 -0
- fmp_data/investment/__init__.py +24 -0
- fmp_data/investment/client.py +104 -0
- fmp_data/investment/endpoints.py +241 -0
- fmp_data/investment/mapping.py +658 -0
- fmp_data/investment/models.py +220 -0
- fmp_data/investment/schema.py +106 -0
- fmp_data/lc/__init__.py +256 -0
- fmp_data/lc/config.py +88 -0
- fmp_data/lc/embedding.py +140 -0
- fmp_data/lc/hints.py +66 -0
- fmp_data/lc/mapping.py +107 -0
- fmp_data/lc/models.py +98 -0
- fmp_data/lc/registry.py +693 -0
- fmp_data/lc/utils.py +35 -0
- fmp_data/lc/validation.py +267 -0
- fmp_data/lc/vector_store.py +592 -0
- fmp_data/logger.py +358 -0
- fmp_data/market/__init__.py +18 -0
- fmp_data/market/client.py +106 -0
- fmp_data/market/endpoints.py +358 -0
- fmp_data/market/hints.py +22 -0
- fmp_data/market/mapping.py +854 -0
- fmp_data/market/models.py +310 -0
- fmp_data/market/schema.py +186 -0
- fmp_data/mcp/__init__.py +0 -0
- fmp_data/mcp/server.py +101 -0
- fmp_data/mcp/tool_loader.py +74 -0
- fmp_data/mcp/tools_manifest.py +17 -0
- fmp_data/models.py +265 -0
- fmp_data/rate_limit.py +136 -0
- fmp_data/schema.py +158 -0
- fmp_data/technical/__init__.py +28 -0
- fmp_data/technical/client.py +214 -0
- fmp_data/technical/endpoints.py +102 -0
- fmp_data/technical/mapping.py +452 -0
- fmp_data/technical/models.py +87 -0
- fmp_data/technical/schema.py +261 -0
- fmp_data-0.0.0.dist-info/METADATA +732 -0
- fmp_data-0.0.0.dist-info/RECORD +84 -0
- fmp_data-0.0.0.dist-info/WHEEL +4 -0
- fmp_data-0.0.0.dist-info/entry_points.txt +10 -0
- fmp_data-0.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
# fmp_data/alternative/endpoints.py
|
|
2
|
+
|
|
3
|
+
from fmp_data.alternative.models import (
|
|
4
|
+
Commodity,
|
|
5
|
+
CommodityIntradayPrice,
|
|
6
|
+
CommodityPriceHistory,
|
|
7
|
+
CommodityQuote,
|
|
8
|
+
CryptoHistoricalData,
|
|
9
|
+
CryptoIntradayPrice,
|
|
10
|
+
CryptoPair,
|
|
11
|
+
CryptoQuote,
|
|
12
|
+
ForexIntradayPrice,
|
|
13
|
+
ForexPair,
|
|
14
|
+
ForexPriceHistory,
|
|
15
|
+
ForexQuote,
|
|
16
|
+
)
|
|
17
|
+
from fmp_data.alternative.schema import (
|
|
18
|
+
CommoditiesListArgs,
|
|
19
|
+
CommoditiesQuotesArgs,
|
|
20
|
+
CommodityHistoricalArgs,
|
|
21
|
+
CommodityIntradayArgs,
|
|
22
|
+
CommodityQuoteArgs,
|
|
23
|
+
CryptoHistoricalArgs,
|
|
24
|
+
CryptoIntradayArgs,
|
|
25
|
+
CryptoListArgs,
|
|
26
|
+
CryptoQuoteArgs,
|
|
27
|
+
CryptoQuotesArgs,
|
|
28
|
+
ForexHistoricalArgs,
|
|
29
|
+
ForexIntradayArgs,
|
|
30
|
+
ForexListArgs,
|
|
31
|
+
ForexQuoteArgs,
|
|
32
|
+
ForexQuotesArgs,
|
|
33
|
+
)
|
|
34
|
+
from fmp_data.models import (
|
|
35
|
+
APIVersion,
|
|
36
|
+
Endpoint,
|
|
37
|
+
EndpointParam,
|
|
38
|
+
HTTPMethod,
|
|
39
|
+
ParamLocation,
|
|
40
|
+
ParamType,
|
|
41
|
+
URLType,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Validation constants
|
|
45
|
+
VALID_INTERVALS = ["1min", "5min", "15min", "30min", "1hour", "4hour"]
|
|
46
|
+
|
|
47
|
+
CRYPTO_LIST: Endpoint = Endpoint(
|
|
48
|
+
name="crypto_list",
|
|
49
|
+
path="symbol/available-cryptocurrencies",
|
|
50
|
+
version=APIVersion.V3,
|
|
51
|
+
url_type=URLType.API,
|
|
52
|
+
method=HTTPMethod.GET,
|
|
53
|
+
description=(
|
|
54
|
+
"Get a comprehensive list of all available cryptocurrencies and "
|
|
55
|
+
"their basic information including symbol, name, and exchange details"
|
|
56
|
+
),
|
|
57
|
+
mandatory_params=[],
|
|
58
|
+
optional_params=[],
|
|
59
|
+
response_model=CryptoPair,
|
|
60
|
+
arg_model=CryptoListArgs,
|
|
61
|
+
example_queries=[
|
|
62
|
+
"List all available cryptocurrencies",
|
|
63
|
+
"Get cryptocurrency trading pairs",
|
|
64
|
+
"Show supported crypto symbols",
|
|
65
|
+
"What cryptocurrencies can I trade?",
|
|
66
|
+
],
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
CRYPTO_QUOTES: Endpoint = Endpoint(
|
|
70
|
+
name="crypto_quotes",
|
|
71
|
+
path="quotes/crypto",
|
|
72
|
+
version=APIVersion.V3,
|
|
73
|
+
url_type=URLType.API,
|
|
74
|
+
method=HTTPMethod.GET,
|
|
75
|
+
description=(
|
|
76
|
+
"Retrieve real-time price quotes for all available cryptocurrencies "
|
|
77
|
+
"including current price, daily change, volume and other key metrics"
|
|
78
|
+
),
|
|
79
|
+
mandatory_params=[],
|
|
80
|
+
optional_params=[],
|
|
81
|
+
response_model=CryptoQuote,
|
|
82
|
+
arg_model=CryptoQuotesArgs,
|
|
83
|
+
example_queries=[
|
|
84
|
+
"Get current prices for all cryptocurrencies",
|
|
85
|
+
"Show real-time crypto quotes",
|
|
86
|
+
"What are the latest cryptocurrency prices?",
|
|
87
|
+
"Get live crypto market data",
|
|
88
|
+
],
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
CRYPTO_QUOTE: Endpoint = Endpoint(
|
|
92
|
+
name="crypto_quote",
|
|
93
|
+
path="quote/{symbol}",
|
|
94
|
+
version=APIVersion.V3,
|
|
95
|
+
url_type=URLType.API,
|
|
96
|
+
method=HTTPMethod.GET,
|
|
97
|
+
description=(
|
|
98
|
+
"Get detailed real-time price quote and trading information for "
|
|
99
|
+
"a specific cryptocurrency including price, volume, change percentage, "
|
|
100
|
+
"and market metrics"
|
|
101
|
+
),
|
|
102
|
+
mandatory_params=[
|
|
103
|
+
EndpointParam(
|
|
104
|
+
name="symbol",
|
|
105
|
+
location=ParamLocation.PATH,
|
|
106
|
+
param_type=ParamType.STRING,
|
|
107
|
+
required=True,
|
|
108
|
+
description="Crypto pair symbol (e.g., BTCUSD)",
|
|
109
|
+
)
|
|
110
|
+
],
|
|
111
|
+
optional_params=[],
|
|
112
|
+
response_model=CryptoQuote,
|
|
113
|
+
arg_model=CryptoQuoteArgs,
|
|
114
|
+
example_queries=[
|
|
115
|
+
"Get Bitcoin price quote",
|
|
116
|
+
"Show current price for ETH",
|
|
117
|
+
"What is the latest price of BTCUSD?",
|
|
118
|
+
"Get detailed quote for a specific cryptocurrency",
|
|
119
|
+
],
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
CRYPTO_HISTORICAL: Endpoint = Endpoint(
|
|
123
|
+
name="crypto_historical",
|
|
124
|
+
path="historical-price-full/{symbol}",
|
|
125
|
+
version=APIVersion.V3,
|
|
126
|
+
url_type=URLType.API,
|
|
127
|
+
method=HTTPMethod.GET,
|
|
128
|
+
description=(
|
|
129
|
+
"Retrieve historical price data for a cryptocurrency over "
|
|
130
|
+
"a specified date range, including daily OHLCV "
|
|
131
|
+
"(Open, High, Low, Close, Volume) data and adjusted prices"
|
|
132
|
+
),
|
|
133
|
+
mandatory_params=[
|
|
134
|
+
EndpointParam(
|
|
135
|
+
name="symbol",
|
|
136
|
+
location=ParamLocation.PATH,
|
|
137
|
+
param_type=ParamType.STRING,
|
|
138
|
+
required=True,
|
|
139
|
+
description="Crypto pair symbol",
|
|
140
|
+
)
|
|
141
|
+
],
|
|
142
|
+
optional_params=[
|
|
143
|
+
EndpointParam(
|
|
144
|
+
name="start_date",
|
|
145
|
+
location=ParamLocation.QUERY,
|
|
146
|
+
param_type=ParamType.DATE,
|
|
147
|
+
required=True,
|
|
148
|
+
description="Start date",
|
|
149
|
+
alias="from",
|
|
150
|
+
),
|
|
151
|
+
EndpointParam(
|
|
152
|
+
name="end_date",
|
|
153
|
+
location=ParamLocation.QUERY,
|
|
154
|
+
param_type=ParamType.DATE,
|
|
155
|
+
required=True,
|
|
156
|
+
description="End date",
|
|
157
|
+
alias="to",
|
|
158
|
+
),
|
|
159
|
+
],
|
|
160
|
+
response_model=CryptoHistoricalData,
|
|
161
|
+
arg_model=CryptoHistoricalArgs,
|
|
162
|
+
example_queries=[
|
|
163
|
+
"Get Bitcoin historical prices",
|
|
164
|
+
"Show ETH price history for last month",
|
|
165
|
+
"Historical crypto data between dates",
|
|
166
|
+
"Get historical OHLCV data for cryptocurrency",
|
|
167
|
+
],
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
CRYPTO_INTRADAY: Endpoint = Endpoint(
|
|
171
|
+
name="crypto_intraday",
|
|
172
|
+
path="historical-chart/{interval}/{symbol}",
|
|
173
|
+
version=APIVersion.V3,
|
|
174
|
+
url_type=URLType.API,
|
|
175
|
+
method=HTTPMethod.GET,
|
|
176
|
+
description=(
|
|
177
|
+
"Get detailed intraday price data for a cryptocurrency at "
|
|
178
|
+
"specified time intervals, perfect for short-term trading "
|
|
179
|
+
"analysis and high-frequency data needs"
|
|
180
|
+
),
|
|
181
|
+
mandatory_params=[
|
|
182
|
+
EndpointParam(
|
|
183
|
+
name="interval",
|
|
184
|
+
location=ParamLocation.PATH,
|
|
185
|
+
param_type=ParamType.STRING,
|
|
186
|
+
required=True,
|
|
187
|
+
description="Time interval between data points",
|
|
188
|
+
valid_values=VALID_INTERVALS,
|
|
189
|
+
),
|
|
190
|
+
EndpointParam(
|
|
191
|
+
name="symbol",
|
|
192
|
+
location=ParamLocation.PATH,
|
|
193
|
+
param_type=ParamType.STRING,
|
|
194
|
+
required=True,
|
|
195
|
+
description="Crypto pair symbol",
|
|
196
|
+
),
|
|
197
|
+
],
|
|
198
|
+
optional_params=[],
|
|
199
|
+
response_model=CryptoIntradayPrice,
|
|
200
|
+
arg_model=CryptoIntradayArgs,
|
|
201
|
+
example_queries=[
|
|
202
|
+
"Get Bitcoin minute-by-minute prices",
|
|
203
|
+
"Show hourly cryptocurrency data",
|
|
204
|
+
"Get intraday crypto prices",
|
|
205
|
+
"Get 5-minute interval prices for ETH",
|
|
206
|
+
],
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
FOREX_LIST: Endpoint = Endpoint(
|
|
210
|
+
name="forex_list",
|
|
211
|
+
path="symbol/available-forex-currency-pairs",
|
|
212
|
+
version=APIVersion.V3,
|
|
213
|
+
url_type=URLType.API,
|
|
214
|
+
method=HTTPMethod.GET,
|
|
215
|
+
description=(
|
|
216
|
+
"Get a complete list of available forex currency pairs with "
|
|
217
|
+
"their symbols and basic trading information"
|
|
218
|
+
),
|
|
219
|
+
mandatory_params=[],
|
|
220
|
+
optional_params=[],
|
|
221
|
+
response_model=ForexPair,
|
|
222
|
+
arg_model=ForexListArgs,
|
|
223
|
+
example_queries=[
|
|
224
|
+
"List all forex pairs",
|
|
225
|
+
"Show available currency pairs",
|
|
226
|
+
"What forex pairs can I trade?",
|
|
227
|
+
"Get forex trading pairs list",
|
|
228
|
+
],
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
FOREX_QUOTES: Endpoint = Endpoint(
|
|
232
|
+
name="forex_quotes",
|
|
233
|
+
path="quotes/forex",
|
|
234
|
+
version=APIVersion.V3,
|
|
235
|
+
url_type=URLType.API,
|
|
236
|
+
method=HTTPMethod.GET,
|
|
237
|
+
description=(
|
|
238
|
+
"Retrieve real-time quotes for all available forex currency pairs "
|
|
239
|
+
"including current exchange rates and daily changes"
|
|
240
|
+
),
|
|
241
|
+
mandatory_params=[],
|
|
242
|
+
optional_params=[],
|
|
243
|
+
response_model=ForexQuote,
|
|
244
|
+
arg_model=ForexQuotesArgs,
|
|
245
|
+
example_queries=[
|
|
246
|
+
"Get all forex quotes",
|
|
247
|
+
"Show current exchange rates",
|
|
248
|
+
"Get live forex prices",
|
|
249
|
+
"Current forex market rates",
|
|
250
|
+
],
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
FOREX_QUOTE: Endpoint = Endpoint(
|
|
254
|
+
name="forex_quote",
|
|
255
|
+
path="quote/{symbol}",
|
|
256
|
+
version=APIVersion.V3,
|
|
257
|
+
url_type=URLType.API,
|
|
258
|
+
method=HTTPMethod.GET,
|
|
259
|
+
description=(
|
|
260
|
+
"Get detailed real-time quote for a specific forex "
|
|
261
|
+
"currency pair including current rate, daily change, and trading metrics"
|
|
262
|
+
),
|
|
263
|
+
mandatory_params=[
|
|
264
|
+
EndpointParam(
|
|
265
|
+
name="symbol",
|
|
266
|
+
location=ParamLocation.PATH,
|
|
267
|
+
param_type=ParamType.STRING,
|
|
268
|
+
required=True,
|
|
269
|
+
description="Forex pair symbol",
|
|
270
|
+
)
|
|
271
|
+
],
|
|
272
|
+
optional_params=[],
|
|
273
|
+
response_model=ForexQuote,
|
|
274
|
+
arg_model=ForexQuoteArgs,
|
|
275
|
+
example_queries=[
|
|
276
|
+
"Get EURUSD exchange rate",
|
|
277
|
+
"Show current price for GBPUSD",
|
|
278
|
+
"What is the latest USDJPY rate?",
|
|
279
|
+
"Get forex pair quote",
|
|
280
|
+
],
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
FOREX_HISTORICAL: Endpoint = Endpoint(
|
|
284
|
+
name="forex_historical",
|
|
285
|
+
path="historical-price-full/{symbol}",
|
|
286
|
+
version=APIVersion.V3,
|
|
287
|
+
url_type=URLType.API,
|
|
288
|
+
method=HTTPMethod.GET,
|
|
289
|
+
description=(
|
|
290
|
+
"Access historical exchange rate data for forex pairs "
|
|
291
|
+
"over a specified date range, including daily rates and price changes"
|
|
292
|
+
),
|
|
293
|
+
mandatory_params=[
|
|
294
|
+
EndpointParam(
|
|
295
|
+
name="symbol",
|
|
296
|
+
location=ParamLocation.PATH,
|
|
297
|
+
param_type=ParamType.STRING,
|
|
298
|
+
required=True,
|
|
299
|
+
description="Forex pair symbol",
|
|
300
|
+
)
|
|
301
|
+
],
|
|
302
|
+
optional_params=[
|
|
303
|
+
EndpointParam(
|
|
304
|
+
name="start_date",
|
|
305
|
+
location=ParamLocation.QUERY,
|
|
306
|
+
param_type=ParamType.DATE,
|
|
307
|
+
required=True,
|
|
308
|
+
description="Start date",
|
|
309
|
+
alias="from",
|
|
310
|
+
),
|
|
311
|
+
EndpointParam(
|
|
312
|
+
name="end_date",
|
|
313
|
+
location=ParamLocation.QUERY,
|
|
314
|
+
param_type=ParamType.DATE,
|
|
315
|
+
required=True,
|
|
316
|
+
description="End date",
|
|
317
|
+
alias="to",
|
|
318
|
+
),
|
|
319
|
+
],
|
|
320
|
+
response_model=ForexPriceHistory,
|
|
321
|
+
arg_model=ForexHistoricalArgs,
|
|
322
|
+
example_queries=[
|
|
323
|
+
"Get historical EURUSD rates",
|
|
324
|
+
"Show forex pair price history",
|
|
325
|
+
"Historical exchange rates between dates",
|
|
326
|
+
"Get past forex prices",
|
|
327
|
+
],
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
FOREX_INTRADAY: Endpoint = Endpoint(
|
|
331
|
+
name="forex_intraday",
|
|
332
|
+
path="historical-chart/{interval}/{symbol}",
|
|
333
|
+
version=APIVersion.V3,
|
|
334
|
+
url_type=URLType.API,
|
|
335
|
+
method=HTTPMethod.GET,
|
|
336
|
+
description=(
|
|
337
|
+
"Retrieve intraday exchange rate data for forex pairs "
|
|
338
|
+
"at specified intervals, ideal for day trading and "
|
|
339
|
+
"short-term analysis"
|
|
340
|
+
),
|
|
341
|
+
mandatory_params=[
|
|
342
|
+
EndpointParam(
|
|
343
|
+
name="interval",
|
|
344
|
+
location=ParamLocation.PATH,
|
|
345
|
+
param_type=ParamType.STRING,
|
|
346
|
+
required=True,
|
|
347
|
+
description="Time interval between data points",
|
|
348
|
+
valid_values=VALID_INTERVALS,
|
|
349
|
+
),
|
|
350
|
+
EndpointParam(
|
|
351
|
+
name="symbol",
|
|
352
|
+
location=ParamLocation.PATH,
|
|
353
|
+
param_type=ParamType.STRING,
|
|
354
|
+
required=True,
|
|
355
|
+
description="Forex pair symbol",
|
|
356
|
+
),
|
|
357
|
+
],
|
|
358
|
+
optional_params=[],
|
|
359
|
+
response_model=ForexIntradayPrice,
|
|
360
|
+
arg_model=ForexIntradayArgs,
|
|
361
|
+
example_queries=[
|
|
362
|
+
"Get minute-by-minute EURUSD data",
|
|
363
|
+
"Show hourly forex rates",
|
|
364
|
+
"Get intraday currency prices",
|
|
365
|
+
"5-minute interval forex data",
|
|
366
|
+
],
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
COMMODITIES_LIST: Endpoint = Endpoint(
|
|
370
|
+
name="commodities_list",
|
|
371
|
+
path="symbol/available-commodities",
|
|
372
|
+
version=APIVersion.V3,
|
|
373
|
+
url_type=URLType.API,
|
|
374
|
+
method=HTTPMethod.GET,
|
|
375
|
+
description=(
|
|
376
|
+
"Get a comprehensive list of all available commodity "
|
|
377
|
+
"symbols and their basic trading information"
|
|
378
|
+
),
|
|
379
|
+
mandatory_params=[],
|
|
380
|
+
optional_params=[],
|
|
381
|
+
response_model=Commodity,
|
|
382
|
+
arg_model=CommoditiesListArgs,
|
|
383
|
+
example_queries=[
|
|
384
|
+
"List all commodities",
|
|
385
|
+
"Show available commodity symbols",
|
|
386
|
+
"What commodities can I trade?",
|
|
387
|
+
"Get commodities trading list",
|
|
388
|
+
],
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
COMMODITIES_QUOTES: Endpoint = Endpoint(
|
|
392
|
+
name="commodities_quotes",
|
|
393
|
+
path="quotes/commodity",
|
|
394
|
+
version=APIVersion.V3,
|
|
395
|
+
url_type=URLType.API,
|
|
396
|
+
method=HTTPMethod.GET,
|
|
397
|
+
description=(
|
|
398
|
+
"Retrieve real-time quotes for all available commodities "
|
|
399
|
+
"including current prices, daily changes, and trading volumes"
|
|
400
|
+
),
|
|
401
|
+
mandatory_params=[],
|
|
402
|
+
optional_params=[],
|
|
403
|
+
response_model=CommodityQuote,
|
|
404
|
+
arg_model=CommoditiesQuotesArgs,
|
|
405
|
+
example_queries=[
|
|
406
|
+
"Get all commodity prices",
|
|
407
|
+
"Show current commodity quotes",
|
|
408
|
+
"Get live commodity market data",
|
|
409
|
+
"Latest commodities prices",
|
|
410
|
+
],
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
COMMODITY_QUOTE: Endpoint = Endpoint(
|
|
414
|
+
name="commodity_quote",
|
|
415
|
+
path="quote/{symbol}",
|
|
416
|
+
version=APIVersion.V3,
|
|
417
|
+
url_type=URLType.API,
|
|
418
|
+
method=HTTPMethod.GET,
|
|
419
|
+
description=(
|
|
420
|
+
"Get detailed real-time price quote for a specific commodity "
|
|
421
|
+
"including current price, daily change, trading volume and "
|
|
422
|
+
"other key market metrics"
|
|
423
|
+
),
|
|
424
|
+
mandatory_params=[
|
|
425
|
+
EndpointParam(
|
|
426
|
+
name="symbol",
|
|
427
|
+
location=ParamLocation.PATH,
|
|
428
|
+
param_type=ParamType.STRING,
|
|
429
|
+
required=True,
|
|
430
|
+
description="Commodity symbol (e.g., GC for Gold, CL for Crude Oil)",
|
|
431
|
+
)
|
|
432
|
+
],
|
|
433
|
+
optional_params=[],
|
|
434
|
+
response_model=CommodityQuote,
|
|
435
|
+
arg_model=CommodityQuoteArgs,
|
|
436
|
+
example_queries=[
|
|
437
|
+
"Get gold price quote",
|
|
438
|
+
"Show current oil price",
|
|
439
|
+
"What is the latest silver price?",
|
|
440
|
+
"Get real-time commodity quote",
|
|
441
|
+
"Current price for specific commodity",
|
|
442
|
+
],
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
COMMODITY_HISTORICAL: Endpoint = Endpoint(
|
|
446
|
+
name="commodity_historical",
|
|
447
|
+
path="historical-price-full/{symbol}",
|
|
448
|
+
version=APIVersion.V3,
|
|
449
|
+
url_type=URLType.API,
|
|
450
|
+
method=HTTPMethod.GET,
|
|
451
|
+
description=(
|
|
452
|
+
"Retrieve comprehensive historical price data for a "
|
|
453
|
+
"commodity over a specified date range, including "
|
|
454
|
+
"daily OHLCV (Open, High, Low, Close, Volume) data, "
|
|
455
|
+
"adjusted prices, and price change metrics"
|
|
456
|
+
),
|
|
457
|
+
mandatory_params=[
|
|
458
|
+
EndpointParam(
|
|
459
|
+
name="symbol",
|
|
460
|
+
location=ParamLocation.PATH,
|
|
461
|
+
param_type=ParamType.STRING,
|
|
462
|
+
required=True,
|
|
463
|
+
description="Commodity symbol (e.g., GC, CL, SI)",
|
|
464
|
+
)
|
|
465
|
+
],
|
|
466
|
+
optional_params=[
|
|
467
|
+
EndpointParam(
|
|
468
|
+
name="start_date", # Changed from "from"
|
|
469
|
+
location=ParamLocation.QUERY,
|
|
470
|
+
param_type=ParamType.DATE,
|
|
471
|
+
required=False,
|
|
472
|
+
description="Start date for historical data",
|
|
473
|
+
),
|
|
474
|
+
EndpointParam(
|
|
475
|
+
name="end_date", # Changed from "to"
|
|
476
|
+
location=ParamLocation.QUERY,
|
|
477
|
+
param_type=ParamType.DATE,
|
|
478
|
+
required=False,
|
|
479
|
+
description="End date for historical data",
|
|
480
|
+
),
|
|
481
|
+
],
|
|
482
|
+
response_model=CommodityPriceHistory,
|
|
483
|
+
arg_model=CommodityHistoricalArgs,
|
|
484
|
+
example_queries=[
|
|
485
|
+
"Get gold price history",
|
|
486
|
+
"Show historical oil prices",
|
|
487
|
+
"Get commodity prices between dates",
|
|
488
|
+
"Historical OHLCV data for commodity",
|
|
489
|
+
"Past price data for precious metals",
|
|
490
|
+
"Get commodity price trends",
|
|
491
|
+
],
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
COMMODITY_INTRADAY: Endpoint = Endpoint(
|
|
495
|
+
name="commodity_intraday",
|
|
496
|
+
path="historical-chart/{interval}/{symbol}",
|
|
497
|
+
version=APIVersion.V3,
|
|
498
|
+
url_type=URLType.API,
|
|
499
|
+
method=HTTPMethod.GET,
|
|
500
|
+
description=(
|
|
501
|
+
"Access detailed intraday price data for commodities "
|
|
502
|
+
"at specified time intervals. Provides high-frequency "
|
|
503
|
+
"price data including open, high, low, close prices and volume"
|
|
504
|
+
),
|
|
505
|
+
mandatory_params=[
|
|
506
|
+
EndpointParam(
|
|
507
|
+
name="interval",
|
|
508
|
+
location=ParamLocation.PATH,
|
|
509
|
+
param_type=ParamType.STRING,
|
|
510
|
+
required=True,
|
|
511
|
+
description="Time interval between data points",
|
|
512
|
+
valid_values=VALID_INTERVALS,
|
|
513
|
+
),
|
|
514
|
+
EndpointParam(
|
|
515
|
+
name="symbol",
|
|
516
|
+
location=ParamLocation.PATH,
|
|
517
|
+
param_type=ParamType.STRING,
|
|
518
|
+
required=True,
|
|
519
|
+
description="Commodity symbol",
|
|
520
|
+
),
|
|
521
|
+
],
|
|
522
|
+
optional_params=[],
|
|
523
|
+
response_model=CommodityIntradayPrice,
|
|
524
|
+
arg_model=CommodityIntradayArgs,
|
|
525
|
+
example_queries=[
|
|
526
|
+
"Get minute-by-minute gold prices",
|
|
527
|
+
"Show hourly oil price data",
|
|
528
|
+
"Get intraday commodity prices",
|
|
529
|
+
"5-minute interval silver prices",
|
|
530
|
+
"Get high-frequency commodity data",
|
|
531
|
+
"Real-time commodity price updates",
|
|
532
|
+
],
|
|
533
|
+
)
|