Septzzz commited on
Commit
ad89e73
·
verified ·
1 Parent(s): 1075fa7

Upload folder using huggingface_hub (part 15)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. toolbench/toolenv/tools/Finance/stock_cryptocurrency_forex_market_data.json +253 -0
  3. toolbench/toolenv/tools/Finance/stock_data.json +37 -0
  4. toolbench/toolenv/tools/Finance/stock_data/api.py +29 -0
  5. toolbench/toolenv/tools/Finance/stock_finance/api.py +78 -0
  6. toolbench/toolenv/tools/Finance/stock_forecasting_ai_model.json +50 -0
  7. toolbench/toolenv/tools/Finance/stock_forecasting_ai_model/api.py +29 -0
  8. toolbench/toolenv/tools/Finance/stock_info.json +53 -0
  9. toolbench/toolenv/tools/Finance/stock_info/api.py +29 -0
  10. toolbench/toolenv/tools/Finance/stock_intrinsic_value.json +34 -0
  11. toolbench/toolenv/tools/Finance/stock_intrinsic_value/api.py +29 -0
  12. toolbench/toolenv/tools/Finance/stock_market.json +77 -0
  13. toolbench/toolenv/tools/Finance/stock_market/api.py +78 -0
  14. toolbench/toolenv/tools/Finance/stock_mentions.json +103 -0
  15. toolbench/toolenv/tools/Finance/stock_mentions/api.py +94 -0
  16. toolbench/toolenv/tools/Finance/stock_news.json +24 -0
  17. toolbench/toolenv/tools/Finance/stock_news/api.py +29 -0
  18. toolbench/toolenv/tools/Finance/stock_news_sentiment_stockshark.json +43 -0
  19. toolbench/toolenv/tools/Finance/stock_news_sentiment_stockshark/api.py +30 -0
  20. toolbench/toolenv/tools/Finance/stock_price.json +141 -0
  21. toolbench/toolenv/tools/Finance/stock_price/api.py +29 -0
  22. toolbench/toolenv/tools/Finance/stock_prices.json +0 -0
  23. toolbench/toolenv/tools/Finance/stock_prices/api.py +407 -0
  24. toolbench/toolenv/tools/Finance/stock_scraper.json +93 -0
  25. toolbench/toolenv/tools/Finance/stock_scraper/api.py +50 -0
  26. toolbench/toolenv/tools/Finance/stock_sentiment_api.json +111 -0
  27. toolbench/toolenv/tools/Finance/stock_sentiment_api/api.py +101 -0
  28. toolbench/toolenv/tools/Finance/stockapi.json +211 -0
  29. toolbench/toolenv/tools/Finance/stockapi/api.py +176 -0
  30. toolbench/toolenv/tools/Finance/stockbrain_data.json +33 -0
  31. toolbench/toolenv/tools/Finance/stockexchangeapi.json +60 -0
  32. toolbench/toolenv/tools/Finance/stockexchangeapi/api.py +31 -0
  33. toolbench/toolenv/tools/Finance/stockfluence/api.py +200 -0
  34. toolbench/toolenv/tools/Finance/stockpulse.json +30 -0
  35. toolbench/toolenv/tools/Finance/stocks_archive.json +218 -0
  36. toolbench/toolenv/tools/Finance/stocks_archive/api.py +75 -0
  37. toolbench/toolenv/tools/Finance/stocksearch.json +298 -0
  38. toolbench/toolenv/tools/Finance/stocksearch/api.py +85 -0
  39. toolbench/toolenv/tools/Finance/stocktwits.json +632 -0
  40. toolbench/toolenv/tools/Finance/stocktwits/api.py +461 -0
  41. toolbench/toolenv/tools/Finance/stockyapiexchange.json +169 -0
  42. toolbench/toolenv/tools/Finance/stockyapiexchange/api.py +173 -0
  43. toolbench/toolenv/tools/Finance/stoxa.json +24 -0
  44. toolbench/toolenv/tools/Finance/stoxx.json +0 -0
  45. toolbench/toolenv/tools/Finance/stoxx/api.py +209 -0
  46. toolbench/toolenv/tools/Finance/student_loan_calculator.json +30 -0
  47. toolbench/toolenv/tools/Finance/styvio_stock_market_data_v2/api.py +29 -0
  48. toolbench/toolenv/tools/Finance/sundayfinance.json +57 -0
  49. toolbench/toolenv/tools/Finance/sundayfinance/api.py +50 -0
  50. toolbench/toolenv/tools/Finance/supportnresistance.json +0 -0
.gitattributes CHANGED
@@ -68,3 +68,5 @@ toolbench/toolenv/tools/Finance/changenow_crypto_exchange.json filter=lfs diff=l
68
  toolbench/toolenv/tools/Finance/defi_data.json filter=lfs diff=lfs merge=lfs -text
69
  toolbench/toolenv/tools/Finance/prague_stock_exchange.json filter=lfs diff=lfs merge=lfs -text
70
  toolbench/toolenv/tools/Finance/sec_edgar.json filter=lfs diff=lfs merge=lfs -text
 
 
 
68
  toolbench/toolenv/tools/Finance/defi_data.json filter=lfs diff=lfs merge=lfs -text
69
  toolbench/toolenv/tools/Finance/prague_stock_exchange.json filter=lfs diff=lfs merge=lfs -text
70
  toolbench/toolenv/tools/Finance/sec_edgar.json filter=lfs diff=lfs merge=lfs -text
