tradingview-mcp 1.0.0__py3-none-any.whl → 1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tradingview_mcp/constants.py +6 -4
- tradingview_mcp/data/__init__.py +9 -0
- tradingview_mcp/data/column_display_names.json +827 -0
- tradingview_mcp/data/extracted/__init__.py +1 -0
- tradingview_mcp/data/extracted/ai_quick_reference.json +212 -0
- tradingview_mcp/data/extracted/common_fields.json +3627 -0
- tradingview_mcp/data/extracted/fields_by_market.json +23299 -0
- tradingview_mcp/data/extracted/screener_code_examples.json +9 -0
- tradingview_mcp/data/markets.json +83 -0
- tradingview_mcp/data/metainfo/bond.json +17406 -0
- tradingview_mcp/data/metainfo/bonds.json +1303 -0
- tradingview_mcp/data/metainfo/cfd.json +21603 -0
- tradingview_mcp/data/metainfo/coin.json +21111 -0
- tradingview_mcp/data/metainfo/crypto.json +23078 -0
- tradingview_mcp/data/metainfo/economics2.json +1026 -0
- tradingview_mcp/data/metainfo/forex.json +21003 -0
- tradingview_mcp/data/metainfo/futures.json +2972 -0
- tradingview_mcp/data/metainfo/ireland.json +22517 -0
- tradingview_mcp/data/metainfo/options.json +499 -0
- tradingview_mcp/data/metainfo/stocks.json +29808 -0
- tradingview_mcp/data/screeners/main_screeners.json +540 -0
- tradingview_mcp/data/screeners/markets.json +70 -0
- tradingview_mcp/data/screeners/stocks.json +416 -0
- tradingview_mcp/data/screeners/stocks_failed.json +36081 -0
- tradingview_mcp/docs_data.py +297 -0
- tradingview_mcp/scanner.py +2 -1
- tradingview_mcp/server.py +839 -51
- tradingview_mcp-1.0.dist-info/METADATA +334 -0
- tradingview_mcp-1.0.dist-info/RECORD +37 -0
- {tradingview_mcp-1.0.0.dist-info → tradingview_mcp-1.0.dist-info}/licenses/LICENSE +0 -2
- tradingview_mcp-1.0.0.dist-info/METADATA +0 -182
- tradingview_mcp-1.0.0.dist-info/RECORD +0 -13
- {tradingview_mcp-1.0.0.dist-info → tradingview_mcp-1.0.dist-info}/WHEEL +0 -0
- {tradingview_mcp-1.0.0.dist-info → tradingview_mcp-1.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tradingview-mcp
|
|
3
|
+
Version: 1.0
|
|
4
|
+
Summary: A comprehensive MCP server for TradingView market screening with integrated screener functionality
|
|
5
|
+
Project-URL: Homepage, https://github.com/k73a/tradingview-mcp
|
|
6
|
+
Project-URL: Documentation, https://github.com/k73a/tradingview-mcp#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/k73a/tradingview-mcp
|
|
8
|
+
Project-URL: Issues, https://github.com/k73a/tradingview-mcp/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/k73a/tradingview-mcp/blob/main/CHANGELOG.md
|
|
10
|
+
Author: TradingView MCP Team
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: crypto,mcp,model-context-protocol,screener,stocks,technical-analysis,trading,tradingview
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: httpx>=0.24.0
|
|
26
|
+
Requires-Dist: mcp>=1.0.0
|
|
27
|
+
Requires-Dist: pandas>=2.0.0
|
|
28
|
+
Requires-Dist: requests>=2.28.0
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pyright>=1.1.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# TradingView MCP Server
|
|
38
|
+
|
|
39
|
+
[](https://badge.fury.io/py/tradingview-mcp)
|
|
40
|
+
[](https://pypi.org/project/tradingview-mcp/)
|
|
41
|
+
[](https://opensource.org/licenses/MIT)
|
|
42
|
+
[](https://github.com/k73a/tradingview-mcp/actions)
|
|
43
|
+
|
|
44
|
+
A comprehensive Model Context Protocol (MCP) server for TradingView market screening with fully integrated screener functionality. This server provides powerful tools for cryptocurrency and stock market analysis directly through the MCP interface.
|
|
45
|
+
|
|
46
|
+
## Quick Start (No Installation Required)
|
|
47
|
+
|
|
48
|
+
Use `uvx` to run directly without installing:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"tradingview": {
|
|
54
|
+
"command": "uvx",
|
|
55
|
+
"args": ["tradingview-mcp"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 🤖 For AI Agents
|
|
62
|
+
|
|
63
|
+
**📖 Read [AI.md](AI.md) for the complete guide!** You can copy the entire AI.md file to understand all capabilities.
|
|
64
|
+
|
|
65
|
+
**Quick Start:**
|
|
66
|
+
1. Call `get_help()` to understand how to use this MCP
|
|
67
|
+
2. Call `ai_get_reference()` for markets, columns, and filter references
|
|
68
|
+
|
|
69
|
+
Key points:
|
|
70
|
+
- All results include `description` field with full names (e.g., "Apple Inc." not just "AAPL")
|
|
71
|
+
- Use `limit` parameter to control result count (default: 25)
|
|
72
|
+
- Use `search_symbols("apple", "america")` to search by company name
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
# Quick examples:
|
|
76
|
+
get_top_gainers("america", 10) # Top 10 US stock gainers
|
|
77
|
+
search_symbols("tesla", "america") # Search for Tesla
|
|
78
|
+
get_symbol_info("NASDAQ:AAPL") # Apple Inc. details
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Features
|
|
82
|
+
|
|
83
|
+
### Core Screener Functionality
|
|
84
|
+
- **Direct TradingView API Integration**: Query the TradingView scanner API without external dependencies
|
|
85
|
+
- **Multi-Market Support**: 76+ markets including crypto, stocks, forex, futures, and bonds
|
|
86
|
+
- **SQL-like Query Interface**: Build complex queries with filtering, sorting, and pagination
|
|
87
|
+
- **250+ Technical Indicators**: Access a comprehensive set of technical analysis columns
|
|
88
|
+
- **AI-Friendly Design**: Includes `description` (full name), token-saving limits, and help tools
|
|
89
|
+
|
|
90
|
+
### MCP Tools
|
|
91
|
+
|
|
92
|
+
#### 🔍 Discovery & Help Tools (AI Start Here!)
|
|
93
|
+
- `get_help(topic)`: **📖 Required reading!** Get usage guide and examples
|
|
94
|
+
- `search_symbols(query, market)`: 🔍 Search by company name (e.g., "Apple", "Tesla")
|
|
95
|
+
- `get_symbol_info(symbol)`: Get detailed symbol information
|
|
96
|
+
- `ai_get_reference()`: AI quick reference guide
|
|
97
|
+
|
|
98
|
+
#### Screening Tools
|
|
99
|
+
- `screen_market`: Execute custom market screening queries
|
|
100
|
+
- `get_top_gainers`: Find top gaining assets (includes full company names)
|
|
101
|
+
- `get_top_losers`: Find top losing assets (includes full company names)
|
|
102
|
+
- `get_most_active`: Most traded by volume
|
|
103
|
+
- `get_premarket_movers`: Pre-market gainers, losers, and most active
|
|
104
|
+
- `get_postmarket_movers`: Post-market activity analysis
|
|
105
|
+
- `get_technical_analysis`: Detailed technical analysis for specific symbols
|
|
106
|
+
- `scan_bollinger_bands`: Bollinger Band squeeze detection
|
|
107
|
+
- `scan_volume_breakout`: Volume breakout detection
|
|
108
|
+
- `scan_rsi_extremes`: RSI overbought/oversold scanner
|
|
109
|
+
- `scan_macd_crossover`: MACD crossover detection
|
|
110
|
+
- `get_all_symbols`: Retrieve all symbols for a market
|
|
111
|
+
- `advanced_query`: Execute advanced queries with AND/OR logic
|
|
112
|
+
|
|
113
|
+
#### AI-Friendly Reference Tools
|
|
114
|
+
- `search_available_fields`: Search for fields/columns by name or description
|
|
115
|
+
- `get_field_info`: Get display name and type for a specific field
|
|
116
|
+
- `get_code_example`: Get Python code examples for screener types
|
|
117
|
+
- `list_fields_for_market`: List available fields with pagination
|
|
118
|
+
- `get_common_fields_summary`: Get commonly used fields by category
|
|
119
|
+
- `get_screener_preset`: Retrieve predefined screener presets
|
|
120
|
+
- `get_market_metainfo`: Field definitions and allowed values per market
|
|
121
|
+
|
|
122
|
+
### MCP Resources
|
|
123
|
+
- `markets://list`: List all available markets
|
|
124
|
+
- `columns://list`: List all available technical indicator columns
|
|
125
|
+
- `exchanges://crypto`: List cryptocurrency exchanges
|
|
126
|
+
- `presets://list`: List predefined screening presets
|
|
127
|
+
- `docs://params`: Screener params format and schema
|
|
128
|
+
- `docs://screeners`: Predefined screener presets overview
|
|
129
|
+
- `docs://fields`: Field display names (paginated)
|
|
130
|
+
- `docs://markets`: Markets metadata
|
|
131
|
+
- `docs://ai-reference`: AI quick reference guide
|
|
132
|
+
- `docs://code-examples`: Python code examples for screeners
|
|
133
|
+
|
|
134
|
+
## Installation
|
|
135
|
+
|
|
136
|
+
### Using uvx (Recommended - No Install)
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"mcpServers": {
|
|
140
|
+
"tradingview": {
|
|
141
|
+
"command": "uvx",
|
|
142
|
+
"args": ["tradingview-mcp"]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Using uv
|
|
149
|
+
```bash
|
|
150
|
+
uv add tradingview-mcp
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Using pip
|
|
154
|
+
```bash
|
|
155
|
+
pip install tradingview-mcp
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### From Source
|
|
159
|
+
```bash
|
|
160
|
+
git clone https://github.com/k73a/tradingview-mcp.git
|
|
161
|
+
cd tradingview-mcp
|
|
162
|
+
uv sync
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Usage
|
|
166
|
+
|
|
167
|
+
### Running the MCP Server
|
|
168
|
+
|
|
169
|
+
#### Stdio Transport (Default)
|
|
170
|
+
```bash
|
|
171
|
+
tradingview-mcp
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
#### HTTP Transport
|
|
175
|
+
```bash
|
|
176
|
+
tradingview-mcp streamable-http --host 127.0.0.1 --port 8000
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### MCP Client Configuration
|
|
180
|
+
|
|
181
|
+
#### Using uvx (Recommended)
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"mcpServers": {
|
|
185
|
+
"tradingview": {
|
|
186
|
+
"command": "uvx",
|
|
187
|
+
"args": ["tradingview-mcp"]
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
#### Using installed package
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"mcpServers": {
|
|
197
|
+
"tradingview": {
|
|
198
|
+
"command": "tradingview-mcp",
|
|
199
|
+
"args": []
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### For AI Agents: Getting Started
|
|
206
|
+
|
|
207
|
+
1. **First, call `ai_get_reference()`** to understand available markets, columns, and filters
|
|
208
|
+
2. Use `search_available_fields("your query")` to find specific columns
|
|
209
|
+
3. Use `get_code_example("Stocks (legacy)")` to see query patterns
|
|
210
|
+
4. Build queries using `screen_market()` or `advanced_query()`
|
|
211
|
+
|
|
212
|
+
### Example Queries
|
|
213
|
+
|
|
214
|
+
#### Basic Market Screening
|
|
215
|
+
```python
|
|
216
|
+
# Get top 50 stocks by trading volume
|
|
217
|
+
await client.call_tool("screen_market", {
|
|
218
|
+
"market": "america",
|
|
219
|
+
"columns": ["name", "close", "volume", "change"],
|
|
220
|
+
"sort_by": "volume",
|
|
221
|
+
"ascending": False,
|
|
222
|
+
"limit": 50
|
|
223
|
+
})
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
#### Technical Analysis Screening
|
|
227
|
+
```python
|
|
228
|
+
# Find stocks with RSI below 30 (oversold)
|
|
229
|
+
await client.call_tool("scan_rsi_extremes", {
|
|
230
|
+
"market": "america",
|
|
231
|
+
"condition": "oversold",
|
|
232
|
+
"threshold": 30,
|
|
233
|
+
"limit": 20
|
|
234
|
+
})
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### Cryptocurrency Screening
|
|
238
|
+
```python
|
|
239
|
+
# Get top crypto gainers
|
|
240
|
+
await client.call_tool("get_top_gainers", {
|
|
241
|
+
"market": "crypto",
|
|
242
|
+
"limit": 25
|
|
243
|
+
})
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## API Reference
|
|
247
|
+
|
|
248
|
+
### Markets
|
|
249
|
+
The following markets are supported:
|
|
250
|
+
- **Crypto**: `crypto`, `coin`
|
|
251
|
+
- **Traditional Finance**: `america`, `uk`, `germany`, `japan`, etc. (67 countries)
|
|
252
|
+
- **Other**: `forex`, `futures`, `bonds`, `cfd`, `options`
|
|
253
|
+
|
|
254
|
+
### Technical Indicators
|
|
255
|
+
Common indicators include:
|
|
256
|
+
- Price: `open`, `high`, `low`, `close`, `volume`
|
|
257
|
+
- Moving Averages: `SMA5`, `SMA10`, `SMA20`, `SMA50`, `SMA100`, `SMA200`, `EMA5`, `EMA10`, `EMA20`, `EMA50`, `EMA100`, `EMA200`
|
|
258
|
+
- Oscillators: `RSI`, `RSI7`, `MACD.macd`, `MACD.signal`, `Stoch.K`, `Stoch.D`
|
|
259
|
+
- Bollinger Bands: `BB.upper`, `BB.lower`
|
|
260
|
+
- Others: `VWAP`, `ATR`, `ADX`, `CCI20`, etc.
|
|
261
|
+
|
|
262
|
+
See `columns://list` resource for the complete list.
|
|
263
|
+
|
|
264
|
+
## Development
|
|
265
|
+
|
|
266
|
+
### Setup Development Environment
|
|
267
|
+
```bash
|
|
268
|
+
git clone https://github.com/k73a/tradingview-mcp.git
|
|
269
|
+
cd tradingview-mcp
|
|
270
|
+
uv sync --all-extras
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Running Tests
|
|
274
|
+
```bash
|
|
275
|
+
uv run pytest tests/ -v
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Code Formatting
|
|
279
|
+
```bash
|
|
280
|
+
uv run ruff format .
|
|
281
|
+
uv run ruff check . --fix
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Type Checking
|
|
285
|
+
```bash
|
|
286
|
+
uv run pyright
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Debug Mode
|
|
290
|
+
|
|
291
|
+
Enable structured debug responses from tools by setting:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
export TRADINGVIEW_MCP_DEBUG=1
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Docs Data Path (Optional)
|
|
298
|
+
|
|
299
|
+
If you want the full TradingView Screener docs datasets (e.g., large metainfo files),
|
|
300
|
+
point the loader to your docs data directory:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
export TRADINGVIEW_SCREENER_DOCS_DATA=/path/to/TradingView-Screener-docs/data
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
## Publishing & Releases
|
|
307
|
+
|
|
308
|
+
This project uses GitHub Actions for automated publishing to PyPI:
|
|
309
|
+
|
|
310
|
+
### Automatic Updates
|
|
311
|
+
- **Weekly auto-update**: Every Monday, the workflow checks for dependency updates, runs tests, and publishes a new version if there are changes
|
|
312
|
+
- **Manual trigger**: You can manually trigger updates from the GitHub Actions tab
|
|
313
|
+
|
|
314
|
+
### Manual Release
|
|
315
|
+
To create a manual release:
|
|
316
|
+
|
|
317
|
+
1. Update version in `pyproject.toml`
|
|
318
|
+
2. Commit and create a tag:
|
|
319
|
+
```bash
|
|
320
|
+
git commit -am "Bump version to x.y.z"
|
|
321
|
+
git tag vx.y.z
|
|
322
|
+
git push origin main --tags
|
|
323
|
+
```
|
|
324
|
+
3. GitHub Actions will automatically build and publish to PyPI
|
|
325
|
+
|
|
326
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed release instructions.
|
|
327
|
+
|
|
328
|
+
## Contributing
|
|
329
|
+
|
|
330
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
331
|
+
|
|
332
|
+
## License
|
|
333
|
+
|
|
334
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
tradingview_mcp/__init__.py,sha256=V7RLq22Qp1rsMhDYNlXfWkiNaXlo7s4KkNUmSvbGKIM,455
|
|
2
|
+
tradingview_mcp/column.py,sha256=MC7lWksmyaYF4SkVm97Apr8httwip-N-4aVTSyS0CQo,8871
|
|
3
|
+
tradingview_mcp/constants.py,sha256=kQUhcG0U1cVLiN6LGgzWPjCGhXh_-jvB5lF15QIX1_4,12927
|
|
4
|
+
tradingview_mcp/docs_data.py,sha256=3ArdbV8RE3SpNhvkkTHA0RXgrUbQoJqkZh05VVqlLLA,9001
|
|
5
|
+
tradingview_mcp/models.py,sha256=CHSQ46A2ljhvzI6YP8XRItUdoDJw1yYebiBANt9xeD0,3366
|
|
6
|
+
tradingview_mcp/query.py,sha256=gkC4t-2_jtuUK3KgzU62wrIcGoaOmY--1EwAshGQb0Q,10871
|
|
7
|
+
tradingview_mcp/scanner.py,sha256=oEfMzaYhQ7ggBdLlPLqKZCMxHkd6MBMaUMcm3p-YvPA,7649
|
|
8
|
+
tradingview_mcp/server.py,sha256=3VosVvI3SQbqDxaahmgYj_aBUyn-0qGxfJf3n2p6OCk,67679
|
|
9
|
+
tradingview_mcp/utils.py,sha256=6O89qIaZ_eYoN3m12r2q4-D8VpJajP5WuwKQbj4ZVHo,10238
|
|
10
|
+
tradingview_mcp/data/__init__.py,sha256=3kot_ZG4a6jbZgyksE9z56n3skI407lsd4y2ThHotKY,298
|
|
11
|
+
tradingview_mcp/data/column_display_names.json,sha256=AFdo6Q2n-wSXWHi2wEExOd2pTItyjocRbrnxqYpCa94,30137
|
|
12
|
+
tradingview_mcp/data/markets.json,sha256=CehqCeVdQhWeCkMX1HWOrgCRjOomWa3VH1v2ZvPnIck,1482
|
|
13
|
+
tradingview_mcp/data/extracted/__init__.py,sha256=zSVRJTO5MxBq_zfkbzUBwuz8NG3rWlYfLvpZkVDI6Ro,64
|
|
14
|
+
tradingview_mcp/data/extracted/ai_quick_reference.json,sha256=h9DY1t3f5UCiv9N65Fs9kL8Y6w5qAP-BTxUgktj4KyI,3381
|
|
15
|
+
tradingview_mcp/data/extracted/common_fields.json,sha256=qqaGYPH54eFJoA2NFJlQX3Ixk4qPNxAy_6--tKp3fPE,77914
|
|
16
|
+
tradingview_mcp/data/extracted/fields_by_market.json,sha256=i2esozdi8HuOcbD4FF5J-X6AfHeJTLwVtSa9JNHSLjM,448166
|
|
17
|
+
tradingview_mcp/data/extracted/screener_code_examples.json,sha256=VCxgbMnsfV1mzDI6AvvfSzoIbieNtXHwltwMNs5KBwY,5157
|
|
18
|
+
tradingview_mcp/data/metainfo/bond.json,sha256=aJzqdPFciAH4pM5nsezHUEolcDtdHCktSQsxhTqJ898,557027
|
|
19
|
+
tradingview_mcp/data/metainfo/bonds.json,sha256=QoqDg7SwD1mv6aw7haG4cmNnq-agyGzK1ECvdK1fsDs,22377
|
|
20
|
+
tradingview_mcp/data/metainfo/cfd.json,sha256=eWB-wqKNijyvwACcp6sHJZ4VCbP8NZpg_Ui9kums2lQ,390943
|
|
21
|
+
tradingview_mcp/data/metainfo/coin.json,sha256=KNgicZ5WOlanlu4DXQo6d54vXy2eM_3R90jm-EzFjAI,378346
|
|
22
|
+
tradingview_mcp/data/metainfo/crypto.json,sha256=M61913GbM_xgLnLh8HhrXWF1AS-jTolDHBlyu8nBeIQ,420075
|
|
23
|
+
tradingview_mcp/data/metainfo/economics2.json,sha256=PA3N5kI5X85s_Dnm1GifJZa27gxSpBCoK16DYILKq7A,18118
|
|
24
|
+
tradingview_mcp/data/metainfo/forex.json,sha256=yFxUgTwjHeFKQbQEvRuHFm-TzC7qcT-Aex8RPNeyqts,374954
|
|
25
|
+
tradingview_mcp/data/metainfo/futures.json,sha256=IGhNwVolCS_5CuS2YVCs1oNpKga_vtQPH5w1_d4f0OY,55078
|
|
26
|
+
tradingview_mcp/data/metainfo/ireland.json,sha256=QUeJM1ZriWJx0ocHVIcx0e0dZLstbZCRXiiqz2-VPjk,403834
|
|
27
|
+
tradingview_mcp/data/metainfo/options.json,sha256=iiQnW16a2F3acertw9f5rA4UR926ea1qVM7b36CHVW8,8504
|
|
28
|
+
tradingview_mcp/data/metainfo/stocks.json,sha256=PBBg_OcporTM1SWIIxnkWgVGbtYQYd_fpJEzduI0NCA,603994
|
|
29
|
+
tradingview_mcp/data/screeners/main_screeners.json,sha256=kU_xGJ7ePoGN3s8g9PwGrc8MuRgqnyL6R40no_thgT4,22835
|
|
30
|
+
tradingview_mcp/data/screeners/markets.json,sha256=vpdrAKg4E_lgg4FxeX2GHNbnSsKQDmgfnyr2ziSdQsk,1004
|
|
31
|
+
tradingview_mcp/data/screeners/stocks.json,sha256=gCnntHTJKJ7n7IqY72fZ4EuBfthtnWUpfHvPqNOvnXo,8843
|
|
32
|
+
tradingview_mcp/data/screeners/stocks_failed.json,sha256=RqBp9XCZ3xvdWZMwuVGysEE2Er_XOQvBZoUHo9uyj6k,1084574
|
|
33
|
+
tradingview_mcp-1.0.dist-info/METADATA,sha256=r83-bka3q8pKnQyN8Fgx9smL2yO5EcTI7j8DdutyZ1Q,10301
|
|
34
|
+
tradingview_mcp-1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
35
|
+
tradingview_mcp-1.0.dist-info/entry_points.txt,sha256=GZxjGqgVbUlWDp5OzFQoCN_g1UBLyOmfVqCR5uzscnU,57
|
|
36
|
+
tradingview_mcp-1.0.dist-info/licenses/LICENSE,sha256=1Hdpp7qGWCXVw1BP6vpdAPO4KrgO0T_c0N3ipkYHKAo,1070
|
|
37
|
+
tradingview_mcp-1.0.dist-info/RECORD,,
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: tradingview-mcp
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: A comprehensive MCP server for TradingView market screening with integrated screener functionality
|
|
5
|
-
Author: TradingView MCP Team
|
|
6
|
-
License: MIT
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Keywords: crypto,mcp,screener,stocks,technical-analysis,trading,tradingview
|
|
9
|
-
Classifier: Development Status :: 4 - Beta
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
18
|
-
Requires-Python: >=3.10
|
|
19
|
-
Requires-Dist: httpx>=0.24.0
|
|
20
|
-
Requires-Dist: mcp>=1.0.0
|
|
21
|
-
Requires-Dist: pandas>=2.0.0
|
|
22
|
-
Requires-Dist: requests>=2.28.0
|
|
23
|
-
Provides-Extra: dev
|
|
24
|
-
Requires-Dist: pyright>=1.1.0; extra == 'dev'
|
|
25
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
26
|
-
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
27
|
-
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
28
|
-
Description-Content-Type: text/markdown
|
|
29
|
-
|
|
30
|
-
# TradingView MCP Server
|
|
31
|
-
|
|
32
|
-
A comprehensive Model Context Protocol (MCP) server for TradingView market screening with fully integrated screener functionality. This server provides powerful tools for cryptocurrency and stock market analysis directly through the MCP interface.
|
|
33
|
-
|
|
34
|
-
## Features
|
|
35
|
-
|
|
36
|
-
### Core Screener Functionality
|
|
37
|
-
- **Direct TradingView API Integration**: Query the TradingView scanner API without external dependencies
|
|
38
|
-
- **Multi-Market Support**: 76+ markets including crypto, stocks, forex, futures, and bonds
|
|
39
|
-
- **SQL-like Query Interface**: Build complex queries with filtering, sorting, and pagination
|
|
40
|
-
- **250+ Technical Indicators**: Access a comprehensive set of technical analysis columns
|
|
41
|
-
|
|
42
|
-
### MCP Tools
|
|
43
|
-
- `screen_market`: Execute custom market screening queries
|
|
44
|
-
- `get_top_gainers`: Find top gaining assets in any market
|
|
45
|
-
- `get_top_losers`: Find top losing assets in any market
|
|
46
|
-
- `get_premarket_movers`: Pre-market gainers, losers, and most active
|
|
47
|
-
- `get_postmarket_movers`: Post-market activity analysis
|
|
48
|
-
- `get_technical_analysis`: Detailed technical analysis for specific symbols
|
|
49
|
-
- `scan_bollinger_bands`: Bollinger Band squeeze detection
|
|
50
|
-
- `scan_volume_breakout`: Volume breakout detection
|
|
51
|
-
- `scan_rsi_extremes`: RSI overbought/oversold scanner
|
|
52
|
-
- `scan_macd_crossover`: MACD crossover detection
|
|
53
|
-
- `get_all_symbols`: Retrieve all symbols for a market
|
|
54
|
-
- `advanced_query`: Execute advanced queries with AND/OR logic
|
|
55
|
-
|
|
56
|
-
### MCP Resources
|
|
57
|
-
- `markets://list`: List all available markets
|
|
58
|
-
- `columns://list`: List all available technical indicator columns
|
|
59
|
-
- `exchanges://crypto`: List cryptocurrency exchanges
|
|
60
|
-
- `presets://list`: List predefined screening presets
|
|
61
|
-
|
|
62
|
-
## Installation
|
|
63
|
-
|
|
64
|
-
### Using uv (Recommended)
|
|
65
|
-
```bash
|
|
66
|
-
uv add tradingview-mcp
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Using pip
|
|
70
|
-
```bash
|
|
71
|
-
pip install tradingview-mcp
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### From Source
|
|
75
|
-
```bash
|
|
76
|
-
git clone https://github.com/your-repo/tradingview-mcp.git
|
|
77
|
-
cd tradingview-mcp
|
|
78
|
-
uv sync
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Usage
|
|
82
|
-
|
|
83
|
-
### Running the MCP Server
|
|
84
|
-
|
|
85
|
-
#### Stdio Transport (Default)
|
|
86
|
-
```bash
|
|
87
|
-
tradingview-mcp
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
#### HTTP Transport
|
|
91
|
-
```bash
|
|
92
|
-
tradingview-mcp streamable-http --host 127.0.0.1 --port 8000
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### MCP Client Configuration
|
|
96
|
-
|
|
97
|
-
Add to your MCP client configuration:
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
"mcpServers": {
|
|
102
|
-
"tradingview": {
|
|
103
|
-
"command": "tradingview-mcp",
|
|
104
|
-
"args": []
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Example Queries
|
|
111
|
-
|
|
112
|
-
#### Basic Market Screening
|
|
113
|
-
```python
|
|
114
|
-
# Get top 50 stocks by trading volume
|
|
115
|
-
await client.call_tool("screen_market", {
|
|
116
|
-
"market": "america",
|
|
117
|
-
"columns": ["name", "close", "volume", "change"],
|
|
118
|
-
"sort_by": "volume",
|
|
119
|
-
"ascending": False,
|
|
120
|
-
"limit": 50
|
|
121
|
-
})
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
#### Technical Analysis Screening
|
|
125
|
-
```python
|
|
126
|
-
# Find stocks with RSI below 30 (oversold)
|
|
127
|
-
await client.call_tool("scan_rsi_extremes", {
|
|
128
|
-
"market": "america",
|
|
129
|
-
"condition": "oversold",
|
|
130
|
-
"threshold": 30,
|
|
131
|
-
"limit": 20
|
|
132
|
-
})
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
#### Cryptocurrency Screening
|
|
136
|
-
```python
|
|
137
|
-
# Get top crypto gainers
|
|
138
|
-
await client.call_tool("get_top_gainers", {
|
|
139
|
-
"market": "crypto",
|
|
140
|
-
"limit": 25
|
|
141
|
-
})
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## API Reference
|
|
145
|
-
|
|
146
|
-
### Markets
|
|
147
|
-
The following markets are supported:
|
|
148
|
-
- **Crypto**: `crypto`, `coin`
|
|
149
|
-
- **Traditional Finance**: `america`, `uk`, `germany`, `japan`, etc. (67 countries)
|
|
150
|
-
- **Other**: `forex`, `futures`, `bonds`, `cfd`, `options`
|
|
151
|
-
|
|
152
|
-
### Technical Indicators
|
|
153
|
-
Common indicators include:
|
|
154
|
-
- Price: `open`, `high`, `low`, `close`, `volume`
|
|
155
|
-
- Moving Averages: `SMA5`, `SMA10`, `SMA20`, `SMA50`, `SMA100`, `SMA200`, `EMA5`, `EMA10`, `EMA20`, `EMA50`, `EMA100`, `EMA200`
|
|
156
|
-
- Oscillators: `RSI`, `RSI7`, `MACD.macd`, `MACD.signal`, `Stoch.K`, `Stoch.D`
|
|
157
|
-
- Bollinger Bands: `BB.upper`, `BB.lower`
|
|
158
|
-
- Others: `VWAP`, `ATR`, `ADX`, `CCI20`, etc.
|
|
159
|
-
|
|
160
|
-
See `columns://list` resource for the complete list.
|
|
161
|
-
|
|
162
|
-
## Development
|
|
163
|
-
|
|
164
|
-
### Running Tests
|
|
165
|
-
```bash
|
|
166
|
-
uv run pytest tests/
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Code Formatting
|
|
170
|
-
```bash
|
|
171
|
-
uv run ruff format .
|
|
172
|
-
uv run ruff check . --fix
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Type Checking
|
|
176
|
-
```bash
|
|
177
|
-
uv run pyright
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
## License
|
|
181
|
-
|
|
182
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
tradingview_mcp/__init__.py,sha256=V7RLq22Qp1rsMhDYNlXfWkiNaXlo7s4KkNUmSvbGKIM,455
|
|
2
|
-
tradingview_mcp/column.py,sha256=MC7lWksmyaYF4SkVm97Apr8httwip-N-4aVTSyS0CQo,8871
|
|
3
|
-
tradingview_mcp/constants.py,sha256=yGzC9Zie825JqqHKGWukTz4HicGKn0pDiUn8op_Me2Y,12749
|
|
4
|
-
tradingview_mcp/models.py,sha256=CHSQ46A2ljhvzI6YP8XRItUdoDJw1yYebiBANt9xeD0,3366
|
|
5
|
-
tradingview_mcp/query.py,sha256=gkC4t-2_jtuUK3KgzU62wrIcGoaOmY--1EwAshGQb0Q,10871
|
|
6
|
-
tradingview_mcp/scanner.py,sha256=CA8GP-N8uCYacpuUzll9IfalKK0hEUSU9ViVEAO8mwU,7535
|
|
7
|
-
tradingview_mcp/server.py,sha256=xOZ0Vm_RicRVMCyq6y0DKUPpE5gUtAVrERdItmHLdUs,40516
|
|
8
|
-
tradingview_mcp/utils.py,sha256=6O89qIaZ_eYoN3m12r2q4-D8VpJajP5WuwKQbj4ZVHo,10238
|
|
9
|
-
tradingview_mcp-1.0.0.dist-info/METADATA,sha256=vfzUAYJaI5uIz1tPVq1zmjiaU1zK1nAZlhoRLDldk_o,5097
|
|
10
|
-
tradingview_mcp-1.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
11
|
-
tradingview_mcp-1.0.0.dist-info/entry_points.txt,sha256=GZxjGqgVbUlWDp5OzFQoCN_g1UBLyOmfVqCR5uzscnU,57
|
|
12
|
-
tradingview_mcp-1.0.0.dist-info/licenses/LICENSE,sha256=ma04jhucIafnA2IaYn--PlxmCUpqhESjKAu4d0c_Ib4,1141
|
|
13
|
-
tradingview_mcp-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|