71
+ toolbench/toolenv/tools/Food/tasty.json filter=lfs diff=lfs merge=lfs -text
72
+ toolbench/toolenv/tools/Gaming/cod_api_2_0.json filter=lfs diff=lfs merge=lfs -text
toolbench/toolenv/tools/Finance/stock_cryptocurrency_forex_market_data.json ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Cryptocurrency Forex Market Data",
3
+ "tool_description":"Real-time Stock, Cryptocurrency, and Forex market data from NASDAQ, NYSE, LSE, MYX, IDX, Binance, FTX, PancakeSwap, Uniswap, FRED etc.",
4
+ "title":"Stock Cryptocurrency Forex Market Data",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":568,
9
+ "avgSuccessRate":0,
10
+ "popularityScore":0.1,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/herihermwn/api/stock-cryptocurrency-forex-market-data/",
14
+ "host":"stock-cryptocurrency-forex-market-data.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Search Exchange",
18
+ "url":"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/search/exchange",
19
+ "description":"Search exchanges by query or category",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"q",
25
+ "type":"STRING",
26
+ "description":"",
27
+ "default":"B"
28
+ },
29
+ {
30
+ "name":"category",
31
+ "type":"STRING",
32
+ "description":"",
33
+ "default":"Cryptocurrency"
34
+ }
35
+ ],
36
+ "code":"import requests\n\nurl = \"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/search/exchange\"\nquerystring = {\"q\": q, \"category\": category}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-cryptocurrency-forex-market-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
37
+ "statuscode":200,
38
+ "body":{
39
+ "key1":"value",
40
+ "key2":"value"
41
+ },
42
+ "headers":{},
43
+ "schema":{
44
+ "type":"object",
45
+ "properties":{
46
+ "success":{
47
+ "type":"boolean"
48
+ },
49
+ "data":{
50
+ "type":"array",
51
+ "items":{
52
+ "type":"object",
53
+ "properties":{
54
+ "exchange":{
55
+ "type":"string"
56
+ },
57
+ "description":{
58
+ "type":"string"
59
+ },
60
+ "image_url":{
61
+ "type":"string"
62
+ },
63
+ "category":{
64
+ "type":"string"
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ },
72
+ {
73
+ "name":"Get TimeFrames",
74
+ "url":"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/get/timeframes",
75
+ "description":"Get list TimeFrames",
76
+ "method":"GET",
77
+ "required_parameters":[],
78
+ "optional_parameters":[],
79
+ "code":"import requests\n\nurl = \"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/get/timeframes\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-cryptocurrency-forex-market-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
80
+ "statuscode":200,
81
+ "body":{
82
+ "key1":"value",
83
+ "key2":"value"
84
+ },
85
+ "headers":{},
86
+ "schema":{
87
+ "type":"object",
88
+ "properties":{
89
+ "success":{
90
+ "type":"boolean"
91
+ },
92
+ "message":{
93
+ "type":"array",
94
+ "items":{
95
+ "type":"string"
96
+ }
97
+ }
98
+ }
99
+ }
100
+ },
101
+ {
102
+ "name":"Search Stock, Cryptocurrency, Forex",
103
+ "url":"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/search/stock",
104
+ "description":"Search Stock, Cryptocurrency, Forex price by name or symbol or exchange",
105
+ "method":"GET",
106
+ "required_parameters":[],
107
+ "optional_parameters":[
108
+ {
109
+ "name":"q",
110
+ "type":"STRING",
111
+ "description":"",
112
+ "default":"BBCA"
113
+ },
114
+ {
115
+ "name":"exchange",
116
+ "type":"STRING",
117
+ "description":"",
118
+ "default":"IDX"
119
+ }
120
+ ],
121
+ "code":"import requests\n\nurl = \"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/search/stock\"\nquerystring = {\"q\": q, \"exchange\": exchange}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-cryptocurrency-forex-market-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
122
+ "statuscode":200,
123
+ "body":{
124
+ "key1":"value",
125
+ "key2":"value"
126
+ },
127
+ "headers":{},
128
+ "schema":{
129
+ "type":"object",
130
+ "properties":{
131
+ "success":{
132
+ "type":"boolean"
133
+ },
134
+ "data":{
135
+ "type":"array",
136
+ "items":{
137
+ "type":"object",
138
+ "properties":{
139
+ "symbol":{
140
+ "type":"string"
141
+ },
142
+ "description":{
143
+ "type":"string"
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ },
151
+ {
152
+ "name":"Get Price",
153
+ "url":"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/prices/stock",
154
+ "description":"Get Stock, Cryptocurrency, Forex price by timeframe",
155
+ "method":"GET",
156
+ "required_parameters":[
157
+ {
158
+ "name":"timeframe",
159
+ "type":"STRING",
160
+ "description":"",
161
+ "default":"1D"
162
+ },
163
+ {
164
+ "name":"symbol",
165
+ "type":"STRING",
166
+ "description":"",
167
+ "default":"BBCA"
168
+ },
169
+ {
170
+ "name":"exchange",
171
+ "type":"STRING",
172
+ "description":"",
173
+ "default":"IDX"
174
+ }
175
+ ],
176
+ "optional_parameters":[
177
+ {
178
+ "name":"length",
179
+ "type":"NUMBER",
180
+ "description":"",
181
+ "default":"60"
182
+ }
183
+ ],
184
+ "code":"import requests\n\nurl = \"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/prices/stock\"\nquerystring = {\"timeframe\": timeframe, \"symbol\": symbol, \"exchange\": exchange, \"length\": length}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-cryptocurrency-forex-market-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
185
+ "statuscode":200,
186
+ "body":{
187
+ "key1":"value",
188
+ "key2":"value"
189
+ },
190
+ "headers":{},
191
+ "schema":{
192
+ "type":"object",
193
+ "properties":{
194
+ "success":{
195
+ "type":"boolean"
196
+ },
197
+ "data":{
198
+ "type":"array",
199
+ "items":{
200
+ "type":"object",
201
+ "properties":{
202
+ "open_time":{
203
+ "type":"string"
204
+ },
205
+ "open":{
206
+ "type":"integer"
207
+ },
208
+ "high":{
209
+ "type":"integer"
210
+ },
211
+ "low":{
212
+ "type":"integer"
213
+ },
214
+ "close":{
215
+ "type":"integer"
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ },
223
+ {
224
+ "name":"Get Exchange Category",
225
+ "url":"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/get/exchange-category",
226
+ "description":"Get list available categories of exchanges",
227
+ "method":"GET",
228
+ "required_parameters":[],
229
+ "optional_parameters":[],
230
+ "code":"import requests\n\nurl = \"https://stock-cryptocurrency-forex-market-data.p.rapidapi.com/get/exchange-category\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-cryptocurrency-forex-market-data.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
231
+ "statuscode":200,
232
+ "body":{
233
+ "key1":"value",
234
+ "key2":"value"
235
+ },
236
+ "headers":{},
237
+ "schema":{
238
+ "type":"object",
239
+ "properties":{
240
+ "success":{
241
+ "type":"boolean"
242
+ },
243
+ "data":{
244
+ "type":"array",
245
+ "items":{
246
+ "type":"string"
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ ]
253
+ }
toolbench/toolenv/tools/Finance/stock_data.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Data",
3
+ "tool_description":"Get the actual stock details of a symbol.Take a look at the long description for the detailed field list.",
4
+ "title":"Stock Data",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":2209,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":9.2,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/pweis82/api/stock-data3/",
14
+ "host":"stock-data3.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Symbol",
18
+ "url":"https://stock-data3.p.rapidapi.com/{symbol}",
19
+ "description":"The ticker symbol of the stock.",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"Symbol",
24
+ "type":"string",
25
+ "description":"",
26
+ "default":"AAPL"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://stock-data3.p.rapidapi.com/{symbol}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-data3.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ }
36
+ ]
37
+ }
toolbench/toolenv/tools/Finance/stock_data/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def symbol(symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "The ticker symbol of the stock."
12
+
13
+ """
14
+ url = f"https://stock-data3.p.rapidapi.com/{symbol}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-data3.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Finance/stock_finance/api.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def stockdividendinformation(stock_symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "This endpoint returns 4 summary properties of a stock related to dividends.
12
+ 1. Stock latest dividend date.
13
+ 2. Stock dividend yield.
14
+ 3. Stock annual dividend.
15
+ 4. Stock dividend frequency."
16
+
17
+ """
18
+ url = f"https://stock-finance.p.rapidapi.com/stock/dividend/{stock_symbol}"
19
+ querystring = {}
20
+
21
+ headers = {
22
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
23
+ "X-RapidAPI-Host": "stock-finance.p.rapidapi.com"
24
+ }
25
+
26
+
27
+ response = requests.get(url, headers=headers, params=querystring)
28
+ try:
29
+ observation = response.json()
30
+ except:
31
+ observation = response.text
32
+ return observation
33
+
34
+ def stockinformation(stock_symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
35
+ """
36
+ "This is a general endpoint providing response of the general stock information."
37
+
38
+ """
39
+ url = f"https://stock-finance.p.rapidapi.com/stock/information/{stock_symbol}"
40
+ querystring = {}
41
+
42
+ headers = {
43
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
44
+ "X-RapidAPI-Host": "stock-finance.p.rapidapi.com"
45
+ }
46
+
47
+
48
+ response = requests.get(url, headers=headers, params=querystring)
49
+ try:
50
+ observation = response.json()
51
+ except:
52
+ observation = response.text
53
+ return observation
54
+
55
+ def stockchartpattern(stock_symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
56
+ """
57
+ "This endpoint returns the prediction on how the stock chart pattern looks like. There could be three types of responses:-
58
+ 1. Bearish
59
+ 2. Bullish
60
+ 3. Neutral"
61
+
62
+ """
63
+ url = f"https://stock-finance.p.rapidapi.com/stock/chart_pattern/{stock_symbol}"
64
+ querystring = {}
65
+
66
+ headers = {
67
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
68
+ "X-RapidAPI-Host": "stock-finance.p.rapidapi.com"
69
+ }
70
+
71
+
72
+ response = requests.get(url, headers=headers, params=querystring)
73
+ try:
74
+ observation = response.json()
75
+ except:
76
+ observation = response.text
77
+ return observation
78
+
toolbench/toolenv/tools/Finance/stock_forecasting_ai_model.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name": "Stock forecasting | AI Model |",
3
+ "tool_description": "Use API to forecast the closing price for the S&P500 based on both historical data and user input",
4
+ "title": "Stock forecasting | AI Model |",
5
+ "pricing": "FREEMIUM",
6
+ "score": null,
7
+ "home_url": "https://rapidapi.com/zerubabel.dinsa/api/stock-forecasting-ai-model/",
8
+ "host": "stock-forecasting-ai-model.p.rapidapi.com",
9
+ "api_list": [
10
+ {
11
+ "name": "predict_stock_price_predict_post",
12
+ "url": "https://stock-forecasting-ai-model.p.rapidapi.com/predict",
13
+ "description": " ",
14
+ "method": "POST",
15
+ "required_parameters": [],
16
+ "optional_parameters": [],
17
+ "code": "import requests\n\nurl = \"https://stock-forecasting-ai-model.p.rapidapi.com/predict\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-forecasting-ai-model.p.rapidapi.com\"\n}\n\nresponse = requests.post(url, headers=headers)\n\nprint(response.json())\n",
18
+ "statuscode": 200,
19
+ "body": {},
20
+ "headers": {},
21
+ "schema": {}
22
+ },
23
+ {
24
+ "name": "index__get",
25
+ "url": "https://stock-forecasting-ai-model.p.rapidapi.com/",
26
+ "description": " ",
27
+ "method": "GET",
28
+ "required_parameters": [],
29
+ "optional_parameters": [],
30
+ "code": "import requests\n\nurl = \"https://stock-forecasting-ai-model.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-forecasting-ai-model.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode": 200,
32
+ "body": {},
33
+ "headers": {},
34
+ "schema": {}
35
+ },
36
+ {
37
+ "name": "predict_stock_price_predict_post",
38
+ "url": "https://stock-forecasting-ai-model.p.rapidapi.com/predict",
39
+ "description": " ",
40
+ "method": "POST",
41
+ "required_parameters": [],
42
+ "optional_parameters": [],
43
+ "code": "import requests\n\nurl = \"https://stock-forecasting-ai-model.p.rapidapi.com/predict\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-forecasting-ai-model.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
44
+ "convert_code": "import requests\n\nurl = \"https://stock-forecasting-ai-model.p.rapidapi.com/predict\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-forecasting-ai-model.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
45
+ "test_endpoint": "",
46
+ "statuscode": 1,
47
+ "schema": ""
48
+ }
49
+ ]
50
+ }
toolbench/toolenv/tools/Finance/stock_forecasting_ai_model/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def index_get(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ " "
12
+
13
+ """
14
+ url = f"https://stock-forecasting-ai-model.p.rapidapi.com/"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-forecasting-ai-model.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Finance/stock_info.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Info",
3
+ "tool_description":"Get NSE, BSE stock prices",
4
+ "title":"Stock Info",
5
+ "pricing":"FREE",
6
+ "score":{
7
+ "avgServiceLevel":0,
8
+ "avgLatency":838,
9
+ "avgSuccessRate":0,
10
+ "popularityScore":0.1,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/sagarkarnati/api/stock-info/",
14
+ "host":"stock-info.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Get Stock Price",
18
+ "url":"https://stock-info.p.rapidapi.com/v1/equity/{symbol}",
19
+ "description":"To get the Stock Price (Delayed 30 mins)",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"symbol",
24
+ "type":"string",
25
+ "description":"",
26
+ "default":"TCS.NS"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://stock-info.p.rapidapi.com/v1/equity/{symbol}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-info.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{
33
+ "close":9.39,
34
+ "modifiedTs":"2020-12-02T00:36:44.842+00:00",
35
+ "priceChange":0.09,
36
+ "priceChangeInPercent":0.97,
37
+ "status":"UPDATED",
38
+ "symbol":"TCS"
39
+ },
40
+ "headers":{
41
+ "content-type":"application/json",
42
+ "date":"Wed, 02 Dec 2020 00:36:45 GMT",
43
+ "server":"RapidAPI-1.2.6",
44
+ "via":"1.1 vegur",
45
+ "x-rapidapi-region":"AWS - us-east-1",
46
+ "x-rapidapi-version":"1.2.6",
47
+ "transfer-encoding":"chunked",
48
+ "connection":"Close"
49
+ },
50
+ "schema":{}
51
+ }
52
+ ]
53
+ }
toolbench/toolenv/tools/Finance/stock_info/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_stock_price(symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "To get the Stock Price (Delayed 30 mins)"
12
+
13
+ """
14
+ url = f"https://stock-info.p.rapidapi.com/v1/equity/{symbol}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-info.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Finance/stock_intrinsic_value.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Intrinsic Value",
3
+ "tool_description":"Benjamin Graham's Formula For Intrinsic Value",
4
+ "title":"Stock Intrinsic Value",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/dogabayram1/api/stock-intrinsic-value/",
8
+ "host":"stock-intrinsic-value.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Get Intrinsic Value",
12
+ "url":"https://stock-intrinsic-value.p.rapidapi.com/stock/{stockid}",
13
+ "description":"This endpoint will return back specific stock's Intrinsic Value and details",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"stockId",
18
+ "type":"string",
19
+ "description":"",
20
+ "default":"AAPL"
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://stock-intrinsic-value.p.rapidapi.com/stock/{stockid}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-intrinsic-value.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
25
+ "statuscode":200,
26
+ "body":{
27
+ "key1":"value",
28
+ "key2":"value"
29
+ },
30
+ "headers":{},
31
+ "schema":{}
32
+ }
33
+ ]
34
+ }
toolbench/toolenv/tools/Finance/stock_intrinsic_value/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_intrinsic_value(stockid: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "This endpoint will return back specific stock's Intrinsic Value and details"
12
+
13
+ """
14
+ url = f"https://stock-intrinsic-value.p.rapidapi.com/stock/{stockid}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-intrinsic-value.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Finance/stock_market.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Market",
3
+ "tool_description":" APIs that retrieves live data from stock markets ,ETFs and crypto currencies around the world",
4
+ "title":"Stock Market",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":2591,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":8.5,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/vfaltasvictory4software-tbZKlKgPlV/api/stock-market14/",
14
+ "host":"stock-market14.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Get List of Registered Symbols",
18
+ "url":"https://stock-market14.p.rapidapi.com/MarketData/GetListOfSymbolNames",
19
+ "description":"In This function you can find all the symbols that we are currentling streaming the latest price.\n\nPlease keep calling this function and get your system updated we adding new list of symbols everyday.",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"symbolsType",
25
+ "type":"NUMBER",
26
+ "description":"",
27
+ "default":"3"
28
+ }
29
+ ],
30
+ "code":"import requests\n\nurl = \"https://stock-market14.p.rapidapi.com/MarketData/GetListOfSymbolNames\"\nquerystring = {\"symbolsType\": symbolstype}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-market14.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"Get Stock Prices",
38
+ "url":"https://stock-market14.p.rapidapi.com/MarketData/GetLastPrices",
39
+ "description":"In this API you can retrieve a list of stocks by comma seperator\n\nEx.\nAMD,GOOG,TQQQ",
40
+ "method":"GET",
41
+ "required_parameters":[
42
+ {
43
+ "name":"symboles",
44
+ "type":"STRING",
45
+ "description":"",
46
+ "default":"BTCUSDT,ADAUSDT"
47
+ }
48
+ ],
49
+ "optional_parameters":[],
50
+ "code":"import requests\n\nurl = \"https://stock-market14.p.rapidapi.com/MarketData/GetLastPrices\"\nquerystring = {\"symboles\": symboles}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-market14.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
51
+ "statuscode":111,
52
+ "body":"",
53
+ "headers":"",
54
+ "schema":""
55
+ },
56
+ {
57
+ "name":"Get Stock Price",
58
+ "url":"https://stock-market14.p.rapidapi.com/MarketData/GetLastPrice",
59
+ "description":"You can get single stock price",
60
+ "method":"GET",
61
+ "required_parameters":[
62
+ {
63
+ "name":"symbole",
64
+ "type":"STRING",
65
+ "description":"",
66
+ "default":"BTCUSDT"
67
+ }
68
+ ],
69
+ "optional_parameters":[],
70
+ "code":"import requests\n\nurl = \"https://stock-market14.p.rapidapi.com/MarketData/GetLastPrice\"\nquerystring = {\"symbole\": symbole}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-market14.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
71
+ "statuscode":111,
72
+ "body":"",
73
+ "headers":"",
74
+ "schema":""
75
+ }
76
+ ]
77
+ }
toolbench/toolenv/tools/Finance/stock_market/api.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_list_of_registered_symbols(symbolstype: int=3, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "In This function you can find all the symbols that we are currentling streaming the latest price.
12
+
13
+ Please keep calling this function and get your system updated we adding new list of symbols everyday."
14
+
15
+ """
16
+ url = f"https://stock-market14.p.rapidapi.com/marketdata/getlistofsymbolnames"
17
+ querystring = {}
18
+ if symbolstype:
19
+ querystring['symbolsType'] = symbolstype
20
+
21
+ headers = {
22
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
23
+ "X-RapidAPI-Host": "stock-market14.p.rapidapi.com"
24
+ }
25
+
26
+
27
+ response = requests.get(url, headers=headers, params=querystring)
28
+ try:
29
+ observation = response.json()
30
+ except:
31
+ observation = response.text
32
+ return observation
33
+
34
+ def get_stock_prices(symboles: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
35
+ """
36
+ "In this API you can retrieve a list of stocks by comma seperator
37
+
38
+ Ex.
39
+ AMD,GOOG,TQQQ"
40
+
41
+ """
42
+ url = f"https://stock-market14.p.rapidapi.com/marketdata/getlastprices"
43
+ querystring = {'symboles': symboles, }
44
+
45
+ headers = {
46
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
47
+ "X-RapidAPI-Host": "stock-market14.p.rapidapi.com"
48
+ }
49
+
50
+
51
+ response = requests.get(url, headers=headers, params=querystring)
52
+ try:
53
+ observation = response.json()
54
+ except:
55
+ observation = response.text
56
+ return observation
57
+
58
+ def get_stock_price(symbole: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
59
+ """
60
+ "You can get single stock price"
61
+
62
+ """
63
+ url = f"https://stock-market14.p.rapidapi.com/marketdata/getlastprice"
64
+ querystring = {'symbole': symbole, }
65
+
66
+ headers = {
67
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
68
+ "X-RapidAPI-Host": "stock-market14.p.rapidapi.com"
69
+ }
70
+
71
+
72
+ response = requests.get(url, headers=headers, params=querystring)
73
+ try:
74
+ observation = response.json()
75
+ except:
76
+ observation = response.text
77
+ return observation
78
+
toolbench/toolenv/tools/Finance/stock_mentions.json ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Mentions",
3
+ "tool_description":"Stock tracker for mentions, and sentiment. Options, price data and metrics.",
4
+ "title":"Stock Mentions",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/good-program-good-program-default/api/stock-mentions/",
8
+ "host":"stock-mentions.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Available Stocks",
12
+ "url":"https://stock-mentions.p.rapidapi.com/stonkz/available",
13
+ "description":"Get a list of all available stocks in a given locale",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"locale",
18
+ "type":"STRING",
19
+ "description":"Valid: us, ax, cc",
20
+ "default":"us"
21
+ }
22
+ ],
23
+ "optional_parameters":[],
24
+ "code":"import requests\n\nurl = \"https://stock-mentions.p.rapidapi.com/stonkz/available\"\nquerystring = {\"locale\": locale}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-mentions.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
25
+ "statuscode":111,
26
+ "body":"",
27
+ "headers":"",
28
+ "schema":""
29
+ },
30
+ {
31
+ "name":"Mention Distribution",
32
+ "url":"https://stock-mentions.p.rapidapi.com/stonkz/stonk/distribution",
33
+ "description":"Get distribution of mentions across sources for last 7 days (useful for pie charts)",
34
+ "method":"GET",
35
+ "required_parameters":[
36
+ {
37
+ "name":"ticker",
38
+ "type":"STRING",
39
+ "description":"",
40
+ "default":"AMC"
41
+ }
42
+ ],
43
+ "optional_parameters":[],
44
+ "code":"import requests\n\nurl = \"https://stock-mentions.p.rapidapi.com/stonkz/stonk/distribution\"\nquerystring = {\"ticker\": ticker}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-mentions.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
45
+ "statuscode":111,
46
+ "body":"",
47
+ "headers":"",
48
+ "schema":""
49
+ },
50
+ {
51
+ "name":"Stock Details",
52
+ "url":"https://stock-mentions.p.rapidapi.com/stonkz/stonk",
53
+ "description":"Get detailed information about a particular stock",
54
+ "method":"GET",
55
+ "required_parameters":[
56
+ {
57
+ "name":"ticker",
58
+ "type":"STRING",
59
+ "description":"",
60
+ "default":"AMC"
61
+ }
62
+ ],
63
+ "optional_parameters":[],
64
+ "code":"import requests\n\nurl = \"https://stock-mentions.p.rapidapi.com/stonkz/stonk\"\nquerystring = {\"ticker\": ticker}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-mentions.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
65
+ "statuscode":111,
66
+ "body":"",
67
+ "headers":"",
68
+ "schema":""
69
+ },
70
+ {
71
+ "name":"Stocks Preview",
72
+ "url":"https://stock-mentions.p.rapidapi.com/stonkz",
73
+ "description":"Get a list of stocks with various information, ordered by relevence",
74
+ "method":"GET",
75
+ "required_parameters":[
76
+ {
77
+ "name":"locale",
78
+ "type":"STRING",
79
+ "description":"Valid: us, ax, cc",
80
+ "default":"us"
81
+ },
82
+ {
83
+ "name":"start",
84
+ "type":"NUMBER",
85
+ "description":"",
86
+ "default":"0"
87
+ },
88
+ {
89
+ "name":"limit",
90
+ "type":"NUMBER",
91
+ "description":"",
92
+ "default":"100"
93
+ }
94
+ ],
95
+ "optional_parameters":[],
96
+ "code":"import requests\n\nurl = \"https://stock-mentions.p.rapidapi.com/stonkz\"\nquerystring = {\"locale\": locale, \"start\": start, \"limit\": limit}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-mentions.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
97
+ "statuscode":111,
98
+ "body":"",
99
+ "headers":"",
100
+ "schema":""
101
+ }
102
+ ]
103
+ }
toolbench/toolenv/tools/Finance/stock_mentions/api.py ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def available_stocks(locale: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get a list of all available stocks in a given locale"
12
+ locale: Valid: us, ax, cc
13
+
14
+ """
15
+ url = f"https://stock-mentions.p.rapidapi.com/stonkz/available"
16
+ querystring = {'locale': locale, }
17
+
18
+ headers = {
19
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
20
+ "X-RapidAPI-Host": "stock-mentions.p.rapidapi.com"
21
+ }
22
+
23
+
24
+ response = requests.get(url, headers=headers, params=querystring)
25
+ try:
26
+ observation = response.json()
27
+ except:
28
+ observation = response.text
29
+ return observation
30
+
31
+ def mention_distribution(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
32
+ """
33
+ "Get distribution of mentions across sources for last 7 days (useful for pie charts)"
34
+
35
+ """
36
+ url = f"https://stock-mentions.p.rapidapi.com/stonkz/stonk/distribution"
37
+ querystring = {'ticker': ticker, }
38
+
39
+ headers = {
40
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
41
+ "X-RapidAPI-Host": "stock-mentions.p.rapidapi.com"
42
+ }
43
+
44
+
45
+ response = requests.get(url, headers=headers, params=querystring)
46
+ try:
47
+ observation = response.json()
48
+ except:
49
+ observation = response.text
50
+ return observation
51
+
52
+ def stock_details(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
53
+ """
54
+ "Get detailed information about a particular stock"
55
+
56
+ """
57
+ url = f"https://stock-mentions.p.rapidapi.com/stonkz/stonk"
58
+ querystring = {'ticker': ticker, }
59
+
60
+ headers = {
61
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
62
+ "X-RapidAPI-Host": "stock-mentions.p.rapidapi.com"
63
+ }
64
+
65
+
66
+ response = requests.get(url, headers=headers, params=querystring)
67
+ try:
68
+ observation = response.json()
69
+ except:
70
+ observation = response.text
71
+ return observation
72
+
73
+ def stocks_preview(locale: str, start: int, limit: int, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
74
+ """
75
+ "Get a list of stocks with various information, ordered by relevence"
76
+ locale: Valid: us, ax, cc
77
+
78
+ """
79
+ url = f"https://stock-mentions.p.rapidapi.com/stonkz"
80
+ querystring = {'locale': locale, 'start': start, 'limit': limit, }
81
+
82
+ headers = {
83
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
84
+ "X-RapidAPI-Host": "stock-mentions.p.rapidapi.com"
85
+ }
86
+
87
+
88
+ response = requests.get(url, headers=headers, params=querystring)
89
+ try:
90
+ observation = response.json()
91
+ except:
92
+ observation = response.text
93
+ return observation
94
+
toolbench/toolenv/tools/Finance/stock_news.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock News",
3
+ "tool_description":"Get the latest financial stock news from the best news sources. Use our API to get relevant video content from companies in the stock market.",
4
+ "title":"Stock News",
5
+ "pricing":"FREE",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/ricardodegregorio/api/stock-news/",
8
+ "host":"stock-news.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"Get Stock News ",
12
+ "url":"https://stock-news.p.rapidapi.comhttps://stocknewsapi.com/api/videos",
13
+ "description":"Get individual stock news",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[],
17
+ "code":"import requests\n\nurl = \"https://stock-news.p.rapidapi.comhttps://stocknewsapi.com/api/videos\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-news.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
18
+ "statuscode":111,
19
+ "body":"",
20
+ "headers":"",
21
+ "schema":""
22
+ }
23
+ ]
24
+ }
toolbench/toolenv/tools/Finance/stock_news/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_stock_news(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get individual stock news"
12
+
13
+ """
14
+ url = f"https://stock-news.p.rapidapi.comhttps://stocknewsapi.com/api/videos"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-news.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Finance/stock_news_sentiment_stockshark.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock News Sentiment Stockshark",
3
+ "tool_description":"Stockshark - Stock News Sentiment Data on 9,000+ US Stocks.",
4
+ "title":"Stock News Sentiment Stockshark",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/stockshark/api/stock-news-sentiment-stockshark/",
8
+ "host":"stock-news-sentiment-stockshark.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"News Sentiment",
12
+ "url":"https://stock-news-sentiment-stockshark.p.rapidapi.com/getNewsSentiment",
13
+ "description":"Get News Sentiment and News volume for a particular stock.\nsentiment>0 indicates positive sentiment. sentiment<0 indicates negative sentiment.",
14
+ "method":"GET",
15
+ "required_parameters":[
16
+ {
17
+ "name":"ticker",
18
+ "type":"STRING",
19
+ "description":"",
20
+ "default":"TSLA "
21
+ },
22
+ {
23
+ "name":"endDate",
24
+ "type":"STRING",
25
+ "description":"",
26
+ "default":"2021-09-20"
27
+ },
28
+ {
29
+ "name":"startDate",
30
+ "type":"STRING",
31
+ "description":"",
32
+ "default":"2021-09-09"
33
+ }
34
+ ],
35
+ "optional_parameters":[],
36
+ "code":"import requests\n\nurl = \"https://stock-news-sentiment-stockshark.p.rapidapi.com/getNewsSentiment\"\nquerystring = {\"ticker\": ticker, \"endDate\": enddate, \"startDate\": startdate}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-news-sentiment-stockshark.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
37
+ "statuscode":111,
38
+ "body":"",
39
+ "headers":"",
40
+ "schema":""
41
+ }
42
+ ]
43
+ }
toolbench/toolenv/tools/Finance/stock_news_sentiment_stockshark/api.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def news_sentiment(ticker: str, enddate: str, startdate: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get News Sentiment and News volume for a particular stock.
12
+ sentiment>0 indicates positive sentiment. sentiment<0 indicates negative sentiment."
13
+
14
+ """
15
+ url = f"https://stock-news-sentiment-stockshark.p.rapidapi.com/getnewssentiment"
16
+ querystring = {'ticker': ticker, 'endDate': enddate, 'startDate': startdate, }
17
+
18
+ headers = {
19
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
20
+ "X-RapidAPI-Host": "stock-news-sentiment-stockshark.p.rapidapi.com"
21
+ }
22
+
23
+
24
+ response = requests.get(url, headers=headers, params=querystring)
25
+ try:
26
+ observation = response.json()
27
+ except:
28
+ observation = response.text
29
+ return observation
30
+
toolbench/toolenv/tools/Finance/stock_price.json ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Price",
3
+ "tool_description":"Get the latest real time stock market quote price data. All exchanges included for 100% coverage.",
4
+ "title":"Stock Price",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":174,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":8.8,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/fridaystock/api/stock-price4/",
14
+ "host":"stock-price4.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Get Quote",
18
+ "url":"https://stock-price4.p.rapidapi.com/price/{symbol}",
19
+ "description":"Enter the stock symbol ticker and get the price returned in response.",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"symbol",
24
+ "type":"string",
25
+ "description":"",
26
+ "default":"TSLA"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://stock-price4.p.rapidapi.com/price/{symbol}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-price4.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{
33
+ "Change":18.46997,
34
+ "ChangePercent":0.557579,
35
+ "IsActive":false,
36
+ "IsRegularTradingSession":false,
37
+ "Price":3331,
38
+ "currency":"USD",
39
+ "exchangeDataDelayedBy":0,
40
+ "fullExchangeName":"NasdaqGS",
41
+ "marketState":"PREPRE",
42
+ "postMarketChange":-8.77002,
43
+ "postMarketChangePercent":-0.2632849,
44
+ "postMarketPrice":3322.23,
45
+ "preMarketChange":0,
46
+ "preMarketChangePercent":0,
47
+ "preMarketPrice":0,
48
+ "regularMarketChange":18.46997,
49
+ "regularMarketChangePercent":0.557579,
50
+ "regularMarketDayRange":"3277.75 - 3347.0",
51
+ "regularMarketOpen":3330,
52
+ "regularMarketPreviousClose":3312.53,
53
+ "regularMarketPrice":3331,
54
+ "shortName":"Amazon.com, Inc.",
55
+ "symbol":"AMZN"
56
+ },
57
+ "headers":{
58
+ "content-type":"application/json",
59
+ "date":"Fri, 05 Feb 2021 08:50:36 GMT",
60
+ "server":"RapidAPI-1.2.7",
61
+ "x-rapidapi-version":"1.2.7",
62
+ "content-length":"606",
63
+ "connection":"Close"
64
+ },
65
+ "schema":{
66
+ "properties":{
67
+ "Change":{
68
+ "type":"number"
69
+ },
70
+ "ChangePercent":{
71
+ "type":"number"
72
+ },
73
+ "IsActive":{
74
+ "type":"boolean"
75
+ },
76
+ "IsRegularTradingSession":{
77
+ "type":"boolean"
78
+ },
79
+ "Price":{
80
+ "type":"integer"
81
+ },
82
+ "currency":{
83
+ "type":"string"
84
+ },
85
+ "exchangeDataDelayedBy":{
86
+ "type":"integer"
87
+ },
88
+ "fullExchangeName":{
89
+ "type":"string"
90
+ },
91
+ "marketState":{
92
+ "type":"string"
93
+ },
94
+ "postMarketChange":{
95
+ "type":"number"
96
+ },
97
+ "postMarketChangePercent":{
98
+ "type":"number"
99
+ },
100
+ "postMarketPrice":{
101
+ "type":"number"
102
+ },
103
+ "preMarketChange":{
104
+ "type":"integer"
105
+ },
106
+ "preMarketChangePercent":{
107
+ "type":"integer"
108
+ },
109
+ "preMarketPrice":{
110
+ "type":"integer"
111
+ },
112
+ "regularMarketChange":{
113
+ "type":"number"
114
+ },
115
+ "regularMarketChangePercent":{
116
+ "type":"number"
117
+ },
118
+ "regularMarketDayRange":{
119
+ "type":"string"
120
+ },
121
+ "regularMarketOpen":{
122
+ "type":"integer"
123
+ },
124
+ "regularMarketPreviousClose":{
125
+ "type":"number"
126
+ },
127
+ "regularMarketPrice":{
128
+ "type":"integer"
129
+ },
130
+ "shortName":{
131
+ "type":"string"
132
+ },
133
+ "symbol":{
134
+ "type":"string"
135
+ }
136
+ },
137
+ "type":"object"
138
+ }
139
+ }
140
+ ]
141
+ }
toolbench/toolenv/tools/Finance/stock_price/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_quote(symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Enter the stock symbol ticker and get the price returned in response."
12
+
13
+ """
14
+ url = f"https://stock-price4.p.rapidapi.com/price/{symbol}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-price4.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Finance/stock_prices.json ADDED
The diff for this file is too large to render. See raw diff
 
toolbench/toolenv/tools/Finance/stock_prices/api.py ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def max_historical_quarterly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Max quarterly historically adjusted Open, High, Low, and Close prices. Monthly Volume, Dividend, and Split information is also included."
12
+
13
+ """
14
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/max-3mo-interval"
15
+ querystring = {'ticker': ticker, }
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def max_historical_monthly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Max monthly historically adjusted Open, High, Low, and Close prices. Monthly Volume, Dividend, and Split information is also included."
33
+
34
+ """
35
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/max-1mo-interval"
36
+ querystring = {'ticker': ticker, }
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def get_1_day_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "1 Day historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
54
+
55
+ """
56
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/1d"
57
+ querystring = {'ticker': ticker, }
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def get_2_year_historical_quarterly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ "2 Year quarterly historically adjusted Open, High, Low, and Close prices. Quarterly Volume, Dividend, and Split information is also included."
75
+
76
+ """
77
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/2y-3mo-interval"
78
+ querystring = {'ticker': ticker, }
79
+
80
+ headers = {
81
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
82
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
83
+ }
84
+
85
+
86
+ response = requests.get(url, headers=headers, params=querystring)
87
+ try:
88
+ observation = response.json()
89
+ except:
90
+ observation = response.text
91
+ return observation
92
+
93
+ def get_2_year_historical_monthly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
94
+ """
95
+ "2 Year monthly historically adjusted Open, High, Low, and Close prices. Monthly Volume, Dividend, and Split information is also included."
96
+
97
+ """
98
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/2y-1mo-interval"
99
+ querystring = {'ticker': ticker, }
100
+
101
+ headers = {
102
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
103
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
104
+ }
105
+
106
+
107
+ response = requests.get(url, headers=headers, params=querystring)
108
+ try:
109
+ observation = response.json()
110
+ except:
111
+ observation = response.text
112
+ return observation
113
+
114
+ def get_5_day_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
115
+ """
116
+ "5 Day historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
117
+
118
+ """
119
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/5d"
120
+ querystring = {'ticker': ticker, }
121
+
122
+ headers = {
123
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
124
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
125
+ }
126
+
127
+
128
+ response = requests.get(url, headers=headers, params=querystring)
129
+ try:
130
+ observation = response.json()
131
+ except:
132
+ observation = response.text
133
+ return observation
134
+
135
+ def get_5_year_historical_quarterly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
136
+ """
137
+ "5 Year quarterly historically adjusted Open, High, Low, and Close prices. Quarterly Volume, Dividend, and Split information is also included."
138
+
139
+ """
140
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/5y-3mo-interval"
141
+ querystring = {'ticker': ticker, }
142
+
143
+ headers = {
144
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
145
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
146
+ }
147
+
148
+
149
+ response = requests.get(url, headers=headers, params=querystring)
150
+ try:
151
+ observation = response.json()
152
+ except:
153
+ observation = response.text
154
+ return observation
155
+
156
+ def get_5_year_historical_monthly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
157
+ """
158
+ "5 Year monthly historically adjusted Open, High, Low, and Close prices. Monthly Volume, Dividend, and Split information is also included."
159
+
160
+ """
161
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/5y-1mo-interval"
162
+ querystring = {'ticker': ticker, }
163
+
164
+ headers = {
165
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
166
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
167
+ }
168
+
169
+
170
+ response = requests.get(url, headers=headers, params=querystring)
171
+ try:
172
+ observation = response.json()
173
+ except:
174
+ observation = response.text
175
+ return observation
176
+
177
+ def get_1_month_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
178
+ """
179
+ "1 Month historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
180
+
181
+ """
182
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/1mo"
183
+ querystring = {'ticker': ticker, }
184
+
185
+ headers = {
186
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
187
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
188
+ }
189
+
190
+
191
+ response = requests.get(url, headers=headers, params=querystring)
192
+ try:
193
+ observation = response.json()
194
+ except:
195
+ observation = response.text
196
+ return observation
197
+
198
+ def ytd_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
199
+ """
200
+ "Year to Date historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
201
+
202
+ """
203
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/ytd"
204
+ querystring = {'ticker': ticker, }
205
+
206
+ headers = {
207
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
208
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
209
+ }
210
+
211
+
212
+ response = requests.get(url, headers=headers, params=querystring)
213
+ try:
214
+ observation = response.json()
215
+ except:
216
+ observation = response.text
217
+ return observation
218
+
219
+ def get_10_year_historical_monthly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
220
+ """
221
+ "10 Year monthly historically adjusted Open, High, Low, and Close prices. Monthly Volume, Dividend, and Split information is also included."
222
+
223
+ """
224
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/10y-1mo-interval"
225
+ querystring = {'ticker': ticker, }
226
+
227
+ headers = {
228
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
229
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
230
+ }
231
+
232
+
233
+ response = requests.get(url, headers=headers, params=querystring)
234
+ try:
235
+ observation = response.json()
236
+ except:
237
+ observation = response.text
238
+ return observation
239
+
240
+ def get_10_year_historical_quarterly_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
241
+ """
242
+ "10 Year quarterly historically adjusted Open, High, Low, and Close prices. Quarterly Volume, Dividend, and Split information is also included."
243
+
244
+ """
245
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/10y-3mo-interval"
246
+ querystring = {'ticker': ticker, }
247
+
248
+ headers = {
249
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
250
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
251
+ }
252
+
253
+
254
+ response = requests.get(url, headers=headers, params=querystring)
255
+ try:
256
+ observation = response.json()
257
+ except:
258
+ observation = response.text
259
+ return observation
260
+
261
+ def get_3_month_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
262
+ """
263
+ "3 Month historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
264
+
265
+ """
266
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/3mo"
267
+ querystring = {'ticker': ticker, }
268
+
269
+ headers = {
270
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
271
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
272
+ }
273
+
274
+
275
+ response = requests.get(url, headers=headers, params=querystring)
276
+ try:
277
+ observation = response.json()
278
+ except:
279
+ observation = response.text
280
+ return observation
281
+
282
+ def get_6_month_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
283
+ """
284
+ "6 Month historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
285
+
286
+ """
287
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/6mo"
288
+ querystring = {'ticker': ticker, }
289
+
290
+ headers = {
291
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
292
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
293
+ }
294
+
295
+
296
+ response = requests.get(url, headers=headers, params=querystring)
297
+ try:
298
+ observation = response.json()
299
+ except:
300
+ observation = response.text
301
+ return observation
302
+
303
+ def get_1_year_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
304
+ """
305
+ "1 Year historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
306
+
307
+ """
308
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/1y"
309
+ querystring = {'ticker': ticker, }
310
+
311
+ headers = {
312
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
313
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
314
+ }
315
+
316
+
317
+ response = requests.get(url, headers=headers, params=querystring)
318
+ try:
319
+ observation = response.json()
320
+ except:
321
+ observation = response.text
322
+ return observation
323
+
324
+ def get_5_year_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
325
+ """
326
+ "5 Year historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
327
+
328
+ """
329
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/5y"
330
+ querystring = {'ticker': ticker, }
331
+
332
+ headers = {
333
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
334
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
335
+ }
336
+
337
+
338
+ response = requests.get(url, headers=headers, params=querystring)
339
+ try:
340
+ observation = response.json()
341
+ except:
342
+ observation = response.text
343
+ return observation
344
+
345
+ def max_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
346
+ """
347
+ "Max historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
348
+
349
+ """
350
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/max"
351
+ querystring = {'ticker': ticker, }
352
+
353
+ headers = {
354
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
355
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
356
+ }
357
+
358
+
359
+ response = requests.get(url, headers=headers, params=querystring)
360
+ try:
361
+ observation = response.json()
362
+ except:
363
+ observation = response.text
364
+ return observation
365
+
366
+ def get_2_year_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
367
+ """
368
+ "2 Year historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
369
+
370
+ """
371
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/2y"
372
+ querystring = {'ticker': ticker, }
373
+
374
+ headers = {
375
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
376
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
377
+ }
378
+
379
+
380
+ response = requests.get(url, headers=headers, params=querystring)
381
+ try:
382
+ observation = response.json()
383
+ except:
384
+ observation = response.text
385
+ return observation
386
+
387
+ def get_10_year_historical_daily_prices(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
388
+ """
389
+ "10 Year historically adjusted Open, High, Low, and Close prices. Daily Volume, Dividend, and Split information is also included."
390
+
391
+ """
392
+ url = f"https://stock-prices2.p.rapidapi.com/api/v1/resources/stock-prices/10y"
393
+ querystring = {'ticker': ticker, }
394
+
395
+ headers = {
396
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
397
+ "X-RapidAPI-Host": "stock-prices2.p.rapidapi.com"
398
+ }
399
+
400
+
401
+ response = requests.get(url, headers=headers, params=querystring)
402
+ try:
403
+ observation = response.json()
404
+ except:
405
+ observation = response.text
406
+ return observation
407
+
toolbench/toolenv/tools/Finance/stock_scraper.json ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Scraper",
3
+ "tool_description":"IMP: This project has been stopped as Heroku has withdrawn it's free plan. Please use https://gitlab.com/SatvikG7/stock-scraper/.\nApi for scraping value of stock from Google Finance.",
4
+ "title":"Stock Scraper",
5
+ "pricing":"FREEMIUM",
6
+ "score":null,
7
+ "home_url":"https://rapidapi.com/satvik.g.code/api/stock-scraper/",
8
+ "host":"stock-scraper.p.rapidapi.com",
9
+ "api_list":[
10
+ {
11
+ "name":"/",
12
+ "url":"https://stock-scraper.p.rapidapi.com/",
13
+ "description":"Endpoint to check if your api key is valid or not",
14
+ "method":"GET",
15
+ "required_parameters":[],
16
+ "optional_parameters":[],
17
+ "code":"import requests\n\nurl = \"https://stock-scraper.p.rapidapi.com/\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-scraper.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
18
+ "statuscode":200,
19
+ "body":{},
20
+ "headers":{},
21
+ "schema":{
22
+ "type":"object"
23
+ }
24
+ },
25
+ {
26
+ "name":"/:ticker/:exchange",
27
+ "url":"https://stock-scraper.p.rapidapi.com/{ticker}/{exchange}",
28
+ "description":"Play with api",
29
+ "method":"GET",
30
+ "required_parameters":[
31
+ {
32
+ "name":"ticker",
33
+ "type":"string",
34
+ "description":"",
35
+ "default":"TATAMOTORS"
36
+ },
37
+ {
38
+ "name":"exchange",
39
+ "type":"string",
40
+ "description":"",
41
+ "default":"NSE"
42
+ }
43
+ ],
44
+ "optional_parameters":[],
45
+ "code":"import requests\n\nurl = \"https://stock-scraper.p.rapidapi.com/{ticker}/{exchange}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-scraper.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
46
+ "statuscode":200,
47
+ "body":{
48
+ "ticker":"TATAMOTORS",
49
+ "exchange":"NSE",
50
+ "value":"₹486.95"
51
+ },
52
+ "headers":{
53
+ "access-control-allow-credentials":"true",
54
+ "access-control-allow-origin":"*",
55
+ "connection":"keep-alive",
56
+ "content-length":"60",
57
+ "content-type":"application/json; charset=utf-8",
58
+ "date":"Tue, 14 Dec 2021 06:08:56 GMT",
59
+ "server":"RapidAPI-1.2.8",
60
+ "via":"1.1 vegur",
61
+ "x-rapidapi-region":"AWS - ap-southeast-1",
62
+ "x-rapidapi-version":"1.2.8"
63
+ },
64
+ "schema":{
65
+ "type":"object",
66
+ "properties":{
67
+ "ticker":{
68
+ "type":"string"
69
+ },
70
+ "exchange":{
71
+ "type":"string"
72
+ },
73
+ "value":{
74
+ "type":"string"
75
+ }
76
+ }
77
+ }
78
+ },
79
+ {
80
+ "name":"/MSFT/NASDAQ",
81
+ "url":"https://stock-scraper.p.rapidapi.com/MSFT/NASDAQ",
82
+ "description":"Fetch the value of Microsoft's Stock from NASDAQ Exchange with Google Finance",
83
+ "method":"GET",
84
+ "required_parameters":[],
85
+ "optional_parameters":[],
86
+ "code":"import requests\n\nurl = \"https://stock-scraper.p.rapidapi.com/MSFT/NASDAQ\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-scraper.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
87
+ "statuscode":200,
88
+ "body":{},
89
+ "headers":{},
90
+ "schema":{}
91
+ }
92
+ ]
93
+ }
toolbench/toolenv/tools/Finance/stock_scraper/api.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def ticker_exchange(ticker: str, exchange: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Play with api"
12
+
13
+ """
14
+ url = f"https://stock-scraper.p.rapidapi.com/{ticker}/{exchange}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock-scraper.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def msft_nasdaq(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Fetch the value of Microsoft's Stock from NASDAQ Exchange with Google Finance"
33
+
34
+ """
35
+ url = f"https://stock-scraper.p.rapidapi.com/msft/nasdaq"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "stock-scraper.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
toolbench/toolenv/tools/Finance/stock_sentiment_api.json ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"Stock Sentiment API",
3
+ "tool_description":"Real-time social sentiment API to track news activity related to a certain stock",
4
+ "title":"Stock Sentiment API",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":55,
8
+ "avgLatency":386,
9
+ "avgSuccessRate":9,
10
+ "popularityScore":0.1,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/kinduvarma/api/stock-sentiment-api/",
14
+ "host":"stock-sentiment-api.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"News Sentiment Data",
18
+ "url":"https://stock-sentiment-api.p.rapidapi.com/stock_news_sentiment/",
19
+ "description":"Returns a list of articles related to the input stock and their associated sentiment score.\nThe sentiment score is called compound.",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"ticker",
24
+ "type":"STRING",
25
+ "description":"",
26
+ "default":"TSLA"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://stock-sentiment-api.p.rapidapi.com/stock_news_sentiment/\"\nquerystring = {\"ticker\": ticker}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-sentiment-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"Most Negative News",
38
+ "url":"https://stock-sentiment-api.p.rapidapi.com/top_negative_news/",
39
+ "description":"Returns a list of the most negative articles related to the given stock. The sentiment scores can be viewed in the compound field and you can change the number of articles returned with the count parameter.\n\nNote: The api parses for 100 articles so any count given over 100, the api will just return all 100 articles",
40
+ "method":"GET",
41
+ "required_parameters":[
42
+ {
43
+ "name":"ticker",
44
+ "type":"STRING",
45
+ "description":"",
46
+ "default":"TSLA"
47
+ }
48
+ ],
49
+ "optional_parameters":[
50
+ {
51
+ "name":"count",
52
+ "type":"STRING",
53
+ "description":"",
54
+ "default":"3"
55
+ }
56
+ ],
57
+ "code":"import requests\n\nurl = \"https://stock-sentiment-api.p.rapidapi.com/top_negative_news/\"\nquerystring = {\"count\": count, \"ticker\": ticker}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-sentiment-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
58
+ "statuscode":111,
59
+ "body":"",
60
+ "headers":"",
61
+ "schema":""
62
+ },
63
+ {
64
+ "name":"Most Positive News",
65
+ "url":"https://stock-sentiment-api.p.rapidapi.com/top_positive_news/",
66
+ "description":"Returns a list of the most positive articles related to the given stock. The sentiment scores can be viewed in the compound field and you can change the number of articles returned with the count parameter.\n\nNote: The api parses for 100 articles so any count given over 100, the api will just return all 100 articles",
67
+ "method":"GET",
68
+ "required_parameters":[
69
+ {
70
+ "name":"ticker",
71
+ "type":"STRING",
72
+ "description":"",
73
+ "default":"TSLA"
74
+ }
75
+ ],
76
+ "optional_parameters":[
77
+ {
78
+ "name":"count",
79
+ "type":"STRING",
80
+ "description":"",
81
+ "default":"3"
82
+ }
83
+ ],
84
+ "code":"import requests\n\nurl = \"https://stock-sentiment-api.p.rapidapi.com/top_positive_news/\"\nquerystring = {\"ticker\": ticker, \"count\": count}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-sentiment-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
85
+ "statuscode":111,
86
+ "body":"",
87
+ "headers":"",
88
+ "schema":""
89
+ },
90
+ {
91
+ "name":"Market Data",
92
+ "url":"https://stock-sentiment-api.p.rapidapi.com/market_data/",
93
+ "description":"Returns a list of daily stock metrics such as opening, closing, highest and lowest prices.",
94
+ "method":"GET",
95
+ "required_parameters":[
96
+ {
97
+ "name":"ticker",
98
+ "type":"STRING",
99
+ "description":"",
100
+ "default":"TSLA"
101
+ }
102
+ ],
103
+ "optional_parameters":[],
104
+ "code":"import requests\n\nurl = \"https://stock-sentiment-api.p.rapidapi.com/market_data/\"\nquerystring = {\"ticker\": ticker}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stock-sentiment-api.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
105
+ "statuscode":111,
106
+ "body":"",
107
+ "headers":"",
108
+ "schema":""
109
+ }
110
+ ]
111
+ }
toolbench/toolenv/tools/Finance/stock_sentiment_api/api.py ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def news_sentiment_data(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Returns a list of articles related to the input stock and their associated sentiment score.
12
+ The sentiment score is called compound."
13
+
14
+ """
15
+ url = f"https://stock-sentiment-api.p.rapidapi.com/stock_news_sentiment/"
16
+ querystring = {'ticker': ticker, }
17
+
18
+ headers = {
19
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
20
+ "X-RapidAPI-Host": "stock-sentiment-api.p.rapidapi.com"
21
+ }
22
+
23
+
24
+ response = requests.get(url, headers=headers, params=querystring)
25
+ try:
26
+ observation = response.json()
27
+ except:
28
+ observation = response.text
29
+ return observation
30
+
31
+ def most_negative_news(ticker: str, count: str='3', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
32
+ """
33
+ "Returns a list of the most negative articles related to the given stock. The sentiment scores can be viewed in the compound field and you can change the number of articles returned with the count parameter.
34
+
35
+ Note: The api parses for 100 articles so any count given over 100, the api will just return all 100 articles"
36
+
37
+ """
38
+ url = f"https://stock-sentiment-api.p.rapidapi.com/top_negative_news/"
39
+ querystring = {'ticker': ticker, }
40
+ if count:
41
+ querystring['count'] = count
42
+
43
+ headers = {
44
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
45
+ "X-RapidAPI-Host": "stock-sentiment-api.p.rapidapi.com"
46
+ }
47
+
48
+
49
+ response = requests.get(url, headers=headers, params=querystring)
50
+ try:
51
+ observation = response.json()
52
+ except:
53
+ observation = response.text
54
+ return observation
55
+
56
+ def most_positive_news(ticker: str, count: str='3', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
57
+ """
58
+ "Returns a list of the most positive articles related to the given stock. The sentiment scores can be viewed in the compound field and you can change the number of articles returned with the count parameter.
59
+
60
+ Note: The api parses for 100 articles so any count given over 100, the api will just return all 100 articles"
61
+
62
+ """
63
+ url = f"https://stock-sentiment-api.p.rapidapi.com/top_positive_news/"
64
+ querystring = {'ticker': ticker, }
65
+ if count:
66
+ querystring['count'] = count
67
+
68
+ headers = {
69
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
70
+ "X-RapidAPI-Host": "stock-sentiment-api.p.rapidapi.com"
71
+ }
72
+
73
+
74
+ response = requests.get(url, headers=headers, params=querystring)
75
+ try:
76
+ observation = response.json()
77
+ except:
78
+ observation = response.text
79
+ return observation
80
+
81
+ def market_data(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
82
+ """
83
+ "Returns a list of daily stock metrics such as opening, closing, highest and lowest prices."
84
+
85
+ """
86
+ url = f"https://stock-sentiment-api.p.rapidapi.com/market_data/"
87
+ querystring = {'ticker': ticker, }
88
+
89
+ headers = {
90
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
91
+ "X-RapidAPI-Host": "stock-sentiment-api.p.rapidapi.com"
92
+ }
93
+
94
+
95
+ response = requests.get(url, headers=headers, params=querystring)
96
+ try:
97
+ observation = response.json()
98
+ except:
99
+ observation = response.text
100
+ return observation
101
+
toolbench/toolenv/tools/Finance/stockapi.json ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"StockAPI",
3
+ "tool_description":"StockAPI - tool, that allows you to fetch all possible data about certain stock",
4
+ "title":"StockAPI",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":983,
9
+ "avgSuccessRate":0,
10
+ "popularityScore":0,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/romanshmigelskii/api/stockapi17/",
14
+ "host":"stockapi17.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Cash Flow Statement History",
18
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}/cash-flow/history",
19
+ "description":"Retrieve 3 years prior last year yearly cash flow statement information",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"ticker",
24
+ "type":"string",
25
+ "description":"",
26
+ "default":"AAPL"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}/cash-flow/history\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{
33
+ "key1":"value",
34
+ "key2":"value"
35
+ },
36
+ "headers":{},
37
+ "schema":{}
38
+ },
39
+ {
40
+ "name":"Cash Flow Statement",
41
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}/cash-flow",
42
+ "description":"Retrieve latest yearly cash flow statement information",
43
+ "method":"GET",
44
+ "required_parameters":[
45
+ {
46
+ "name":"ticker",
47
+ "type":"string",
48
+ "description":"",
49
+ "default":"AAPL"
50
+ }
51
+ ],
52
+ "optional_parameters":[],
53
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}/cash-flow\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
54
+ "statuscode":200,
55
+ "body":{
56
+ "key1":"value",
57
+ "key2":"value"
58
+ },
59
+ "headers":{},
60
+ "schema":{}
61
+ },
62
+ {
63
+ "name":"Balance Sheet History",
64
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}/balance-sheet/history",
65
+ "description":"Retrieve 3 years prior last year yearly balance sheet information",
66
+ "method":"GET",
67
+ "required_parameters":[
68
+ {
69
+ "name":"ticker",
70
+ "type":"string",
71
+ "description":"",
72
+ "default":"AAPL"
73
+ }
74
+ ],
75
+ "optional_parameters":[],
76
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}/balance-sheet/history\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
77
+ "statuscode":200,
78
+ "body":{
79
+ "key1":"value",
80
+ "key2":"value"
81
+ },
82
+ "headers":{},
83
+ "schema":{}
84
+ },
85
+ {
86
+ "name":"Balance Sheet",
87
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}/balance-sheet",
88
+ "description":"Retrieve latest yearly balance sheet information",
89
+ "method":"GET",
90
+ "required_parameters":[
91
+ {
92
+ "name":"ticker",
93
+ "type":"string",
94
+ "description":"",
95
+ "default":"AAPL"
96
+ }
97
+ ],
98
+ "optional_parameters":[],
99
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}/balance-sheet\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
100
+ "statuscode":200,
101
+ "body":{
102
+ "key1":"value",
103
+ "key2":"value"
104
+ },
105
+ "headers":{},
106
+ "schema":{}
107
+ },
108
+ {
109
+ "name":"Income Statement History",
110
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}/income-statement/history",
111
+ "description":"Retrieve 3 years prior last year yearly income statement information",
112
+ "method":"GET",
113
+ "required_parameters":[
114
+ {
115
+ "name":"ticker",
116
+ "type":"string",
117
+ "description":"",
118
+ "default":"AAPL"
119
+ }
120
+ ],
121
+ "optional_parameters":[],
122
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}/income-statement/history\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
123
+ "statuscode":200,
124
+ "body":{
125
+ "key1":"value",
126
+ "key2":"value"
127
+ },
128
+ "headers":{},
129
+ "schema":{}
130
+ },
131
+ {
132
+ "name":"Income Statement",
133
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}/income-statement",
134
+ "description":"Retrieve latest yearly income statement information",
135
+ "method":"GET",
136
+ "required_parameters":[
137
+ {
138
+ "name":"ticker",
139
+ "type":"string",
140
+ "description":"",
141
+ "default":"AAPL"
142
+ }
143
+ ],
144
+ "optional_parameters":[],
145
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}/income-statement\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
146
+ "statuscode":200,
147
+ "body":{
148
+ "key1":"value",
149
+ "key2":"value"
150
+ },
151
+ "headers":{},
152
+ "schema":{}
153
+ },
154
+ {
155
+ "name":"Ticker",
156
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}",
157
+ "description":"Retrieve basic ticker information",
158
+ "method":"GET",
159
+ "required_parameters":[
160
+ {
161
+ "name":"ticker",
162
+ "type":"string",
163
+ "description":"",
164
+ "default":"AAPL"
165
+ }
166
+ ],
167
+ "optional_parameters":[],
168
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
169
+ "statuscode":200,
170
+ "body":{
171
+ "key1":"value",
172
+ "key2":"value"
173
+ },
174
+ "headers":{},
175
+ "schema":{}
176
+ },
177
+ {
178
+ "name":"Price",
179
+ "url":"https://stockapi17.p.rapidapi.com/tickers/{ticker}/price",
180
+ "description":"Retrieve price related information",
181
+ "method":"GET",
182
+ "required_parameters":[
183
+ {
184
+ "name":"ticker",
185
+ "type":"string",
186
+ "description":"",
187
+ "default":"AAPL"
188
+ }
189
+ ],
190
+ "optional_parameters":[],
191
+ "code":"import requests\n\nurl = \"https://stockapi17.p.rapidapi.com/tickers/{ticker}/price\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockapi17.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
192
+ "statuscode":200,
193
+ "body":{
194
+ "key1":"value",
195
+ "key2":"value"
196
+ },
197
+ "headers":{},
198
+ "schema":{
199
+ "type":"object",
200
+ "properties":{
201
+ "key1":{
202
+ "type":"string"
203
+ },
204
+ "key2":{
205
+ "type":"string"
206
+ }
207
+ }
208
+ }
209
+ }
210
+ ]
211
+ }
toolbench/toolenv/tools/Finance/stockapi/api.py ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def cash_flow_statement_history(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Retrieve 3 years prior last year yearly cash flow statement information"
12
+
13
+ """
14
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}/cash-flow/history"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def cash_flow_statement(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Retrieve latest yearly cash flow statement information"
33
+
34
+ """
35
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}/cash-flow"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def balance_sheet_history(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ "Retrieve 3 years prior last year yearly balance sheet information"
54
+
55
+ """
56
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}/balance-sheet/history"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def balance_sheet(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ "Retrieve latest yearly balance sheet information"
75
+
76
+ """
77
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}/balance-sheet"
78
+ querystring = {}
79
+
80
+ headers = {
81
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
82
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
83
+ }
84
+
85
+
86
+ response = requests.get(url, headers=headers, params=querystring)
87
+ try:
88
+ observation = response.json()
89
+ except:
90
+ observation = response.text
91
+ return observation
92
+
93
+ def income_statement_history(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
94
+ """
95
+ "Retrieve 3 years prior last year yearly income statement information"
96
+
97
+ """
98
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}/income-statement/history"
99
+ querystring = {}
100
+
101
+ headers = {
102
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
103
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
104
+ }
105
+
106
+
107
+ response = requests.get(url, headers=headers, params=querystring)
108
+ try:
109
+ observation = response.json()
110
+ except:
111
+ observation = response.text
112
+ return observation
113
+
114
+ def income_statement(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
115
+ """
116
+ "Retrieve latest yearly income statement information"
117
+
118
+ """
119
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}/income-statement"
120
+ querystring = {}
121
+
122
+ headers = {
123
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
124
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
125
+ }
126
+
127
+
128
+ response = requests.get(url, headers=headers, params=querystring)
129
+ try:
130
+ observation = response.json()
131
+ except:
132
+ observation = response.text
133
+ return observation
134
+
135
+ def ticker(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
136
+ """
137
+ "Retrieve basic ticker information"
138
+
139
+ """
140
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}"
141
+ querystring = {}
142
+
143
+ headers = {
144
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
145
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
146
+ }
147
+
148
+
149
+ response = requests.get(url, headers=headers, params=querystring)
150
+ try:
151
+ observation = response.json()
152
+ except:
153
+ observation = response.text
154
+ return observation
155
+
156
+ def price(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
157
+ """
158
+ "Retrieve price related information"
159
+
160
+ """
161
+ url = f"https://stockapi17.p.rapidapi.com/tickers/{ticker}/price"
162
+ querystring = {}
163
+
164
+ headers = {
165
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
166
+ "X-RapidAPI-Host": "stockapi17.p.rapidapi.com"
167
+ }
168
+
169
+
170
+ response = requests.get(url, headers=headers, params=querystring)
171
+ try:
172
+ observation = response.json()
173
+ except:
174
+ observation = response.text
175
+ return observation
176
+
toolbench/toolenv/tools/Finance/stockbrain_data.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_e39ea21f-709c-4798-b550-496635f1505c",
3
+ "tool_description": "Provides Stock Sentiment Data, News Analysis and more. Try for free.",
4
+ "home_url": "https://rapidapi.com/StockBrain/api/stockbrain-data/",
5
+ "name": "StockBrain Data",
6
+ "title": "StockBrain Data",
7
+ "pricing": "FREE",
8
+ "tool_name": "StockBrain Data",
9
+ "score": null,
10
+ "host": "stockbrain-data.p.rapidapi.com",
11
+ "api_list": [
12
+ {
13
+ "name": "analysis_text",
14
+ "url": "https://stockbrain-data.p.rapidapi.com/analysis/text",
15
+ "description": "Post a text and recieve analysis.",
16
+ "method": "POST",
17
+ "required_parameters": [],
18
+ "optional_parameters": [
19
+ {
20
+ "name": "key",
21
+ "type": "STRING",
22
+ "description": "(Optional) Pass API key as query parameter if it is not passed through header.",
23
+ "default": ""
24
+ }
25
+ ],
26
+ "code": "import requests\n\nurl = \"https://stockbrain-data.p.rapidapi.com/analysis/text\"\nquerystring = {\"key\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockbrain-data.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
27
+ "convert_code": "import requests\n\nurl = \"https://stockbrain-data.p.rapidapi.com/analysis/text\"\nquerystring = {\"key\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockbrain-data.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
28
+ "test_endpoint": "",
29
+ "statuscode": 1,
30
+ "schema": ""
31
+ }
32
+ ]
33
+ }
toolbench/toolenv/tools/Finance/stockexchangeapi.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"StockExchangeAPI",
3
+ "tool_description":"Financial data from stock exchanges",
4
+ "title":"StockExchangeAPI",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":748,
9
+ "avgSuccessRate":100,
10
+ "popularityScore":9.2,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/Horuz/api/stockexchangeapi/",
14
+ "host":"stockexchangeapi.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"/price/{assetID}",
18
+ "url":"https://stockexchangeapi.p.rapidapi.com/price/{assetid}",
19
+ "description":"Get price quotes and details from an specific stock exchange asset",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"assetID",
25
+ "type":"STRING",
26
+ "description":"",
27
+ "default":"AAPL"
28
+ }
29
+ ],
30
+ "code":"import requests\n\nurl = \"https://stockexchangeapi.p.rapidapi.com/price/{assetid}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockexchangeapi.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{
33
+ "price":""
34
+ },
35
+ "headers":{
36
+ "content-type":"application/json",
37
+ "date":"Wed, 15 Jul 2020 00:07:34 GMT",
38
+ "server":"RapidAPI-1.1.24",
39
+ "x-amz-apigw-id":"PsBPCGRyPHcFfWg=",
40
+ "x-amzn-requestid":"fc259e7c-0fc8-4d62-ac8c-e341aa8131f5",
41
+ "x-amzn-trace-id":"Root=1-5f0e48c6-4d0e58406a7eedbc03e60b9e",
42
+ "x-rapidapi-region":"AWS - sa-east-1",
43
+ "x-rapidapi-version":"1.1.24",
44
+ "x-ratelimit-price-limit":"300",
45
+ "x-ratelimit-price-remaining":"287",
46
+ "content-length":"506",
47
+ "connection":"Close"
48
+ },
49
+ "schema":{
50
+ "properties":{
51
+ "price":{
52
+ "type":"string"
53
+ }
54
+ },
55
+ "title":"SinglePrice",
56
+ "type":"object"
57
+ }
58
+ }
59
+ ]
60
+ }
toolbench/toolenv/tools/Finance/stockexchangeapi/api.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def price_assetid(assetid: str='AAPL', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get price quotes and details from an specific stock exchange asset"
12
+
13
+ """
14
+ url = f"https://stockexchangeapi.p.rapidapi.com/price/{assetid}"
15
+ querystring = {}
16
+ if assetid:
17
+ querystring['assetID'] = assetid
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "stockexchangeapi.p.rapidapi.com"
22
+ }
23
+
24
+
25
+ response = requests.get(url, headers=headers, params=querystring)
26
+ try:
27
+ observation = response.json()
28
+ except:
29
+ observation = response.text
30
+ return observation
31
+
toolbench/toolenv/tools/Finance/stockfluence/api.py ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def fund_predictions(fundsymbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ ""
12
+
13
+ """
14
+ url = f"https://stock.p.rapidapi.com/v1/prediction/{fundsymbol}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def losers(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ ""
33
+
34
+ """
35
+ url = f"https://stock.p.rapidapi.com/v1/funds/losers"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
51
+ def trending(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
52
+ """
53
+ ""
54
+
55
+ """
56
+ url = f"https://stock.p.rapidapi.com/v1/funds/trending"
57
+ querystring = {}
58
+
59
+ headers = {
60
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
61
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
62
+ }
63
+
64
+
65
+ response = requests.get(url, headers=headers, params=querystring)
66
+ try:
67
+ observation = response.json()
68
+ except:
69
+ observation = response.text
70
+ return observation
71
+
72
+ def popular(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
73
+ """
74
+ ""
75
+
76
+ """
77
+ url = f"https://stock.p.rapidapi.com/v1/funds/popular"
78
+ querystring = {}
79
+
80
+ headers = {
81
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
82
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
83
+ }
84
+
85
+
86
+ response = requests.get(url, headers=headers, params=querystring)
87
+ try:
88
+ observation = response.json()
89
+ except:
90
+ observation = response.text
91
+ return observation
92
+
93
+ def basic(symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
94
+ """
95
+ ""
96
+ symbol: Stocksymbol
97
+
98
+ """
99
+ url = f"https://stock.p.rapidapi.com/v1/fund/{symbol}"
100
+ querystring = {}
101
+
102
+ headers = {
103
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
104
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
105
+ }
106
+
107
+
108
+ response = requests.get(url, headers=headers, params=querystring)
109
+ try:
110
+ observation = response.json()
111
+ except:
112
+ observation = response.text
113
+ return observation
114
+
115
+ def list(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
116
+ """
117
+ ""
118
+
119
+ """
120
+ url = f"https://stock.p.rapidapi.com/v1/funds"
121
+ querystring = {}
122
+
123
+ headers = {
124
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
125
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
126
+ }
127
+
128
+
129
+ response = requests.get(url, headers=headers, params=querystring)
130
+ try:
131
+ observation = response.json()
132
+ except:
133
+ observation = response.text
134
+ return observation
135
+
136
+ def winners(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
137
+ """
138
+ ""
139
+
140
+ """
141
+ url = f"https://stock.p.rapidapi.com/v1/funds/winners"
142
+ querystring = {}
143
+
144
+ headers = {
145
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
146
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
147
+ }
148
+
149
+
150
+ response = requests.get(url, headers=headers, params=querystring)
151
+ try:
152
+ observation = response.json()
153
+ except:
154
+ observation = response.text
155
+ return observation
156
+
157
+ def search(s: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
158
+ """
159
+ ""
160
+ s: String
161
+
162
+ """
163
+ url = f"https://stock.p.rapidapi.com/v1/funds/search"
164
+ querystring = {'s': s, }
165
+
166
+ headers = {
167
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
168
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
169
+ }
170
+
171
+
172
+ response = requests.get(url, headers=headers, params=querystring)
173
+ try:
174
+ observation = response.json()
175
+ except:
176
+ observation = response.text
177
+ return observation
178
+
179
+ def extended(symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
180
+ """
181
+ ""
182
+ symbol: Stocksymbol
183
+
184
+ """
185
+ url = f"https://stock.p.rapidapi.com/v1/extended-fund/{symbol}"
186
+ querystring = {}
187
+
188
+ headers = {
189
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
190
+ "X-RapidAPI-Host": "stock.p.rapidapi.com"
191
+ }
192
+
193
+
194
+ response = requests.get(url, headers=headers, params=querystring)
195
+ try:
196
+ observation = response.json()
197
+ except:
198
+ observation = response.text
199
+ return observation
200
+
toolbench/toolenv/tools/Finance/stockpulse.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_c2e6af3f-b232-4ecb-a2b6-09eca50ffdd3",
3
+ "tool_description": "StockPulse API is your one-stop financial hub. It delivers real-time stock prices, insightful analytics, ESG scores, market trends, and detailed financial reports. Empower your investment decisions with data you can trust.",
4
+ "home_url": "https://rapidapi.com/mbzkrm/api/stockpulse1/",
5
+ "name": "StockPulse",
6
+ "title": "StockPulse",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "StockPulse",
9
+ "score": {
10
+ "avgServiceLevel": 80,
11
+ "avgLatency": 578,
12
+ "avgSuccessRate": 80,
13
+ "popularityScore": 8.7,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "stockpulse1.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "Stock Options",
20
+ "url": "https://stockpulse1.p.rapidapi.com/options",
21
+ "description": "Option chain data is **the complete picture pertaining to option strikes of a particular stock or index in a single frame**. In the Option chain frame, the strike price is at the center and all data pertaining to calls and puts on the same strike are presented next to each other.\n\nYou can now specify the exiration date\n\nfor normal stocks :\nyou can directly search by tickername:\neg. tsla , msft , meta\n\nfor crypt:\ntry searching by ticker name followed by -USD.\nfor bitcoin try : btc-usd",
22
+ "method": "POST",
23
+ "required_parameters": [],
24
+ "optional_parameters": [],
25
+ "code": "import requests\n\nurl = \"https://stockpulse1.p.rapidapi.com/options\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockpulse1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
26
+ "convert_code": "import requests\n\nurl = \"https://stockpulse1.p.rapidapi.com/options\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockpulse1.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
27
+ "test_endpoint": ""
28
+ }
29
+ ]
30
+ }
toolbench/toolenv/tools/Finance/stocks_archive.json ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"stocks_archive",
3
+ "tool_description":"Archive data of some blue chip's tickers\n\n\n",
4
+ "title":"stocks_archive",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":100,
8
+ "avgLatency":195,
9
+ "avgSuccessRate":68,
10
+ "popularityScore":9.1,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/ryabinin.v.v/api/stocks_archive/",
14
+ "host":"stocks_archive.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"ping",
18
+ "url":"https://stocks_archive.p.rapidapi.com/ping",
19
+ "description":"Check that server is still alive",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[],
23
+ "code":"import requests\n\nurl = \"https://stocks_archive.p.rapidapi.com/ping\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocks_archive.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
24
+ "statuscode":200,
25
+ "body":{
26
+ "datetime":"2006-04-12T11:30:00.000Z",
27
+ "version":"1.2.3-2345",
28
+ "uptime":"54323.543"
29
+ },
30
+ "headers":{},
31
+ "schema":{
32
+ "required":[
33
+ "datetime"
34
+ ],
35
+ "type":"object",
36
+ "properties":{
37
+ "datetime":{
38
+ "description":"Server time",
39
+ "type":"string",
40
+ "format":"date-time"
41
+ },
42
+ "version":{
43
+ "description":"Server version",
44
+ "type":"string"
45
+ },
46
+ "uptime":{
47
+ "description":"Server uptime in seconds",
48
+ "type":"number",
49
+ "format":"float",
50
+ "minimum":-3.402823669209385e+38,
51
+ "maximum":3.402823669209385e+38
52
+ }
53
+ }
54
+ }
55
+ },
56
+ {
57
+ "name":"tickerData",
58
+ "url":"https://stocks_archive.p.rapidapi.com/ticker/archive/{tickername}/{period}/{startdate}/{enddate}",
59
+ "description":"Returns a list of ticker records",
60
+ "method":"GET",
61
+ "required_parameters":[
62
+ {
63
+ "name":"period",
64
+ "type":"STRING",
65
+ "description":"Ticker period",
66
+ "default":"1h"
67
+ },
68
+ {
69
+ "name":"startDate",
70
+ "type":"STRING",
71
+ "description":"Start date",
72
+ "default":"2010-04-12T14:30"
73
+ },
74
+ {
75
+ "name":"tickerName",
76
+ "type":"STRING",
77
+ "description":"Ticker name",
78
+ "default":"gold"
79
+ },
80
+ {
81
+ "name":"endDate",
82
+ "type":"STRING",
83
+ "description":"End date",
84
+ "default":"2010-04-20T12:30"
85
+ }
86
+ ],
87
+ "optional_parameters":[],
88
+ "code":"import requests\n\nurl = \"https://stocks_archive.p.rapidapi.com/ticker/archive/{tickername}/{period}/{startdate}/{enddate}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocks_archive.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
89
+ "statuscode":200,
90
+ "body":{
91
+ "records":[
92
+ {
93
+ "closeDateTime":"2006-04-12T11:30:00.000Z",
94
+ "open":105.5,
95
+ "close":109.3,
96
+ "high":111.1,
97
+ "low":102.7,
98
+ "volume":12345
99
+ }
100
+ ]
101
+ },
102
+ "headers":{},
103
+ "schema":{
104
+ "description":"List of ticker records",
105
+ "type":"object",
106
+ "properties":{
107
+ "records":{
108
+ "type":"array",
109
+ "items":{
110
+ "required":[
111
+ "closeDateTime",
112
+ "open",
113
+ "close",
114
+ "high",
115
+ "low",
116
+ "volume"
117
+ ],
118
+ "description":"One ticker record",
119
+ "type":"object",
120
+ "properties":{
121
+ "closeDateTime":{
122
+ "description":"Close date-time in local for stock-exchange format",
123
+ "type":"string",
124
+ "format":"date-time"
125
+ },
126
+ "open":{
127
+ "description":"Open price",
128
+ "type":"number",
129
+ "format":"float",
130
+ "minimum":-3.402823669209385e+38,
131
+ "maximum":3.402823669209385e+38
132
+ },
133
+ "close":{
134
+ "description":"Close price",
135
+ "type":"number",
136
+ "format":"float",
137
+ "minimum":-3.402823669209385e+38,
138
+ "maximum":3.402823669209385e+38
139
+ },
140
+ "high":{
141
+ "description":"Highest price",
142
+ "type":"number",
143
+ "format":"float",
144
+ "minimum":-3.402823669209385e+38,
145
+ "maximum":3.402823669209385e+38
146
+ },
147
+ "low":{
148
+ "description":"Lowest price",
149
+ "type":"number",
150
+ "format":"float",
151
+ "minimum":-3.402823669209385e+38,
152
+ "maximum":3.402823669209385e+38
153
+ },
154
+ "volume":{
155
+ "description":"Volume for period",
156
+ "type":"integer",
157
+ "format":"int32",
158
+ "minimum":-2147483648,
159
+ "maximum":2147483647
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ },
167
+ {
168
+ "name":"tickersList",
169
+ "url":"https://stocks_archive.p.rapidapi.com/ticker/list",
170
+ "description":"Returns a list of available tickers",
171
+ "method":"GET",
172
+ "required_parameters":[],
173
+ "optional_parameters":[],
174
+ "code":"import requests\n\nurl = \"https://stocks_archive.p.rapidapi.com/ticker/list\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocks_archive.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
175
+ "statuscode":200,
176
+ "body":{
177
+ "tickers":[
178
+ {
179
+ "name":"gazprom-cs",
180
+ "description":"Gazprom, common shares, MICEX",
181
+ "marketName":"BATS"
182
+ }
183
+ ]
184
+ },
185
+ "headers":{},
186
+ "schema":{
187
+ "description":"List of available tickers",
188
+ "type":"object",
189
+ "properties":{
190
+ "tickers":{
191
+ "type":"array",
192
+ "items":{
193
+ "required":[
194
+ "name",
195
+ "description"
196
+ ],
197
+ "type":"object",
198
+ "properties":{
199
+ "name":{
200
+ "description":"Short (machine) name",
201
+ "type":"string"
202
+ },
203
+ "description":{
204
+ "description":"Long (Human) name",
205
+ "type":"string"
206
+ },
207
+ "marketName":{
208
+ "description":"Market name",
209
+ "type":"string"
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ }
216
+ }
217
+ ]
218
+ }
toolbench/toolenv/tools/Finance/stocks_archive/api.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def ping(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Check that server is still alive"
12
+
13
+ """
14
+ url = f"https://stocks_archive.p.rapidapi.com/ping"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stocks_archive.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def tickerdata(period: str, startdate: str, tickername: str, enddate: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Returns a list of ticker records"
33
+ period: Ticker period
34
+ startdate: Start date
35
+ tickername: Ticker name
36
+ enddate: End date
37
+
38
+ """
39
+ url = f"https://stocks_archive.p.rapidapi.com/ticker/archive/{tickername}/{period}/{startdate}/{enddate}"
40
+ querystring = {}
41
+
42
+ headers = {
43
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
44
+ "X-RapidAPI-Host": "stocks_archive.p.rapidapi.com"
45
+ }
46
+
47
+
48
+ response = requests.get(url, headers=headers, params=querystring)
49
+ try:
50
+ observation = response.json()
51
+ except:
52
+ observation = response.text
53
+ return observation
54
+
55
+ def tickerslist(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
56
+ """
57
+ "Returns a list of available tickers"
58
+
59
+ """
60
+ url = f"https://stocks_archive.p.rapidapi.com/ticker/list"
61
+ querystring = {}
62
+
63
+ headers = {
64
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
65
+ "X-RapidAPI-Host": "stocks_archive.p.rapidapi.com"
66
+ }
67
+
68
+
69
+ response = requests.get(url, headers=headers, params=querystring)
70
+ try:
71
+ observation = response.json()
72
+ except:
73
+ observation = response.text
74
+ return observation
75
+
toolbench/toolenv/tools/Finance/stocksearch.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"StockSearch",
3
+ "tool_description":"Search for stocks by name, ticker symbol, or description",
4
+ "title":"StockSearch",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":99,
8
+ "avgLatency":662,
9
+ "avgSuccessRate":97,
10
+ "popularityScore":9.4,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/synfron/api/stocksearch/",
14
+ "host":"stocksearch.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Company Profile",
18
+ "url":"https://stocksearch.p.rapidapi.com/api/stocks/{symbol}",
19
+ "description":"Get a company profile containing information such as a description, sector, address, etc.",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"symbol",
24
+ "type":"string",
25
+ "description":"",
26
+ "default":"AAPL"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://stocksearch.p.rapidapi.com/api/stocks/{symbol}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocksearch.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":200,
32
+ "body":{
33
+ "name":"Apple Inc",
34
+ "symbol":"AAPL",
35
+ "region":"US",
36
+ "securityType":"Stock",
37
+ "bio":"Apple Inc. is a multinational corporation that designs, manufactures, and sells smartphones, laptops, tablets, wearables, and accessories. Apple also licenses its intellectual property and provides services such as Apple Arcade, a game subscription service; Apple Music, which provides users with a curated listening experience with on-demand radio stations; Apple News+, a subscription news and magazine service; Apple TV+, which provides exclusive original content; Apple Card, a co-branded credit card; and Apple Pay, a cashless payment service. Consumers, small and midsized businesses, education, enterprise, and government are all served by the company. It uses the App Store to distribute third-party applications for its products.",
38
+ "otherNames":[
39
+ "APPLE COMPUTER INC"
40
+ ],
41
+ "address1":"One Apple Park Way",
42
+ "address2":null,
43
+ "city":"Cupertino",
44
+ "state":"CA",
45
+ "zip":"95014",
46
+ "country":"United States",
47
+ "phone":"408 996 1010",
48
+ "sector":"Technology",
49
+ "industry":"Consumer Electronics",
50
+ "website":"https://www.apple.com"
51
+ },
52
+ "headers":{
53
+ "content-type":"application/json; charset=utf-8",
54
+ "date":"Sun, 20 Jun 2021 08:58:59 GMT",
55
+ "server":"RapidAPI-1.2.8",
56
+ "x-rapidapi-region":"AWS - us-east-1",
57
+ "x-rapidapi-version":"1.2.8",
58
+ "content-length":"420",
59
+ "connection":"Close"
60
+ },
61
+ "schema":{
62
+ "type":"array",
63
+ "items":{
64
+ "type":"object",
65
+ "properties":{
66
+ "name":{
67
+ "type":"string"
68
+ },
69
+ "symbol":{
70
+ "type":"string"
71
+ },
72
+ "region":{
73
+ "type":"string"
74
+ },
75
+ "securityType":{
76
+ "type":"string"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ },
82
+ {
83
+ "name":"Query Stocks V2",
84
+ "url":"https://stocksearch.p.rapidapi.com/api/v2/stocks",
85
+ "description":"Search stocks by name, symbol, or related item.",
86
+ "method":"GET",
87
+ "required_parameters":[
88
+ {
89
+ "name":"query",
90
+ "type":"STRING",
91
+ "description":"Search keywords",
92
+ "default":"pizza hut"
93
+ }
94
+ ],
95
+ "optional_parameters":[
96
+ {
97
+ "name":"searchMetadata",
98
+ "type":"BOOLEAN",
99
+ "description":"Search the company's description or related items",
100
+ "default":"true"
101
+ },
102
+ {
103
+ "name":"offset",
104
+ "type":"NUMBER",
105
+ "description":"Pagination offset from the previous set of results. For example, if `offset=5`, the results set will start at the 6th item from the total results. Note, 200 is the max number of results that will be returned in total.",
106
+ "default":"0"
107
+ },
108
+ {
109
+ "name":"size",
110
+ "type":"NUMBER",
111
+ "description":"Max number of results to get in one response. (Max value: 20)",
112
+ "default":"5"
113
+ }
114
+ ],
115
+ "code":"import requests\n\nurl = \"https://stocksearch.p.rapidapi.com/api/v2/stocks\"\nquerystring = {\"searchMetadata\": searchmetadata, \"query\": query, \"offset\": offset, \"size\": size}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocksearch.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
116
+ "statuscode":200,
117
+ "body":{
118
+ "results":[
119
+ {
120
+ "name":"Yum Brands Inc.",
121
+ "symbol":"YUM",
122
+ "shortBio":"Brands, Inc. develops, runs, and franchises quick service restaurants around the world through its subsidiaries.",
123
+ "region":"US",
124
+ "securityType":"Stock"
125
+ },
126
+ {
127
+ "name":"Yum China Holdings Inc",
128
+ "symbol":"YUMC",
129
+ "shortBio":"Yum China Holdings, Inc. is a Chinese restaurant company that owns, operates, and franchises restaurants.",
130
+ "region":"US",
131
+ "securityType":"Stock"
132
+ },
133
+ {
134
+ "name":"Dominos Pizza Inc",
135
+ "symbol":"DPZ",
136
+ "shortBio":"Domino's Pizza, Inc. operates as a pizza company in the United States and globally through its subsidiaries.",
137
+ "region":"US",
138
+ "securityType":"Stock"
139
+ },
140
+ {
141
+ "name":"Hut 8 Mining Corp",
142
+ "symbol":"HUT",
143
+ "shortBio":"In North America, Hut 8 Mining Corp. is a cryptocurrency mining corporation.",
144
+ "region":"US",
145
+ "securityType":"Stock"
146
+ },
147
+ {
148
+ "name":"BJ`s Restaurant Inc.",
149
+ "symbol":"BJRI",
150
+ "shortBio":"In the United States, BJ's Establishments, Inc. owns and operates casual dining restaurants.",
151
+ "region":"US",
152
+ "securityType":"Stock"
153
+ }
154
+ ],
155
+ "total":200
156
+ },
157
+ "headers":{
158
+ "access-control-allow-credentials":"true",
159
+ "access-control-allow-origin":"*",
160
+ "api-supported-versions":"1, 2",
161
+ "connection":"keep-alive",
162
+ "content-length":"1001",
163
+ "content-type":"application/json; charset=utf-8",
164
+ "date":"Sat, 28 May 2022 21:48:50 GMT",
165
+ "server":"RapidAPI-1.2.8",
166
+ "x-rapidapi-region":"AWS - us-east-1",
167
+ "x-rapidapi-version":"1.2.8"
168
+ },
169
+ "schema":{
170
+ "type":"object",
171
+ "properties":{
172
+ "results":{
173
+ "type":"array",
174
+ "items":{
175
+ "type":"object",
176
+ "properties":{
177
+ "name":{
178
+ "type":"string"
179
+ },
180
+ "symbol":{
181
+ "type":"string"
182
+ },
183
+ "shortBio":{
184
+ "type":"string"
185
+ },
186
+ "region":{
187
+ "type":"string"
188
+ },
189
+ "securityType":{
190
+ "type":"string"
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "total":{
196
+ "type":"integer"
197
+ }
198
+ }
199
+ }
200
+ },
201
+ {
202
+ "name":"Query Stocks",
203
+ "url":"https://stocksearch.p.rapidapi.com/api/stocks",
204
+ "description":"Search stocks by name or symbol",
205
+ "method":"GET",
206
+ "required_parameters":[
207
+ {
208
+ "name":"query",
209
+ "type":"STRING",
210
+ "description":"Full or partial ticker symbol or company name",
211
+ "default":"Apple"
212
+ }
213
+ ],
214
+ "optional_parameters":[
215
+ {
216
+ "name":"size",
217
+ "type":"NUMBER",
218
+ "description":"Number of results to return (max: 20)",
219
+ "default":"5"
220
+ }
221
+ ],
222
+ "code":"import requests\n\nurl = \"https://stocksearch.p.rapidapi.com/api/stocks\"\nquerystring = {\"size\": size, \"query\": query}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocksearch.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
223
+ "statuscode":200,
224
+ "body":[
225
+ {
226
+ "name":"Apple Inc",
227
+ "symbol":"AAPL",
228
+ "shortBio":"Apple Inc. is a multinational corporation that designs, manufactures, and sells smartphones, laptops, tablets, wearables, and accessories.",
229
+ "region":"US",
230
+ "securityType":"Stock"
231
+ },
232
+ {
233
+ "name":"Apple Hospitality REIT Inc",
234
+ "symbol":"APLE",
235
+ "shortBio":"Apple Hospitality REIT, Inc. (NYSE: APLE) controls one of the largest and most diverse portfolios of luxury, rooms-focused hotels in the United States.",
236
+ "region":"US",
237
+ "securityType":"Stock"
238
+ },
239
+ {
240
+ "name":"Applovin Corp - Class A",
241
+ "symbol":"APP",
242
+ "shortBio":"AppLovin Corporation is a software-based platform that helps mobile app developers better sell and monetize their apps in the United States and around the world.",
243
+ "region":"US",
244
+ "securityType":"Stock"
245
+ },
246
+ {
247
+ "name":"Maui Land & Pineapple Co., Inc.",
248
+ "symbol":"MLP",
249
+ "shortBio":"Maui Land & Pineapple Company, Inc. develops, manages, and sells residential, resort, commercial, agricultural, and industrial real estate in the United States through its subsidiaries.",
250
+ "region":"US",
251
+ "securityType":"Stock"
252
+ },
253
+ {
254
+ "name":"Pineapple Energy Inc",
255
+ "symbol":"PEGY",
256
+ "shortBio":"Through its subsidiaries, Communications Systems, Inc. delivers technological solutions and infrastructure to the commercial, healthcare, financial, and education markets.",
257
+ "region":"US",
258
+ "securityType":"Stock"
259
+ }
260
+ ],
261
+ "headers":{
262
+ "access-control-allow-credentials":"true",
263
+ "access-control-allow-origin":"*",
264
+ "api-supported-versions":"1, 2",
265
+ "connection":"keep-alive",
266
+ "content-length":"1309",
267
+ "content-type":"application/json; charset=utf-8",
268
+ "date":"Sat, 28 May 2022 20:34:27 GMT",
269
+ "server":"RapidAPI-1.2.8",
270
+ "x-rapidapi-region":"AWS - us-east-1",
271
+ "x-rapidapi-version":"1.2.8"
272
+ },
273
+ "schema":{
274
+ "type":"array",
275
+ "items":{
276
+ "type":"object",
277
+ "properties":{
278
+ "name":{
279
+ "type":"string"
280
+ },
281
+ "symbol":{
282
+ "type":"string"
283
+ },
284
+ "shortBio":{
285
+ "type":"string"
286
+ },
287
+ "region":{
288
+ "type":"string"
289
+ },
290
+ "securityType":{
291
+ "type":"string"
292
+ }
293
+ }
294
+ }
295
+ }
296
+ }
297
+ ]
298
+ }
toolbench/toolenv/tools/Finance/stocksearch/api.py ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def company_profile(symbol: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Get a company profile containing information such as a description, sector, address, etc."
12
+
13
+ """
14
+ url = f"https://stocksearch.p.rapidapi.com/api/stocks/{symbol}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "stocksearch.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def query_stocks_v2(query: str, searchmetadata: bool=None, offset: int=0, size: int=5, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Search stocks by name, symbol, or related item."
33
+ query: Search keywords
34
+ searchmetadata: Search the company's description or related items
35
+ offset: Pagination offset from the previous set of results. For example, if `offset=5`, the results set will start at the 6th item from the total results. Note, 200 is the max number of results that will be returned in total.
36
+ size: Max number of results to get in one response. (Max value: 20)
37
+
38
+ """
39
+ url = f"https://stocksearch.p.rapidapi.com/api/v2/stocks"
40
+ querystring = {'query': query, }
41
+ if searchmetadata:
42
+ querystring['searchMetadata'] = searchmetadata
43
+ if offset:
44
+ querystring['offset'] = offset
45
+ if size:
46
+ querystring['size'] = size
47
+
48
+ headers = {
49
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
50
+ "X-RapidAPI-Host": "stocksearch.p.rapidapi.com"
51
+ }
52
+
53
+
54
+ response = requests.get(url, headers=headers, params=querystring)
55
+ try:
56
+ observation = response.json()
57
+ except:
58
+ observation = response.text
59
+ return observation
60
+
61
+ def query_stocks(query: str, size: int=5, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
62
+ """
63
+ "Search stocks by name or symbol"
64
+ query: Full or partial ticker symbol or company name
65
+ size: Number of results to return (max: 20)
66
+
67
+ """
68
+ url = f"https://stocksearch.p.rapidapi.com/api/stocks"
69
+ querystring = {'query': query, }
70
+ if size:
71
+ querystring['size'] = size
72
+
73
+ headers = {
74
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
75
+ "X-RapidAPI-Host": "stocksearch.p.rapidapi.com"
76
+ }
77
+
78
+
79
+ response = requests.get(url, headers=headers, params=querystring)
80
+ try:
81
+ observation = response.json()
82
+ except:
83
+ observation = response.text
84
+ return observation
85
+
toolbench/toolenv/tools/Finance/stocktwits.json ADDED
@@ -0,0 +1,632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "53aa3327e4b0a705fcc30419",
3
+ "tool_description": "StockTwits provides a social communications platform and social graph for anyone interested in the markets and investing.",
4
+ "home_url": "https://rapidapi.com/stocktwits/api/stocktwits/",
5
+ "name": "StockTwits",
6
+ "title": "StockTwits",
7
+ "pricing": "FREE",
8
+ "tool_name": "StockTwits",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 717,
12
+ "avgSuccessRate": 12,
13
+ "popularityScore": 2,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "stocktwits.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "messages/like",
20
+ "url": "https://stocktwits.p.rapidapi.com/messages/like.json",
21
+ "description": "Like a message on StockTwits as the authenticating user.",
22
+ "method": "GET",
23
+ "required_parameters": [
24
+ {
25
+ "name": "id",
26
+ "type": "STRING",
27
+ "description": "ID of the message you want to like for the authenticating user",
28
+ "default": ""
29
+ }
30
+ ],
31
+ "optional_parameters": [],
32
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/like.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
33
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/like.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
34
+ "test_endpoint": {
35
+ "response": {
36
+ "status": 404
37
+ }
38
+ },
39
+ "statuscode": 1,
40
+ "schema": ""
41
+ },
42
+ {
43
+ "name": "account/verify",
44
+ "url": "https://stocktwits.p.rapidapi.com/account/verify.json",
45
+ "description": "This verifies the credentials of a user. Useful for checking if authentication method is correct.",
46
+ "method": "GET",
47
+ "required_parameters": [],
48
+ "optional_parameters": [
49
+ {
50
+ "name": "callback",
51
+ "type": "STRING",
52
+ "description": "Define your own callback function name, add this parameter as the value.",
53
+ "default": ""
54
+ }
55
+ ],
56
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/account/verify.json\"\nquerystring = {\"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
57
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/account/verify.json\"\nquerystring = {\"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
58
+ "test_endpoint": "",
59
+ "statuscode": 1,
60
+ "schema": ""
61
+ },
62
+ {
63
+ "name": "messages/show",
64
+ "url": "https://stocktwits.p.rapidapi.com/messages/show/{id}.json",
65
+ "description": "This shows the specified message details. This is used in a stand alone display. View the display guidelines",
66
+ "method": "GET",
67
+ "required_parameters": [
68
+ {
69
+ "name": "id",
70
+ "type": "STRING",
71
+ "description": "",
72
+ "default": ""
73
+ }
74
+ ],
75
+ "optional_parameters": [
76
+ {
77
+ "name": "conversation",
78
+ "type": "BOOLEAN",
79
+ "description": "Set to true to retrieve all meesages of the associated conversation.",
80
+ "default": ""
81
+ },
82
+ {
83
+ "name": "callback",
84
+ "type": "STRING",
85
+ "description": "Define your own callback function name, add this parameter as the value.",
86
+ "default": ""
87
+ }
88
+ ],
89
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/show/{id}.json\"\nquerystring = {\"conversation\": \"\", \"callback\": \"\", \"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
90
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/show/{id}.json\"\nquerystring = {\"conversation\": \"\", \"callback\": \"\", \"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
91
+ "test_endpoint": "",
92
+ "statuscode": 1,
93
+ "schema": ""
94
+ },
95
+ {
96
+ "name": "streams/mentions",
97
+ "url": "https://stocktwits.p.rapidapi.com/streams/mentions.json",
98
+ "description": "Returns the most recent 30 messages containing mentions of the authenticating user's handle. These are considered public replies",
99
+ "method": "GET",
100
+ "required_parameters": [],
101
+ "optional_parameters": [
102
+ {
103
+ "name": "since",
104
+ "type": "NUMBER",
105
+ "description": "Returns results with an ID greater than (more recent than) the specified ID.",
106
+ "default": ""
107
+ },
108
+ {
109
+ "name": "max",
110
+ "type": "NUMBER",
111
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID.",
112
+ "default": ""
113
+ },
114
+ {
115
+ "name": "limit",
116
+ "type": "NUMBER",
117
+ "description": "Default and max limit is 30. This limit must be a number under 30.",
118
+ "default": "20"
119
+ },
120
+ {
121
+ "name": "callback",
122
+ "type": "STRING",
123
+ "description": "Define your own callback function name, add this parameter as the value.",
124
+ "default": ""
125
+ }
126
+ ],
127
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/mentions.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
128
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/mentions.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
129
+ "test_endpoint": "",
130
+ "statuscode": 1,
131
+ "schema": ""
132
+ },
133
+ {
134
+ "name": "messages/unlike",
135
+ "url": "https://stocktwits.p.rapidapi.com/messages/unlike.json",
136
+ "description": "Unlike a message on StockTwits as the authenticating user.",
137
+ "method": "GET",
138
+ "required_parameters": [
139
+ {
140
+ "name": "id",
141
+ "type": "STRING",
142
+ "description": "ID of the message you want to unlike for the authenticating user",
143
+ "default": ""
144
+ }
145
+ ],
146
+ "optional_parameters": [],
147
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/unlike.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
148
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/unlike.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
149
+ "test_endpoint": {
150
+ "response": {
151
+ "status": 404
152
+ }
153
+ },
154
+ "statuscode": 1,
155
+ "schema": ""
156
+ },
157
+ {
158
+ "name": "streams/user",
159
+ "url": "https://stocktwits.p.rapidapi.com/streams/user/zerobeta.json",
160
+ "description": "Returns the most recent 30 messages for the specified user. Includes user object in response.",
161
+ "method": "GET",
162
+ "required_parameters": [
163
+ {
164
+ "name": "id",
165
+ "type": "STRING",
166
+ "description": "User ID or Username of the stream's user you want to show",
167
+ "default": "zerobeta"
168
+ }
169
+ ],
170
+ "optional_parameters": [
171
+ {
172
+ "name": "since",
173
+ "type": "NUMBER",
174
+ "description": "Returns results with an ID greater than (more recent than) the specified ID.",
175
+ "default": ""
176
+ },
177
+ {
178
+ "name": "max",
179
+ "type": "NUMBER",
180
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID.",
181
+ "default": ""
182
+ },
183
+ {
184
+ "name": "limit",
185
+ "type": "NUMBER",
186
+ "description": "Default and max limit is 30. This limit must be a number under 30.",
187
+ "default": ""
188
+ },
189
+ {
190
+ "name": "callback",
191
+ "type": "STRING",
192
+ "description": "Define your own callback function name, add this parameter as the value.",
193
+ "default": ""
194
+ },
195
+ {
196
+ "name": "filter",
197
+ "type": "STRING",
198
+ "description": "Filter messages by links, charts, or videos.",
199
+ "default": ""
200
+ }
201
+ ],
202
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/user/zerobeta.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
203
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/user/{id}.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
204
+ "test_endpoint": "",
205
+ "statuscode": 1,
206
+ "schema": ""
207
+ },
208
+ {
209
+ "name": "watchlists/index",
210
+ "url": "https://stocktwits.p.rapidapi.com/watchlists.json",
211
+ "description": "Returns a list of private watch lists for the authenticating user.",
212
+ "method": "GET",
213
+ "required_parameters": [],
214
+ "optional_parameters": [
215
+ {
216
+ "name": "callback",
217
+ "type": "STRING",
218
+ "description": "Define your own callback function name, add this parameter as the value.",
219
+ "default": ""
220
+ }
221
+ ],
222
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/watchlists.json\"\nquerystring = {\"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
223
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/watchlists.json\"\nquerystring = {\"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
224
+ "test_endpoint": "",
225
+ "statuscode": 1,
226
+ "schema": ""
227
+ },
228
+ {
229
+ "name": "account/update",
230
+ "url": "https://stocktwits.p.rapidapi.com/account/update.json",
231
+ "description": "This updates the properties of the authenticating user's account.",
232
+ "method": "GET",
233
+ "required_parameters": [],
234
+ "optional_parameters": [
235
+ {
236
+ "name": "name",
237
+ "type": "STRING",
238
+ "description": "The full name of the account holder",
239
+ "default": ""
240
+ },
241
+ {
242
+ "name": "email",
243
+ "type": "STRING",
244
+ "description": "The email address for the account holder",
245
+ "default": ""
246
+ },
247
+ {
248
+ "name": "username",
249
+ "type": "STRING",
250
+ "description": "The username for the account holder",
251
+ "default": ""
252
+ }
253
+ ],
254
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/account/update.json\"\nquerystring = {\"name\": \"\", \"email\": \"\", \"username\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
255
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/account/update.json\"\nquerystring = {\"name\": \"\", \"email\": \"\", \"username\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
256
+ "test_endpoint": {
257
+ "response": {
258
+ "status": 404
259
+ }
260
+ },
261
+ "statuscode": 1,
262
+ "schema": ""
263
+ },
264
+ {
265
+ "name": "streams/direct",
266
+ "url": "https://stocktwits.p.rapidapi.com/streams/direct.json",
267
+ "description": "Returns the most recent 30 direct messages sent to the authenticating user. These area all private messages sent and recieved.",
268
+ "method": "GET",
269
+ "required_parameters": [],
270
+ "optional_parameters": [
271
+ {
272
+ "name": "since",
273
+ "type": "NUMBER",
274
+ "description": "Returns results with an ID greater than (more recent than) the specified ID.",
275
+ "default": ""
276
+ },
277
+ {
278
+ "name": "max",
279
+ "type": "NUMBER",
280
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID.",
281
+ "default": ""
282
+ },
283
+ {
284
+ "name": "limit",
285
+ "type": "NUMBER",
286
+ "description": "Default and max limit is 30. This limit must be a number under 30.",
287
+ "default": "20"
288
+ },
289
+ {
290
+ "name": "callback",
291
+ "type": "STRING",
292
+ "description": "Define your own callback function name, add this parameter as the value.",
293
+ "default": ""
294
+ }
295
+ ],
296
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/direct.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
297
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/direct.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
298
+ "test_endpoint": "",
299
+ "statuscode": 1,
300
+ "schema": ""
301
+ },
302
+ {
303
+ "name": "streams/home",
304
+ "url": "https://stocktwits.p.rapidapi.com/streams/home.json",
305
+ "description": "Returns the most recent 30 messages posted to the authenticating user's home stream, which is made up of the users and stocks they follow.",
306
+ "method": "GET",
307
+ "required_parameters": [],
308
+ "optional_parameters": [
309
+ {
310
+ "name": "since",
311
+ "type": "NUMBER",
312
+ "description": "Returns results with an ID greater than (more recent than) the specified ID",
313
+ "default": ""
314
+ },
315
+ {
316
+ "name": "max",
317
+ "type": "NUMBER",
318
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID.",
319
+ "default": ""
320
+ },
321
+ {
322
+ "name": "limit",
323
+ "type": "NUMBER",
324
+ "description": "Default and max limit is 30. This limit must be a number under 30.",
325
+ "default": "20"
326
+ },
327
+ {
328
+ "name": "callback",
329
+ "type": "STRING",
330
+ "description": "Define your own callback function name, add this parameter as the value.",
331
+ "default": ""
332
+ },
333
+ {
334
+ "name": "filter",
335
+ "type": "STRING",
336
+ "description": "Filter messages by links, charts, videos, or top.",
337
+ "default": ""
338
+ }
339
+ ],
340
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/home.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
341
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/home.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
342
+ "test_endpoint": "",
343
+ "statuscode": 1,
344
+ "schema": ""
345
+ },
346
+ {
347
+ "name": "streams/symbol",
348
+ "url": "https://stocktwits.p.rapidapi.com/streams/symbol/AAPL.json",
349
+ "description": "Returns the most recent 30 messages for the specified symbol.",
350
+ "method": "GET",
351
+ "required_parameters": [
352
+ {
353
+ "name": "id",
354
+ "type": "STRING",
355
+ "description": "Ticker symbol, Stock ID, or RIC code of the symbol",
356
+ "default": "AAPL"
357
+ }
358
+ ],
359
+ "optional_parameters": [
360
+ {
361
+ "name": "since",
362
+ "type": "NUMBER",
363
+ "description": "Returns results with an ID greater than (more recent than) the specified ID",
364
+ "default": ""
365
+ },
366
+ {
367
+ "name": "max",
368
+ "type": "NUMBER",
369
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID",
370
+ "default": ""
371
+ },
372
+ {
373
+ "name": "limit",
374
+ "type": "NUMBER",
375
+ "description": "Default and max limit is 30. This limit must be a number under 30",
376
+ "default": "20"
377
+ },
378
+ {
379
+ "name": "callback",
380
+ "type": "STRING",
381
+ "description": "Define your own callback function name, add this parameter as the value.",
382
+ "default": ""
383
+ },
384
+ {
385
+ "name": "filter",
386
+ "type": "STRING",
387
+ "description": "Filter messages by links, charts, videos, or top.",
388
+ "default": ""
389
+ }
390
+ ],
391
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/symbol/AAPL.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
392
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/symbol/{id}.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
393
+ "test_endpoint": "",
394
+ "statuscode": 1,
395
+ "schema": ""
396
+ },
397
+ {
398
+ "name": "streams/investor_relations",
399
+ "url": "https://stocktwits.p.rapidapi.com/streams/investor_relations.json",
400
+ "description": "Returns the most recent 30 messages posted by verified Investor Relations customers.",
401
+ "method": "GET",
402
+ "required_parameters": [],
403
+ "optional_parameters": [
404
+ {
405
+ "name": "since",
406
+ "type": "NUMBER",
407
+ "description": "Returns results with an ID greater than (more recent than) the specified ID.",
408
+ "default": ""
409
+ },
410
+ {
411
+ "name": "max",
412
+ "type": "NUMBER",
413
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID.",
414
+ "default": ""
415
+ },
416
+ {
417
+ "name": "limit",
418
+ "type": "STRING",
419
+ "description": "Default and max limit is 30. This limit must be a number under 30.",
420
+ "default": "20"
421
+ },
422
+ {
423
+ "name": "callback",
424
+ "type": "STRING",
425
+ "description": "Define your own callback function name, add this parameter as the value.",
426
+ "default": ""
427
+ }
428
+ ],
429
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/investor_relations.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
430
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/investor_relations.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
431
+ "test_endpoint": "",
432
+ "statuscode": 1,
433
+ "schema": ""
434
+ },
435
+ {
436
+ "name": "streams/friends",
437
+ "url": "https://stocktwits.p.rapidapi.com/streams/friends.json",
438
+ "description": "Returns the most recent 30 messages posted to the authenticating user's people stream of the users they follow.",
439
+ "method": "GET",
440
+ "required_parameters": [],
441
+ "optional_parameters": [
442
+ {
443
+ "name": "since",
444
+ "type": "NUMBER",
445
+ "description": "Returns results with an ID greater than (more recent than) the specified ID.",
446
+ "default": ""
447
+ },
448
+ {
449
+ "name": "max",
450
+ "type": "NUMBER",
451
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID.",
452
+ "default": ""
453
+ },
454
+ {
455
+ "name": "limit",
456
+ "type": "NUMBER",
457
+ "description": "Default and max limit is 30. This limit must be a number under 30.",
458
+ "default": "20"
459
+ },
460
+ {
461
+ "name": "callback",
462
+ "type": "STRING",
463
+ "description": "Define your own callback function name, add this parameter as the value.",
464
+ "default": ""
465
+ },
466
+ {
467
+ "name": "filter",
468
+ "type": "STRING",
469
+ "description": "Filter messages by links, charts, videos, or top.",
470
+ "default": ""
471
+ }
472
+ ],
473
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/friends.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
474
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/friends.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"filter\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
475
+ "test_endpoint": "",
476
+ "statuscode": 1,
477
+ "schema": ""
478
+ },
479
+ {
480
+ "name": "streams/watchlist",
481
+ "url": "https://stocktwits.p.rapidapi.com/streams/watchlist/{id}.json",
482
+ "description": "Returns the most recent 30 messages for the specified watch list for the authenticating user. The watch list is a private list of all the symbols a user is watching.",
483
+ "method": "GET",
484
+ "required_parameters": [
485
+ {
486
+ "name": "id",
487
+ "type": "STRING",
488
+ "description": "ID of the watch list you want to show from the authenticating user",
489
+ "default": ""
490
+ }
491
+ ],
492
+ "optional_parameters": [
493
+ {
494
+ "name": "since",
495
+ "type": "NUMBER",
496
+ "description": "Returns results with an ID greater than (more recent than) the specified ID.",
497
+ "default": ""
498
+ },
499
+ {
500
+ "name": "max",
501
+ "type": "NUMBER",
502
+ "description": "Returns results with an ID less than (older than) or equal to the specified ID.",
503
+ "default": ""
504
+ },
505
+ {
506
+ "name": "limit",
507
+ "type": "NUMBER",
508
+ "description": "Default and max limit is 30. This limit must be a number under 30.",
509
+ "default": "20"
510
+ },
511
+ {
512
+ "name": "callback",
513
+ "type": "STRING",
514
+ "description": "Define your own callback function name, add this parameter as the value.",
515
+ "default": ""
516
+ }
517
+ ],
518
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/watchlist/{id}.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
519
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/streams/watchlist/{id}.json\"\nquerystring = {\"since\": \"\", \"max\": \"\", \"limit\": \"20\", \"callback\": \"\", \"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
520
+ "test_endpoint": "",
521
+ "statuscode": 1,
522
+ "schema": ""
523
+ },
524
+ {
525
+ "name": "watchlists/show",
526
+ "url": "https://stocktwits.p.rapidapi.com/watchlists/show/{id}.json",
527
+ "description": "Returns the the list of ticker symbols in a specified watch list for the authenticating user. Required parameter is the ID of the watch list, not the name of the watch list.",
528
+ "method": "GET",
529
+ "required_parameters": [
530
+ {
531
+ "name": "id",
532
+ "type": "STRING",
533
+ "description": "The ID of the watch list to be shown",
534
+ "default": ""
535
+ }
536
+ ],
537
+ "optional_parameters": [
538
+ {
539
+ "name": "callback",
540
+ "type": "STRING",
541
+ "description": "Define your own callback function name, add this parameter as the value.",
542
+ "default": ""
543
+ }
544
+ ],
545
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/watchlists/show/{id}.json\"\nquerystring = {\"callback\": \"\", \"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
546
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/watchlists/show/{id}.json\"\nquerystring = {\"callback\": \"\", \"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.get(url, headers=headers, params=querystring)\nprint(response.json())\n",
547
+ "test_endpoint": "",
548
+ "statuscode": 1,
549
+ "schema": ""
550
+ },
551
+ {
552
+ "name": "blocks/create",
553
+ "url": "https://stocktwits.p.rapidapi.com/blocks/create/{id}.json",
554
+ "description": "This blocks a user so the authenticating user will not receive message from the specified user. Required parameter is the User ID of the user to block, not the username.",
555
+ "method": "POST",
556
+ "required_parameters": [
557
+ {
558
+ "name": "id",
559
+ "type": "STRING",
560
+ "description": "The ID of the user you want to block",
561
+ "default": ""
562
+ }
563
+ ],
564
+ "optional_parameters": [],
565
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/blocks/create/{id}.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
566
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/blocks/create/{id}.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
567
+ "test_endpoint": "",
568
+ "statuscode": 1,
569
+ "schema": ""
570
+ },
571
+ {
572
+ "name": "messages/create",
573
+ "url": "https://stocktwits.p.rapidapi.com/messages/create.json",
574
+ "description": "Create a StockTwits message. To upload a chart to accompany the message, pass a file using the chart parameter. The API will check that the character count is under 140, will shorten all links, and prevent duplicate message postings. Learn more about parameters and character counting The reposonse returned on creating a message is a great way to use StockTwits context with content sent to another non-finacially focused social network such as Facebook, LinkedIn or Twitter. By using the body content that is returned you will receive the complete message compiled with any shortened links. Because these other platforms aren't as investor-focused as StockTwits they may lack the context like price, chart or video. Sending the response's body will allow the user of those other networks access to the finacial context of the message with a link back to the appropriate page. The Message ID can be used to create your own link to the message as a landing page. This comes in handy in the case of a Chart or Video where you might not want to create your own webpage or integrate the chart or video into your application.",
575
+ "method": "POST",
576
+ "required_parameters": [
577
+ {
578
+ "name": "body",
579
+ "type": "STRING",
580
+ "description": "The body of the message. This parameter should be URL-encoded or entire request sent as multipart/form-data for all characters to submit properly. Chracter count must be under 140",
581
+ "default": ""
582
+ }
583
+ ],
584
+ "optional_parameters": [
585
+ {
586
+ "name": "in_reply_to_message_id",
587
+ "type": "NUMBER",
588
+ "description": "The ID this message replies to, if any.",
589
+ "default": ""
590
+ },
591
+ {
592
+ "name": "chart",
593
+ "type": "STRING",
594
+ "description": "Path or URL to file to be uploaded. File Formats accepted: JPG, PNG, GIF under 1MB",
595
+ "default": ""
596
+ },
597
+ {
598
+ "name": "sentiment",
599
+ "type": "STRING",
600
+ "description": "A sentiment label for the message. Acceptable values: bullish, bearish, neutral. Defaults to neutral.",
601
+ "default": ""
602
+ }
603
+ ],
604
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/create.json\"\nquerystring = {\"body\": \"\", \"in_reply_to_message_id\": \"\", \"chart\": \"\", \"sentiment\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
605
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/messages/create.json\"\nquerystring = {\"body\": \"\", \"in_reply_to_message_id\": \"\", \"chart\": \"\", \"sentiment\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
606
+ "test_endpoint": "",
607
+ "statuscode": 1,
608
+ "schema": ""
609
+ },
610
+ {
611
+ "name": "blocks/destroy",
612
+ "url": "https://stocktwits.p.rapidapi.com/blocks/destroy/{id}.json",
613
+ "description": "This unblocks a user so the authenticating user can reveive messages from the specified user. required parameter is the User ID of the user to unblock, not the username.",
614
+ "method": "POST",
615
+ "required_parameters": [
616
+ {
617
+ "name": "id",
618
+ "type": "STRING",
619
+ "description": "The ID of the user you want to unblock",
620
+ "default": ""
621
+ }
622
+ ],
623
+ "optional_parameters": [],
624
+ "code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/blocks/destroy/{id}.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
625
+ "convert_code": "import requests\n\nurl = \"https://stocktwits.p.rapidapi.com/blocks/destroy/{id}.json\"\nquerystring = {\"id\": \"\"}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stocktwits.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers, params=querystring)\nprint(response.json())\n",
626
+ "test_endpoint": "",
627
+ "statuscode": 1,
628
+ "schema": ""
629
+ }
630
+ ],
631
+ "standardized_name": "stocktwits"
632
+ }
toolbench/toolenv/tools/Finance/stocktwits/api.py ADDED
@@ -0,0 +1,461 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def messages_like(is_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Like a message on StockTwits as the authenticating user."
12
+ id: ID of the message you want to like for the authenticating user
13
+
14
+ """
15
+ url = f"https://stocktwits.p.rapidapi.com/messages/like.json"
16
+ querystring = {'id': is_id, }
17
+
18
+ headers = {
19
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
20
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
21
+ }
22
+
23
+
24
+ response = requests.get(url, headers=headers, params=querystring)
25
+ try:
26
+ observation = response.json()
27
+ except:
28
+ observation = response.text
29
+ return observation
30
+
31
+ def account_verify(callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
32
+ """
33
+ "This verifies the credentials of a user. Useful for checking if authentication method is correct."
34
+ callback: Define your own callback function name, add this parameter as the value.
35
+
36
+ """
37
+ url = f"https://stocktwits.p.rapidapi.com/account/verify.json"
38
+ querystring = {}
39
+ if callback:
40
+ querystring['callback'] = callback
41
+
42
+ headers = {
43
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
44
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
45
+ }
46
+
47
+
48
+ response = requests.get(url, headers=headers, params=querystring)
49
+ try:
50
+ observation = response.json()
51
+ except:
52
+ observation = response.text
53
+ return observation
54
+
55
+ def messages_show(is_id: str, conversation: bool=None, callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
56
+ """
57
+ "This shows the specified message details. This is used in a stand alone display. View the display guidelines"
58
+ conversation: Set to true to retrieve all meesages of the associated conversation.
59
+ callback: Define your own callback function name, add this parameter as the value.
60
+
61
+ """
62
+ url = f"https://stocktwits.p.rapidapi.com/messages/show/{is_id}.json"
63
+ querystring = {}
64
+ if conversation:
65
+ querystring['conversation'] = conversation
66
+ if callback:
67
+ querystring['callback'] = callback
68
+
69
+ headers = {
70
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
71
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
72
+ }
73
+
74
+
75
+ response = requests.get(url, headers=headers, params=querystring)
76
+ try:
77
+ observation = response.json()
78
+ except:
79
+ observation = response.text
80
+ return observation
81
+
82
+ def streams_mentions(since: int=None, max: int=None, limit: int=20, callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
83
+ """
84
+ "Returns the most recent 30 messages containing mentions of the authenticating user's handle. These are considered public replies"
85
+ since: Returns results with an ID greater than (more recent than) the specified ID.
86
+ max: Returns results with an ID less than (older than) or equal to the specified ID.
87
+ limit: Default and max limit is 30. This limit must be a number under 30.
88
+ callback: Define your own callback function name, add this parameter as the value.
89
+
90
+ """
91
+ url = f"https://stocktwits.p.rapidapi.com/streams/mentions.json"
92
+ querystring = {}
93
+ if since:
94
+ querystring['since'] = since
95
+ if max:
96
+ querystring['max'] = max
97
+ if limit:
98
+ querystring['limit'] = limit
99
+ if callback:
100
+ querystring['callback'] = callback
101
+
102
+ headers = {
103
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
104
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
105
+ }
106
+
107
+
108
+ response = requests.get(url, headers=headers, params=querystring)
109
+ try:
110
+ observation = response.json()
111
+ except:
112
+ observation = response.text
113
+ return observation
114
+
115
+ def messages_unlike(is_id: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
116
+ """
117
+ "Unlike a message on StockTwits as the authenticating user."
118
+ id: ID of the message you want to unlike for the authenticating user
119
+
120
+ """
121
+ url = f"https://stocktwits.p.rapidapi.com/messages/unlike.json"
122
+ querystring = {'id': is_id, }
123
+
124
+ headers = {
125
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
126
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
127
+ }
128
+
129
+
130
+ response = requests.get(url, headers=headers, params=querystring)
131
+ try:
132
+ observation = response.json()
133
+ except:
134
+ observation = response.text
135
+ return observation
136
+
137
+ def streams_user(is_id: str, since: int=None, max: int=None, limit: int=None, callback: str=None, filter: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
138
+ """
139
+ "Returns the most recent 30 messages for the specified user. Includes user object in response."
140
+ id: User ID or Username of the stream's user you want to show
141
+ since: Returns results with an ID greater than (more recent than) the specified ID.
142
+ max: Returns results with an ID less than (older than) or equal to the specified ID.
143
+ limit: Default and max limit is 30. This limit must be a number under 30.
144
+ callback: Define your own callback function name, add this parameter as the value.
145
+ filter: Filter messages by links, charts, or videos.
146
+
147
+ """
148
+ url = f"https://stocktwits.p.rapidapi.com/streams/user/{is_id}.json"
149
+ querystring = {}
150
+ if since:
151
+ querystring['since'] = since
152
+ if max:
153
+ querystring['max'] = max
154
+ if limit:
155
+ querystring['limit'] = limit
156
+ if callback:
157
+ querystring['callback'] = callback
158
+ if filter:
159
+ querystring['filter'] = filter
160
+
161
+ headers = {
162
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
163
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
164
+ }
165
+
166
+
167
+ response = requests.get(url, headers=headers, params=querystring)
168
+ try:
169
+ observation = response.json()
170
+ except:
171
+ observation = response.text
172
+ return observation
173
+
174
+ def watchlists_index(callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
175
+ """
176
+ "Returns a list of private watch lists for the authenticating user."
177
+ callback: Define your own callback function name, add this parameter as the value.
178
+
179
+ """
180
+ url = f"https://stocktwits.p.rapidapi.com/watchlists.json"
181
+ querystring = {}
182
+ if callback:
183
+ querystring['callback'] = callback
184
+
185
+ headers = {
186
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
187
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
188
+ }
189
+
190
+
191
+ response = requests.get(url, headers=headers, params=querystring)
192
+ try:
193
+ observation = response.json()
194
+ except:
195
+ observation = response.text
196
+ return observation
197
+
198
+ def account_update(name: str=None, email: str=None, username: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
199
+ """
200
+ "This updates the properties of the authenticating user's account."
201
+ name: The full name of the account holder
202
+ email: The email address for the account holder
203
+ username: The username for the account holder
204
+
205
+ """
206
+ url = f"https://stocktwits.p.rapidapi.com/account/update.json"
207
+ querystring = {}
208
+ if name:
209
+ querystring['name'] = name
210
+ if email:
211
+ querystring['email'] = email
212
+ if username:
213
+ querystring['username'] = username
214
+
215
+ headers = {
216
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
217
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
218
+ }
219
+
220
+
221
+ response = requests.get(url, headers=headers, params=querystring)
222
+ try:
223
+ observation = response.json()
224
+ except:
225
+ observation = response.text
226
+ return observation
227
+
228
+ def streams_direct(since: int=None, max: int=None, limit: int=20, callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
229
+ """
230
+ "Returns the most recent 30 direct messages sent to the authenticating user. These area all private messages sent and recieved."
231
+ since: Returns results with an ID greater than (more recent than) the specified ID.
232
+ max: Returns results with an ID less than (older than) or equal to the specified ID.
233
+ limit: Default and max limit is 30. This limit must be a number under 30.
234
+ callback: Define your own callback function name, add this parameter as the value.
235
+
236
+ """
237
+ url = f"https://stocktwits.p.rapidapi.com/streams/direct.json"
238
+ querystring = {}
239
+ if since:
240
+ querystring['since'] = since
241
+ if max:
242
+ querystring['max'] = max
243
+ if limit:
244
+ querystring['limit'] = limit
245
+ if callback:
246
+ querystring['callback'] = callback
247
+
248
+ headers = {
249
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
250
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
251
+ }
252
+
253
+
254
+ response = requests.get(url, headers=headers, params=querystring)
255
+ try:
256
+ observation = response.json()
257
+ except:
258
+ observation = response.text
259
+ return observation
260
+
261
+ def streams_home(since: int=None, max: int=None, limit: int=20, callback: str=None, filter: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
262
+ """
263
+ "Returns the most recent 30 messages posted to the authenticating user's home stream, which is made up of the users and stocks they follow."
264
+ since: Returns results with an ID greater than (more recent than) the specified ID
265
+ max: Returns results with an ID less than (older than) or equal to the specified ID.
266
+ limit: Default and max limit is 30. This limit must be a number under 30.
267
+ callback: Define your own callback function name, add this parameter as the value.
268
+ filter: Filter messages by links, charts, videos, or top.
269
+
270
+ """
271
+ url = f"https://stocktwits.p.rapidapi.com/streams/home.json"
272
+ querystring = {}
273
+ if since:
274
+ querystring['since'] = since
275
+ if max:
276
+ querystring['max'] = max
277
+ if limit:
278
+ querystring['limit'] = limit
279
+ if callback:
280
+ querystring['callback'] = callback
281
+ if filter:
282
+ querystring['filter'] = filter
283
+
284
+ headers = {
285
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
286
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
287
+ }
288
+
289
+
290
+ response = requests.get(url, headers=headers, params=querystring)
291
+ try:
292
+ observation = response.json()
293
+ except:
294
+ observation = response.text
295
+ return observation
296
+
297
+ def streams_symbol(is_id: str, since: int=None, max: int=None, limit: int=20, callback: str=None, filter: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
298
+ """
299
+ "Returns the most recent 30 messages for the specified symbol."
300
+ id: Ticker symbol, Stock ID, or RIC code of the symbol
301
+ since: Returns results with an ID greater than (more recent than) the specified ID
302
+ max: Returns results with an ID less than (older than) or equal to the specified ID
303
+ limit: Default and max limit is 30. This limit must be a number under 30
304
+ callback: Define your own callback function name, add this parameter as the value.
305
+ filter: Filter messages by links, charts, videos, or top.
306
+
307
+ """
308
+ url = f"https://stocktwits.p.rapidapi.com/streams/symbol/{is_id}.json"
309
+ querystring = {}
310
+ if since:
311
+ querystring['since'] = since
312
+ if max:
313
+ querystring['max'] = max
314
+ if limit:
315
+ querystring['limit'] = limit
316
+ if callback:
317
+ querystring['callback'] = callback
318
+ if filter:
319
+ querystring['filter'] = filter
320
+
321
+ headers = {
322
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
323
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
324
+ }
325
+
326
+
327
+ response = requests.get(url, headers=headers, params=querystring)
328
+ try:
329
+ observation = response.json()
330
+ except:
331
+ observation = response.text
332
+ return observation
333
+
334
+ def streams_investor_relations(since: int=None, max: int=None, limit: str='20', callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
335
+ """
336
+ "Returns the most recent 30 messages posted by verified Investor Relations customers."
337
+ since: Returns results with an ID greater than (more recent than) the specified ID.
338
+ max: Returns results with an ID less than (older than) or equal to the specified ID.
339
+ limit: Default and max limit is 30. This limit must be a number under 30.
340
+ callback: Define your own callback function name, add this parameter as the value.
341
+
342
+ """
343
+ url = f"https://stocktwits.p.rapidapi.com/streams/investor_relations.json"
344
+ querystring = {}
345
+ if since:
346
+ querystring['since'] = since
347
+ if max:
348
+ querystring['max'] = max
349
+ if limit:
350
+ querystring['limit'] = limit
351
+ if callback:
352
+ querystring['callback'] = callback
353
+
354
+ headers = {
355
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
356
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
357
+ }
358
+
359
+
360
+ response = requests.get(url, headers=headers, params=querystring)
361
+ try:
362
+ observation = response.json()
363
+ except:
364
+ observation = response.text
365
+ return observation
366
+
367
+ def streams_friends(since: int=None, max: int=None, limit: int=20, callback: str=None, filter: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
368
+ """
369
+ "Returns the most recent 30 messages posted to the authenticating user's people stream of the users they follow."
370
+ since: Returns results with an ID greater than (more recent than) the specified ID.
371
+ max: Returns results with an ID less than (older than) or equal to the specified ID.
372
+ limit: Default and max limit is 30. This limit must be a number under 30.
373
+ callback: Define your own callback function name, add this parameter as the value.
374
+ filter: Filter messages by links, charts, videos, or top.
375
+
376
+ """
377
+ url = f"https://stocktwits.p.rapidapi.com/streams/friends.json"
378
+ querystring = {}
379
+ if since:
380
+ querystring['since'] = since
381
+ if max:
382
+ querystring['max'] = max
383
+ if limit:
384
+ querystring['limit'] = limit
385
+ if callback:
386
+ querystring['callback'] = callback
387
+ if filter:
388
+ querystring['filter'] = filter
389
+
390
+ headers = {
391
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
392
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
393
+ }
394
+
395
+
396
+ response = requests.get(url, headers=headers, params=querystring)
397
+ try:
398
+ observation = response.json()
399
+ except:
400
+ observation = response.text
401
+ return observation
402
+
403
+ def streams_watchlist(is_id: str, since: int=None, max: int=None, limit: int=20, callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
404
+ """
405
+ "Returns the most recent 30 messages for the specified watch list for the authenticating user. The watch list is a private list of all the symbols a user is watching."
406
+ id: ID of the watch list you want to show from the authenticating user
407
+ since: Returns results with an ID greater than (more recent than) the specified ID.
408
+ max: Returns results with an ID less than (older than) or equal to the specified ID.
409
+ limit: Default and max limit is 30. This limit must be a number under 30.
410
+ callback: Define your own callback function name, add this parameter as the value.
411
+
412
+ """
413
+ url = f"https://stocktwits.p.rapidapi.com/streams/watchlist/{is_id}.json"
414
+ querystring = {}
415
+ if since:
416
+ querystring['since'] = since
417
+ if max:
418
+ querystring['max'] = max
419
+ if limit:
420
+ querystring['limit'] = limit
421
+ if callback:
422
+ querystring['callback'] = callback
423
+
424
+ headers = {
425
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
426
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
427
+ }
428
+
429
+
430
+ response = requests.get(url, headers=headers, params=querystring)
431
+ try:
432
+ observation = response.json()
433
+ except:
434
+ observation = response.text
435
+ return observation
436
+
437
+ def watchlists_show(is_id: str, callback: str=None, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
438
+ """
439
+ "Returns the the list of ticker symbols in a specified watch list for the authenticating user. Required parameter is the ID of the watch list, not the name of the watch list."
440
+ id: The ID of the watch list to be shown
441
+ callback: Define your own callback function name, add this parameter as the value.
442
+
443
+ """
444
+ url = f"https://stocktwits.p.rapidapi.com/watchlists/show/{is_id}.json"
445
+ querystring = {}
446
+ if callback:
447
+ querystring['callback'] = callback
448
+
449
+ headers = {
450
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
451
+ "X-RapidAPI-Host": "stocktwits.p.rapidapi.com"
452
+ }
453
+
454
+
455
+ response = requests.get(url, headers=headers, params=querystring)
456
+ try:
457
+ observation = response.json()
458
+ except:
459
+ observation = response.text
460
+ return observation
461
+
toolbench/toolenv/tools/Finance/stockyapiexchange.json ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"StockyAPIExchange",
3
+ "tool_description":"Based on the request parameters, StockyAPIExchange can provide relevant information to the user, such as stock details, summary, charts, history, daily, or latest data. The API can also use autocomplete to suggest stock names or ticker symbols as the user types the keyword, making it easier for the front end develepor to create the perfect Tool",
4
+ "title":"StockyAPIExchange",
5
+ "pricing":"FREEMIUM",
6
+ "score":{
7
+ "avgServiceLevel":89,
8
+ "avgLatency":64572,
9
+ "avgSuccessRate":89,
10
+ "popularityScore":9.3,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/eng.ekeyrouz/api/stockyapiexchange/",
14
+ "host":"stockyapiexchange.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"7-Latest",
18
+ "url":"https://stockyapiexchange.p.rapidapi.com/latest",
19
+ "description":"This feature provides the most recent information about a stock, including its current price, percentage change, and trading volume. It's updated in real-time as new data becomes available.",
20
+ "method":"GET",
21
+ "required_parameters":[],
22
+ "optional_parameters":[
23
+ {
24
+ "name":"keyword",
25
+ "type":"STRING",
26
+ "description":"",
27
+ "default":"GOOG"
28
+ }
29
+ ],
30
+ "code":"import requests\n\nurl = \"https://stockyapiexchange.p.rapidapi.com/latest\"\nquerystring = {\"keyword\": keyword}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockyapiexchange.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"6-Daily",
38
+ "url":"https://stockyapiexchange.p.rapidapi.com/daily",
39
+ "description":"This feature provides up-to-date information about a stock's performance during a trading day. It includes the stock's opening and closing prices, as well as its high, low, and trading volume for the day.",
40
+ "method":"GET",
41
+ "required_parameters":[],
42
+ "optional_parameters":[
43
+ {
44
+ "name":"startDate",
45
+ "type":"DATE (YYYY-MM-DD)",
46
+ "description":"",
47
+ "default":"2023-02-01"
48
+ },
49
+ {
50
+ "name":"keyword",
51
+ "type":"STRING",
52
+ "description":"",
53
+ "default":"GOOG"
54
+ }
55
+ ],
56
+ "code":"import requests\n\nurl = \"https://stockyapiexchange.p.rapidapi.com/daily\"\nquerystring = {\"startDate\": startdate, \"keyword\": keyword}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockyapiexchange.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
57
+ "statuscode":111,
58
+ "body":"",
59
+ "headers":"",
60
+ "schema":""
61
+ },
62
+ {
63
+ "name":"5-History",
64
+ "url":"https://stockyapiexchange.p.rapidapi.com/history",
65
+ "description":"This feature provides historical data for a stock, including its open, high, low, close, and trading volume for each day. Users can access data for different time periods, such as daily, weekly, monthly, or yearly.",
66
+ "method":"GET",
67
+ "required_parameters":[],
68
+ "optional_parameters":[
69
+ {
70
+ "name":"startDate",
71
+ "type":"DATE (YYYY-MM-DD)",
72
+ "description":"",
73
+ "default":"2023-02-01"
74
+ },
75
+ {
76
+ "name":"keyword",
77
+ "type":"STRING",
78
+ "description":"",
79
+ "default":"GOOG"
80
+ }
81
+ ],
82
+ "code":"import requests\n\nurl = \"https://stockyapiexchange.p.rapidapi.com/history\"\nquerystring = {\"startDate\": startdate, \"keyword\": keyword}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockyapiexchange.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
83
+ "statuscode":111,
84
+ "body":"",
85
+ "headers":"",
86
+ "schema":""
87
+ },
88
+ {
89
+ "name":"4-Charts",
90
+ "url":"https://stockyapiexchange.p.rapidapi.com/charts",
91
+ "description":"This feature provides interactive charts that allow users to visualize the performance of a stock over time. Users can customize the time period and type of chart (line, bar, candlestick, etc.) to get a better understanding of the stock's price movements.",
92
+ "method":"GET",
93
+ "required_parameters":[],
94
+ "optional_parameters":[
95
+ {
96
+ "name":"keyword",
97
+ "type":"STRING",
98
+ "description":"",
99
+ "default":"GOOG"
100
+ }
101
+ ],
102
+ "code":"import requests\n\nurl = \"https://stockyapiexchange.p.rapidapi.com/charts\"\nquerystring = {\"keyword\": keyword}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockyapiexchange.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
103
+ "statuscode":111,
104
+ "body":"",
105
+ "headers":"",
106
+ "schema":""
107
+ },
108
+ {
109
+ "name":"3-Summary",
110
+ "url":"https://stockyapiexchange.p.rapidapi.com/summary",
111
+ "description":"Summary: This feature gives a quick overview of the performance of a stock, including its current price, percentage change, and trading volume. It also provides a summary of the key financial metrics and news related to the stock",
112
+ "method":"GET",
113
+ "required_parameters":[],
114
+ "optional_parameters":[
115
+ {
116
+ "name":"keyword",
117
+ "type":"STRING",
118
+ "description":"",
119
+ "default":"GOOG"
120
+ }
121
+ ],
122
+ "code":"import requests\n\nurl = \"https://stockyapiexchange.p.rapidapi.com/summary\"\nquerystring = {\"keyword\": keyword}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockyapiexchange.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
123
+ "statuscode":111,
124
+ "body":"",
125
+ "headers":"",
126
+ "schema":""
127
+ },
128
+ {
129
+ "name":"2-Stockdetails",
130
+ "url":"https://stockyapiexchange.p.rapidapi.com/stockdetails",
131
+ "description":"Stockdetails: This feature provides detailed information about a specific stock, including its name, ticker symbol, market capitalization, sector, industry, and other key financial metrics such as price-to-earnings ratio (P/E ratio), dividend yield, and earnings per share (EPS)",
132
+ "method":"GET",
133
+ "required_parameters":[],
134
+ "optional_parameters":[
135
+ {
136
+ "name":"keyword",
137
+ "type":"STRING",
138
+ "description":"",
139
+ "default":"GOOG"
140
+ }
141
+ ],
142
+ "code":"import requests\n\nurl = \"https://stockyapiexchange.p.rapidapi.com/stockdetails\"\nquerystring = {\"keyword\": keyword}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockyapiexchange.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
143
+ "statuscode":111,
144
+ "body":"",
145
+ "headers":"",
146
+ "schema":""
147
+ },
148
+ {
149
+ "name":"1-AUTOComplete:",
150
+ "url":"https://stockyapiexchange.p.rapidapi.com/autocomplete",
151
+ "description":"AUTOComplete: This feature allows users to easily search for stocks by providing suggested completions for a ticker symbol or company name as they type. It helps users find the right stock without having to know the exact spelling or symbol.",
152
+ "method":"GET",
153
+ "required_parameters":[],
154
+ "optional_parameters":[
155
+ {
156
+ "name":"keyword",
157
+ "type":"STRING",
158
+ "description":"",
159
+ "default":"GOOG"
160
+ }
161
+ ],
162
+ "code":"import requests\n\nurl = \"https://stockyapiexchange.p.rapidapi.com/autocomplete\"\nquerystring = {\"keyword\": keyword}\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stockyapiexchange.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers, params=querystring)\n\nprint(response.json())\n",
163
+ "statuscode":111,
164
+ "body":"",
165
+ "headers":"",
166
+ "schema":""
167
+ }
168
+ ]
169
+ }
toolbench/toolenv/tools/Finance/stockyapiexchange/api.py ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_7_latest(keyword: str='GOOG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "This feature provides the most recent information about a stock, including its current price, percentage change, and trading volume. It's updated in real-time as new data becomes available."
12
+
13
+ """
14
+ url = f"https://stockyapiexchange.p.rapidapi.com/latest"
15
+ querystring = {}
16
+ if keyword:
17
+ querystring['keyword'] = keyword
18
+
19
+ headers = {
20
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
21
+ "X-RapidAPI-Host": "stockyapiexchange.p.rapidapi.com"
22
+ }
23
+
24
+
25
+ response = requests.get(url, headers=headers, params=querystring)
26
+ try:
27
+ observation = response.json()
28
+ except:
29
+ observation = response.text
30
+ return observation
31
+
32
+ def get_6_daily(startdate: str='2023-02-01', keyword: str='GOOG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
33
+ """
34
+ "This feature provides up-to-date information about a stock's performance during a trading day. It includes the stock's opening and closing prices, as well as its high, low, and trading volume for the day."
35
+
36
+ """
37
+ url = f"https://stockyapiexchange.p.rapidapi.com/daily"
38
+ querystring = {}
39
+ if startdate:
40
+ querystring['startDate'] = startdate
41
+ if keyword:
42
+ querystring['keyword'] = keyword
43
+
44
+ headers = {
45
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
46
+ "X-RapidAPI-Host": "stockyapiexchange.p.rapidapi.com"
47
+ }
48
+
49
+
50
+ response = requests.get(url, headers=headers, params=querystring)
51
+ try:
52
+ observation = response.json()
53
+ except:
54
+ observation = response.text
55
+ return observation
56
+
57
+ def get_5_history(startdate: str='2023-02-01', keyword: str='GOOG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
58
+ """
59
+ "This feature provides historical data for a stock, including its open, high, low, close, and trading volume for each day. Users can access data for different time periods, such as daily, weekly, monthly, or yearly."
60
+
61
+ """
62
+ url = f"https://stockyapiexchange.p.rapidapi.com/history"
63
+ querystring = {}
64
+ if startdate:
65
+ querystring['startDate'] = startdate
66
+ if keyword:
67
+ querystring['keyword'] = keyword
68
+
69
+ headers = {
70
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
71
+ "X-RapidAPI-Host": "stockyapiexchange.p.rapidapi.com"
72
+ }
73
+
74
+
75
+ response = requests.get(url, headers=headers, params=querystring)
76
+ try:
77
+ observation = response.json()
78
+ except:
79
+ observation = response.text
80
+ return observation
81
+
82
+ def get_4_charts(keyword: str='GOOG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
83
+ """
84
+ "This feature provides interactive charts that allow users to visualize the performance of a stock over time. Users can customize the time period and type of chart (line, bar, candlestick, etc.) to get a better understanding of the stock's price movements."
85
+
86
+ """
87
+ url = f"https://stockyapiexchange.p.rapidapi.com/charts"
88
+ querystring = {}
89
+ if keyword:
90
+ querystring['keyword'] = keyword
91
+
92
+ headers = {
93
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
94
+ "X-RapidAPI-Host": "stockyapiexchange.p.rapidapi.com"
95
+ }
96
+
97
+
98
+ response = requests.get(url, headers=headers, params=querystring)
99
+ try:
100
+ observation = response.json()
101
+ except:
102
+ observation = response.text
103
+ return observation
104
+
105
+ def get_3_summary(keyword: str='GOOG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
106
+ """
107
+ "Summary: This feature gives a quick overview of the performance of a stock, including its current price, percentage change, and trading volume. It also provides a summary of the key financial metrics and news related to the stock"
108
+
109
+ """
110
+ url = f"https://stockyapiexchange.p.rapidapi.com/summary"
111
+ querystring = {}
112
+ if keyword:
113
+ querystring['keyword'] = keyword
114
+
115
+ headers = {
116
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
117
+ "X-RapidAPI-Host": "stockyapiexchange.p.rapidapi.com"
118
+ }
119
+
120
+
121
+ response = requests.get(url, headers=headers, params=querystring)
122
+ try:
123
+ observation = response.json()
124
+ except:
125
+ observation = response.text
126
+ return observation
127
+
128
+ def get_2_stockdetails(keyword: str='GOOG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
129
+ """
130
+ "Stockdetails: This feature provides detailed information about a specific stock, including its name, ticker symbol, market capitalization, sector, industry, and other key financial metrics such as price-to-earnings ratio (P/E ratio), dividend yield, and earnings per share (EPS)"
131
+
132
+ """
133
+ url = f"https://stockyapiexchange.p.rapidapi.com/stockdetails"
134
+ querystring = {}
135
+ if keyword:
136
+ querystring['keyword'] = keyword
137
+
138
+ headers = {
139
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
140
+ "X-RapidAPI-Host": "stockyapiexchange.p.rapidapi.com"
141
+ }
142
+
143
+
144
+ response = requests.get(url, headers=headers, params=querystring)
145
+ try:
146
+ observation = response.json()
147
+ except:
148
+ observation = response.text
149
+ return observation
150
+
151
+ def get_1_autocomplete(keyword: str='GOOG', toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
152
+ """
153
+ "AUTOComplete: This feature allows users to easily search for stocks by providing suggested completions for a ticker symbol or company name as they type. It helps users find the right stock without having to know the exact spelling or symbol."
154
+
155
+ """
156
+ url = f"https://stockyapiexchange.p.rapidapi.com/autocomplete"
157
+ querystring = {}
158
+ if keyword:
159
+ querystring['keyword'] = keyword
160
+
161
+ headers = {
162
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
163
+ "X-RapidAPI-Host": "stockyapiexchange.p.rapidapi.com"
164
+ }
165
+
166
+
167
+ response = requests.get(url, headers=headers, params=querystring)
168
+ try:
169
+ observation = response.json()
170
+ except:
171
+ observation = response.text
172
+ return observation
173
+
toolbench/toolenv/tools/Finance/stoxa.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_2a2183f2-7423-4306-b5d5-1d3a77810840",
3
+ "tool_description": "Find investment opportunities",
4
+ "home_url": "https://rapidapi.com/tdermendjievft/api/stoxa/",
5
+ "name": "stoxa",
6
+ "title": "stoxa",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "stoxa",
9
+ "score": null,
10
+ "host": "stoxa.p.rapidapi.com",
11
+ "api_list": [
12
+ {
13
+ "name": "Search companies",
14
+ "url": "https://stoxa.p.rapidapi.com/search-companies",
15
+ "description": "Search companies with mongo-like queries. Max. 10 results per requests.\nAvailable columns:\n**Symbol**(string);\n**AssetType** (string);\n**Name**(string);\n**Description**(string);\n**Exchange**(string);\n**Currency**(string);\n**Country**(string);\n**Sector**(string);\n**Industry**(string);\n**Address**(string);\n**FullTimeEmployees**(integer);\n**FiscalYearEnd**(string);\n**LatestQuarter**(string);\n**MarketCapitalization**(double);\n**EBITDA**(double);\n**PERatio**(double);\n**PEGRatio**(double);\n**BookValue**(double);\n**DividendPerShare**(double);\n**EPS**(double);\n**RevenuePerShareTTM**(double);\n**ProfitMargin**(double);\n**OperatingMarginTTM**(double);\n**ReturnOnAssetsTTM**(double);\n**ReturnOnEquityTTM**(double);\n**RevenueTTM**(double);\n**GrossProfitTTM**(double);\n**DilutedEPSTTM**(double);\n**QuarterlyEarningsGrowthYOY**(double);\n**QuarterlyRevenueGrowthYOY**(double);\n**AnalystTargetPrice**(double);\n**TrailingPE**(double);\n**ForwardPE**(double);\n**PriceToSalesRatioTTM**(double);\n**PriceToBookRatio**(double);\n**EVToRevenue**(double);\n**EVToEBITDA**(double);\n**Beta**(double);\n**WeekHigh52**(52 Week High)(double);\n**WeekLow52**(52 Week Low)(double);\n**DayMovingAverage50**(50 day moving average)(double);\n**DayMovingAverage200**(200 day moving average)(double);\n**SharesOutstanding**(integer);\n**SharesFloat**(integer);\n**SharesShort**(integer);\n**SharesShortPriorMonth**(integer);\n**ShortRatio**(double);\n**ShortPercentFloat**(double);\n**PercentInsiders**(double);\n**PercentInstitutions**(double);\n**ForwardAnnualDividendRate**(double);\n**ForwardAnnualDividendYield**(double);\n**PayoutRatio**(double);\n**DividendDate**(string);\n**ExDividendDate**(string);\n**LastSplitFactor**(string);\n**LastSplitDate**(string);",
16
+ "method": "POST",
17
+ "required_parameters": [],
18
+ "optional_parameters": [],
19
+ "code": "import requests\n\nurl = \"https://stoxa.p.rapidapi.com/search-companies\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stoxa.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
20
+ "convert_code": "import requests\n\nurl = \"https://stoxa.p.rapidapi.com/search-companies\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"stoxa.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
21
+ "test_endpoint": ""
22
+ }
23
+ ]
24
+ }
toolbench/toolenv/tools/Finance/stoxx.json ADDED
The diff for this file is too large to render. See raw diff
 
toolbench/toolenv/tools/Finance/stoxx/api.py ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_historical_company_article_data(ticker: str, months: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Provides historical data for a given company including news, polarity, sentiment, and more.
12
+
13
+ `{10 items
14
+ "FeedUrl":"https://finance.yahoo.com/news/electronic-arts-shoots-higher-amazon-073805755.html?.tsrc=rss"
15
+ "Polarity":0
16
+ "PublishDate":"2022-08-26T07:38:05+00:00"
17
+ "Subjectivity":1.5
18
+ "Title":"Electronic Arts Shoots Higher on Amazon Bid Report"
19
+ "VaderAggregate":0.5
20
+ "VaderNegative":0.2
21
+ "VaderNeutral":0.5
22
+ "VaderPositive":0.8
23
+ "id":"67988e33-4ded-3b46-b2c6-9f2d96580132"
24
+ }`"
25
+
26
+ """
27
+ url = f"https://stoxx1.p.rapidapi.com/api/v1/stoxx/company/{ticker}/history/articles/{months}"
28
+ querystring = {}
29
+
30
+ headers = {
31
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
32
+ "X-RapidAPI-Host": "stoxx1.p.rapidapi.com"
33
+ }
34
+
35
+
36
+ response = requests.get(url, headers=headers, params=querystring)
37
+ try:
38
+ observation = response.json()
39
+ except:
40
+ observation = response.text
41
+ return observation
42
+
43
+ def get_list_of_publicly_traded_companies(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
44
+ """
45
+ "Provides a list of all publicly traded companies"
46
+
47
+ """
48
+ url = f"https://stoxx1.p.rapidapi.com/api/v1/stoxx/companies"
49
+ querystring = {}
50
+
51
+ headers = {
52
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
53
+ "X-RapidAPI-Host": "stoxx1.p.rapidapi.com"
54
+ }
55
+
56
+
57
+ response = requests.get(url, headers=headers, params=querystring)
58
+ try:
59
+ observation = response.json()
60
+ except:
61
+ observation = response.text
62
+ return observation
63
+
64
+ def get_company_historical_data(ticker: str, months: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
65
+ """
66
+ "Provides access to daily historical company pricing data over a given period of months
67
+
68
+ A sample output for each day:
69
+ `{
70
+ "changePercent":0
71
+ "close":115.1465
72
+ "date":"2022-05-27"
73
+ "high":115.187
74
+ "low":112.628
75
+ "open":113.55
76
+ "symbol":"AMZN"
77
+ "updated":1654726813000
78
+ "volume":93660160
79
+ }`"
80
+
81
+ """
82
+ url = f"https://stoxx1.p.rapidapi.com/api/v1/stoxx/company/{ticker}/history/prices/{months}"
83
+ querystring = {}
84
+
85
+ headers = {
86
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
87
+ "X-RapidAPI-Host": "stoxx1.p.rapidapi.com"
88
+ }
89
+
90
+
91
+ response = requests.get(url, headers=headers, params=querystring)
92
+ try:
93
+ observation = response.json()
94
+ except:
95
+ observation = response.text
96
+ return observation
97
+
98
+ def get_company_quote_price_data(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
99
+ """
100
+ "Retrieve updated quote and pricing data for a given company. This endpoint provides you with:
101
+
102
+ - Symbol
103
+ - Company Name
104
+ - Exchange
105
+ - High
106
+ - Low
107
+ - Close
108
+ - PE
109
+ - Volume
110
+ - Market Cap
111
+ - Datetime"
112
+
113
+ """
114
+ url = f"https://stoxx1.p.rapidapi.com/api/v1/stoxx/company/{ticker}/quote"
115
+ querystring = {}
116
+
117
+ headers = {
118
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
119
+ "X-RapidAPI-Host": "stoxx1.p.rapidapi.com"
120
+ }
121
+
122
+
123
+ response = requests.get(url, headers=headers, params=querystring)
124
+ try:
125
+ observation = response.json()
126
+ except:
127
+ observation = response.text
128
+ return observation
129
+
130
+ def get_company_market_performance(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
131
+ """
132
+ "Retrieve the overall current market performance
133
+
134
+ ```
135
+ {
136
+ "datetimeUpdated":1661544000005
137
+ "performance":-0.01535
138
+ "sector":"Utilities"
139
+ "symbol":"XLU"
140
+ }
141
+ ```"
142
+
143
+ """
144
+ url = f"https://stoxx1.p.rapidapi.com/api/v1/stoxx/market/performance"
145
+ querystring = {}
146
+
147
+ headers = {
148
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
149
+ "X-RapidAPI-Host": "stoxx1.p.rapidapi.com"
150
+ }
151
+
152
+
153
+ response = requests.get(url, headers=headers, params=querystring)
154
+ try:
155
+ observation = response.json()
156
+ except:
157
+ observation = response.text
158
+ return observation
159
+
160
+ def get_company_competition(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
161
+ """
162
+ "Retrieve a company's known competitors"
163
+
164
+ """
165
+ url = f"https://stoxx1.p.rapidapi.com/api/v1/stoxx/company/{ticker}/competition"
166
+ querystring = {}
167
+
168
+ headers = {
169
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
170
+ "X-RapidAPI-Host": "stoxx1.p.rapidapi.com"
171
+ }
172
+
173
+
174
+ response = requests.get(url, headers=headers, params=querystring)
175
+ try:
176
+ observation = response.json()
177
+ except:
178
+ observation = response.text
179
+ return observation
180
+
181
+ def get_company_information(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
182
+ """
183
+ "Provides detailed information for a given company:
184
+ - Symbol
185
+ - Company Name
186
+ - Industry
187
+ - Website
188
+ - Relevant Tags
189
+ - General Sector
190
+ - Country
191
+ - Zip Code"
192
+
193
+ """
194
+ url = f"https://stoxx1.p.rapidapi.com/api/v1/stoxx/company/{ticker}/info"
195
+ querystring = {}
196
+
197
+ headers = {
198
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
199
+ "X-RapidAPI-Host": "stoxx1.p.rapidapi.com"
200
+ }
201
+
202
+
203
+ response = requests.get(url, headers=headers, params=querystring)
204
+ try:
205
+ observation = response.json()
206
+ except:
207
+ observation = response.text
208
+ return observation
209
+
toolbench/toolenv/tools/Finance/student_loan_calculator.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "product_id": "api_a7cb39a2-d712-4b81-8867-7c93b624e2ce",
3
+ "tool_description": "The most comprehensive UK student loan repayment calculator",
4
+ "home_url": "https://rapidapi.com/YourSLRC/api/student-loan-calculator/",
5
+ "name": "Student Loan Calculator",
6
+ "title": "Student Loan Calculator",
7
+ "pricing": "FREEMIUM",
8
+ "tool_name": "Student Loan Calculator",
9
+ "score": {
10
+ "avgServiceLevel": 100,
11
+ "avgLatency": 1344,
12
+ "avgSuccessRate": 100,
13
+ "popularityScore": 8.3,
14
+ "__typename": "Score"
15
+ },
16
+ "host": "student-loan-calculator.p.rapidapi.com",
17
+ "api_list": [
18
+ {
19
+ "name": "GraphQL",
20
+ "url": "https://student-loan-calculator.p.rapidapi.com/graphql",
21
+ "description": "GraphQL endpoint",
22
+ "method": "POST",
23
+ "required_parameters": [],
24
+ "optional_parameters": [],
25
+ "code": "import requests\n\nurl = \"https://student-loan-calculator.p.rapidapi.com/graphql\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"student-loan-calculator.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
26
+ "convert_code": "import requests\n\nurl = \"https://student-loan-calculator.p.rapidapi.com/graphql\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"student-loan-calculator.p.rapidapi.com\"\n }\n\nresponse = requests.post(url, headers=headers)\nprint(response.json())\n",
27
+ "test_endpoint": ""
28
+ }
29
+ ]
30
+ }
toolbench/toolenv/tools/Finance/styvio_stock_market_data_v2/api.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def styvio_api(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Main API endpoint with price data, company information, and balance sheet details"
12
+
13
+ """
14
+ url = f"https://styvio-stock-market-data-v2.p.rapidapi.com/{ticker}/rapidauth"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "styvio-stock-market-data-v2.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
toolbench/toolenv/tools/Finance/sundayfinance.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tool_name":"sundayfinance",
3
+ "tool_description":"- PAYOUT DATE IS FIXED-\n\nFeed it a ticker and return next payout date or yield in response.\n\n/payout example: \nhttps://sundayfinance.p.rapidapi.com/stock/agnc\noutput:\n{\"result\":[\"agnc,14.56%\"]}\n\n/yield example: \nhttps://sundayfinance.p.rapidapi.com/yield/aapl\noutput:\n{\"result\":[\"aapl,16 Feb 2023 (Thu)\"]}\n",
4
+ "title":"sundayfinance",
5
+ "pricing":"FREE",
6
+ "score":{
7
+ "avgServiceLevel":75,
8
+ "avgLatency":2838,
9
+ "avgSuccessRate":75,
10
+ "popularityScore":8.7,
11
+ "__typename":"Score"
12
+ },
13
+ "home_url":"https://rapidapi.com/daniel.hogrebe/api/sundayfinance/",
14
+ "host":"sundayfinance.p.rapidapi.com",
15
+ "api_list":[
16
+ {
17
+ "name":"Get the yield",
18
+ "url":"https://sundayfinance.p.rapidapi.com/yield/{ticker}",
19
+ "description":"Feed in the ticker and get the yield",
20
+ "method":"GET",
21
+ "required_parameters":[
22
+ {
23
+ "name":"ticker",
24
+ "type":"STRING",
25
+ "description":"",
26
+ "default":"agnc"
27
+ }
28
+ ],
29
+ "optional_parameters":[],
30
+ "code":"import requests\n\nurl = \"https://sundayfinance.p.rapidapi.com/yield/{ticker}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"sundayfinance.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
31
+ "statuscode":111,
32
+ "body":"",
33
+ "headers":"",
34
+ "schema":""
35
+ },
36
+ {
37
+ "name":"Get the next dividend payout date",
38
+ "url":"https://sundayfinance.p.rapidapi.com/payout/{ticker}",
39
+ "description":"Feed in the ticke and get the next dividend payout date.",
40
+ "method":"GET",
41
+ "required_parameters":[
42
+ {
43
+ "name":"ticker",
44
+ "type":"STRING",
45
+ "description":"",
46
+ "default":"aapl"
47
+ }
48
+ ],
49
+ "optional_parameters":[],
50
+ "code":"import requests\n\nurl = \"https://sundayfinance.p.rapidapi.com/payout/{ticker}\"\n\nheaders = {\n \"X-RapidAPI-Key\": \"SIGN-UP-FOR-KEY\",\n \"X-RapidAPI-Host\": \"sundayfinance.p.rapidapi.com\"\n}\n\nresponse = requests.get(url, headers=headers)\n\nprint(response.json())\n",
51
+ "statuscode":111,
52
+ "body":"",
53
+ "headers":"",
54
+ "schema":""
55
+ }
56
+ ]
57
+ }
toolbench/toolenv/tools/Finance/sundayfinance/api.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+ from datetime import date, datetime, timedelta
4
+ import os
5
+
6
+ from typing import Optional, Dict, Union, List
7
+
8
+
9
+ def get_the_yield(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
10
+ """
11
+ "Feed in the ticker and get the yield"
12
+
13
+ """
14
+ url = f"https://sundayfinance.p.rapidapi.com/yield/{ticker}"
15
+ querystring = {}
16
+
17
+ headers = {
18
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
19
+ "X-RapidAPI-Host": "sundayfinance.p.rapidapi.com"
20
+ }
21
+
22
+
23
+ response = requests.get(url, headers=headers, params=querystring)
24
+ try:
25
+ observation = response.json()
26
+ except:
27
+ observation = response.text
28
+ return observation
29
+
30
+ def get_the_next_dividend_payout_date(ticker: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
31
+ """
32
+ "Feed in the ticke and get the next dividend payout date."
33
+
34
+ """
35
+ url = f"https://sundayfinance.p.rapidapi.com/payout/{ticker}"
36
+ querystring = {}
37
+
38
+ headers = {
39
+ "X-RapidAPI-Key": toolbench_rapidapi_key,
40
+ "X-RapidAPI-Host": "sundayfinance.p.rapidapi.com"
41
+ }
42
+
43
+
44
+ response = requests.get(url, headers=headers, params=querystring)
45
+ try:
46
+ observation = response.json()
47
+ except:
48
+ observation = response.text
49
+ return observation
50
+
toolbench/toolenv/tools/Finance/supportnresistance.json ADDED
The diff for this file is too large to render. See raw diff