tradinglookup 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tradinglookup-0.1.0/LICENSE +25 -0
- tradinglookup-0.1.0/PKG-INFO +118 -0
- tradinglookup-0.1.0/README.md +86 -0
- tradinglookup-0.1.0/pyproject.toml +49 -0
- tradinglookup-0.1.0/setup.cfg +4 -0
- tradinglookup-0.1.0/src/tradinglookup/__init__.py +58 -0
- tradinglookup-0.1.0/src/tradinglookup/client.py +856 -0
- tradinglookup-0.1.0/src/tradinglookup.egg-info/PKG-INFO +118 -0
- tradinglookup-0.1.0/src/tradinglookup.egg-info/SOURCES.txt +11 -0
- tradinglookup-0.1.0/src/tradinglookup.egg-info/dependency_links.txt +1 -0
- tradinglookup-0.1.0/src/tradinglookup.egg-info/requires.txt +10 -0
- tradinglookup-0.1.0/src/tradinglookup.egg-info/top_level.txt +1 -0
- tradinglookup-0.1.0/tests/test_client.py +501 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TradingLookup
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
The TradingLookup datasets accessed by this SDK (https://tradinglookup.com/data/)
|
|
24
|
+
are published separately under the Creative Commons Attribution 4.0 International
|
|
25
|
+
Licence (CC BY 4.0): https://creativecommons.org/licenses/by/4.0/
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tradinglookup
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Zero-API-key Python SDK for TradingLookup CC BY 4.0 open financial datasets, REST API endpoints and MCP tools.
|
|
5
|
+
Author: TradingLookup
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://tradinglookup.com
|
|
8
|
+
Project-URL: Documentation, https://tradinglookup.readthedocs.io/
|
|
9
|
+
Project-URL: Source, https://github.com/tradinglookup/tradinglookup
|
|
10
|
+
Project-URL: OpenAPI, https://tradinglookup.com/openapi.json
|
|
11
|
+
Project-URL: Data, https://tradinglookup.com/data/
|
|
12
|
+
Keywords: tradinglookup,prop-firms,cfd-loss-rates,economic-calendar,market-hours,crypto-exchanges,india-brokers,open-data,mcp
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Provides-Extra: pandas
|
|
25
|
+
Requires-Dist: pandas>=2.0; extra == "pandas"
|
|
26
|
+
Provides-Extra: docs
|
|
27
|
+
Requires-Dist: mkdocs>=1.6; extra == "docs"
|
|
28
|
+
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# tradinglookup
|
|
34
|
+
|
|
35
|
+
Zero-API-key Python SDK for TradingLookup open financial data, REST endpoints and read-only MCP tools.
|
|
36
|
+
|
|
37
|
+
- **No API key, no account, no required third-party dependencies** (Python 3.9+ standard library only).
|
|
38
|
+
- **Optional pandas support** via `pip install "tradinglookup[pandas]"`.
|
|
39
|
+
- **Open data hub:** <https://tradinglookup.com/data/>
|
|
40
|
+
- **AI & machine access guide:** <https://tradinglookup.com/for-ai-agents/>
|
|
41
|
+
- **Documentation:** <https://tradinglookup.readthedocs.io/>
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install tradinglookup
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
With optional pandas `DataFrame` support:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install "tradinglookup[pandas]"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Quickstart
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import tradinglookup as tl
|
|
59
|
+
|
|
60
|
+
# Discover all CC BY 4.0 datasets
|
|
61
|
+
catalog = tl.get_catalog()
|
|
62
|
+
|
|
63
|
+
# Compare two futures prop firms at $100,000
|
|
64
|
+
comparison = tl.compare_prop_firms("ftmo", "fundednext", account_size=100000)
|
|
65
|
+
|
|
66
|
+
# Look up one prop firm's terms
|
|
67
|
+
firm = tl.lookup_prop_firm("topstep", market="futures")
|
|
68
|
+
|
|
69
|
+
# Fetch retail CFD account loss rates (includes mandatory FCA COBS 22.5 warning)
|
|
70
|
+
cfd = tl.get_cfd_loss_rates()
|
|
71
|
+
print(cfd["risk_warning"])
|
|
72
|
+
|
|
73
|
+
# Check live market hours or scheduled central bank / macro releases
|
|
74
|
+
hours = tl.get_market_hours(exchange="nyse")
|
|
75
|
+
releases = tl.get_economic_releases(currency="USD", impact="high", limit=10)
|
|
76
|
+
|
|
77
|
+
# Call TradingLookup's read-only MCP endpoint directly
|
|
78
|
+
result = tl.mcp_call("is_market_open", {"exchange": "lse"})
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Using a reusable client instance:
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from tradinglookup import TradingLookupClient
|
|
85
|
+
|
|
86
|
+
client = TradingLookupClient(timeout=15.0)
|
|
87
|
+
plans = client.get_prop_plans(market="futures")
|
|
88
|
+
changes = client.get_rule_changes("topstep")
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Pandas DataFrames
|
|
92
|
+
|
|
93
|
+
Tabular helpers accept `as_dataframe=True`, returning a `pandas.DataFrame` with `canonical_url`, `last_checked`, `license` (and `risk_warning` for CFD datasets) preserved in `df.attrs`:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
import tradinglookup as tl
|
|
97
|
+
|
|
98
|
+
df = tl.get_cfd_loss_rates(as_dataframe=True)
|
|
99
|
+
print(df[["broker", "loss_pct", "regulator"]].head())
|
|
100
|
+
print(df.attrs["risk_warning"])
|
|
101
|
+
print(df.attrs["canonical_url"])
|
|
102
|
+
|
|
103
|
+
# Or load any published CSV directly from /data/
|
|
104
|
+
csv_df = tl.read_csv("/data/cfd-loss-rates-live.csv", as_dataframe=True)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## CFD risk warning (FCA COBS 22.5)
|
|
108
|
+
|
|
109
|
+
Whenever you display or redistribute retail CFD loss-rate figures from TradingLookup, include the FCA COBS 22.5 risk warning verbatim:
|
|
110
|
+
|
|
111
|
+
> CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage.
|
|
112
|
+
|
|
113
|
+
## Licence and attribution (CC BY 4.0)
|
|
114
|
+
|
|
115
|
+
- **SDK code:** MIT Licence (see [LICENSE](LICENSE)).
|
|
116
|
+
- **Data:** Creative Commons Attribution 4.0 International ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)). When you publish, display or redistribute figures from TradingLookup, credit **TradingLookup** and link to the canonical dataset or facts page (for example <https://tradinglookup.com/data/>).
|
|
117
|
+
|
|
118
|
+
Every figure is read from each firm's or official body's own published pages on the date shown. This is reference data, not financial or trading advice.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# tradinglookup
|
|
2
|
+
|
|
3
|
+
Zero-API-key Python SDK for TradingLookup open financial data, REST endpoints and read-only MCP tools.
|
|
4
|
+
|
|
5
|
+
- **No API key, no account, no required third-party dependencies** (Python 3.9+ standard library only).
|
|
6
|
+
- **Optional pandas support** via `pip install "tradinglookup[pandas]"`.
|
|
7
|
+
- **Open data hub:** <https://tradinglookup.com/data/>
|
|
8
|
+
- **AI & machine access guide:** <https://tradinglookup.com/for-ai-agents/>
|
|
9
|
+
- **Documentation:** <https://tradinglookup.readthedocs.io/>
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install tradinglookup
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
With optional pandas `DataFrame` support:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install "tradinglookup[pandas]"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quickstart
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import tradinglookup as tl
|
|
27
|
+
|
|
28
|
+
# Discover all CC BY 4.0 datasets
|
|
29
|
+
catalog = tl.get_catalog()
|
|
30
|
+
|
|
31
|
+
# Compare two futures prop firms at $100,000
|
|
32
|
+
comparison = tl.compare_prop_firms("ftmo", "fundednext", account_size=100000)
|
|
33
|
+
|
|
34
|
+
# Look up one prop firm's terms
|
|
35
|
+
firm = tl.lookup_prop_firm("topstep", market="futures")
|
|
36
|
+
|
|
37
|
+
# Fetch retail CFD account loss rates (includes mandatory FCA COBS 22.5 warning)
|
|
38
|
+
cfd = tl.get_cfd_loss_rates()
|
|
39
|
+
print(cfd["risk_warning"])
|
|
40
|
+
|
|
41
|
+
# Check live market hours or scheduled central bank / macro releases
|
|
42
|
+
hours = tl.get_market_hours(exchange="nyse")
|
|
43
|
+
releases = tl.get_economic_releases(currency="USD", impact="high", limit=10)
|
|
44
|
+
|
|
45
|
+
# Call TradingLookup's read-only MCP endpoint directly
|
|
46
|
+
result = tl.mcp_call("is_market_open", {"exchange": "lse"})
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Using a reusable client instance:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from tradinglookup import TradingLookupClient
|
|
53
|
+
|
|
54
|
+
client = TradingLookupClient(timeout=15.0)
|
|
55
|
+
plans = client.get_prop_plans(market="futures")
|
|
56
|
+
changes = client.get_rule_changes("topstep")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Pandas DataFrames
|
|
60
|
+
|
|
61
|
+
Tabular helpers accept `as_dataframe=True`, returning a `pandas.DataFrame` with `canonical_url`, `last_checked`, `license` (and `risk_warning` for CFD datasets) preserved in `df.attrs`:
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
import tradinglookup as tl
|
|
65
|
+
|
|
66
|
+
df = tl.get_cfd_loss_rates(as_dataframe=True)
|
|
67
|
+
print(df[["broker", "loss_pct", "regulator"]].head())
|
|
68
|
+
print(df.attrs["risk_warning"])
|
|
69
|
+
print(df.attrs["canonical_url"])
|
|
70
|
+
|
|
71
|
+
# Or load any published CSV directly from /data/
|
|
72
|
+
csv_df = tl.read_csv("/data/cfd-loss-rates-live.csv", as_dataframe=True)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## CFD risk warning (FCA COBS 22.5)
|
|
76
|
+
|
|
77
|
+
Whenever you display or redistribute retail CFD loss-rate figures from TradingLookup, include the FCA COBS 22.5 risk warning verbatim:
|
|
78
|
+
|
|
79
|
+
> CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage.
|
|
80
|
+
|
|
81
|
+
## Licence and attribution (CC BY 4.0)
|
|
82
|
+
|
|
83
|
+
- **SDK code:** MIT Licence (see [LICENSE](LICENSE)).
|
|
84
|
+
- **Data:** Creative Commons Attribution 4.0 International ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)). When you publish, display or redistribute figures from TradingLookup, credit **TradingLookup** and link to the canonical dataset or facts page (for example <https://tradinglookup.com/data/>).
|
|
85
|
+
|
|
86
|
+
Every figure is read from each firm's or official body's own published pages on the date shown. This is reference data, not financial or trading advice.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tradinglookup"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Zero-API-key Python SDK for TradingLookup CC BY 4.0 open financial datasets, REST API endpoints and MCP tools."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "TradingLookup" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"tradinglookup",
|
|
15
|
+
"prop-firms",
|
|
16
|
+
"cfd-loss-rates",
|
|
17
|
+
"economic-calendar",
|
|
18
|
+
"market-hours",
|
|
19
|
+
"crypto-exchanges",
|
|
20
|
+
"india-brokers",
|
|
21
|
+
"open-data",
|
|
22
|
+
"mcp",
|
|
23
|
+
]
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3.9",
|
|
27
|
+
"Programming Language :: Python :: 3.10",
|
|
28
|
+
"Programming Language :: Python :: 3.11",
|
|
29
|
+
"Programming Language :: Python :: 3.12",
|
|
30
|
+
"License :: OSI Approved :: MIT License",
|
|
31
|
+
"Operating System :: OS Independent",
|
|
32
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
33
|
+
]
|
|
34
|
+
dependencies = []
|
|
35
|
+
|
|
36
|
+
[project.optional-dependencies]
|
|
37
|
+
pandas = ["pandas>=2.0"]
|
|
38
|
+
docs = ["mkdocs>=1.6", "mkdocs-material>=9.5"]
|
|
39
|
+
dev = ["pytest>=8.0"]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://tradinglookup.com"
|
|
43
|
+
Documentation = "https://tradinglookup.readthedocs.io/"
|
|
44
|
+
Source = "https://github.com/tradinglookup/tradinglookup"
|
|
45
|
+
OpenAPI = "https://tradinglookup.com/openapi.json"
|
|
46
|
+
Data = "https://tradinglookup.com/data/"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.packages.find]
|
|
49
|
+
where = ["src"]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""TradingLookup zero-API-key Python SDK.
|
|
2
|
+
|
|
3
|
+
Public, read-only access to TradingLookup's CC BY 4.0 datasets, REST API
|
|
4
|
+
endpoints and Model Context Protocol (MCP) tools.
|
|
5
|
+
|
|
6
|
+
Open data hub: https://tradinglookup.com/data/
|
|
7
|
+
AI agent access: https://tradinglookup.com/for-ai-agents/
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from .client import (
|
|
13
|
+
CC_BY_4_0_LICENCE,
|
|
14
|
+
CFD_RISK_WARNING,
|
|
15
|
+
DEFAULT_BASE_URL,
|
|
16
|
+
PROP_MARKETS,
|
|
17
|
+
TradingLookupClient,
|
|
18
|
+
TradingLookupError,
|
|
19
|
+
__version__,
|
|
20
|
+
compare_prop_firms,
|
|
21
|
+
get_catalog,
|
|
22
|
+
get_cfd_loss_rates,
|
|
23
|
+
get_crypto_access,
|
|
24
|
+
get_economic_releases,
|
|
25
|
+
get_economic_releases_snapshot,
|
|
26
|
+
get_india_brokers,
|
|
27
|
+
get_market_hours,
|
|
28
|
+
get_prop_plans,
|
|
29
|
+
get_rule_changes,
|
|
30
|
+
lookup_prop_firm,
|
|
31
|
+
mcp_call,
|
|
32
|
+
read_csv,
|
|
33
|
+
to_dataframe,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"__version__",
|
|
38
|
+
"DEFAULT_BASE_URL",
|
|
39
|
+
"CC_BY_4_0_LICENCE",
|
|
40
|
+
"CFD_RISK_WARNING",
|
|
41
|
+
"PROP_MARKETS",
|
|
42
|
+
"TradingLookupError",
|
|
43
|
+
"TradingLookupClient",
|
|
44
|
+
"to_dataframe",
|
|
45
|
+
"get_catalog",
|
|
46
|
+
"get_prop_plans",
|
|
47
|
+
"lookup_prop_firm",
|
|
48
|
+
"compare_prop_firms",
|
|
49
|
+
"get_cfd_loss_rates",
|
|
50
|
+
"get_economic_releases",
|
|
51
|
+
"get_economic_releases_snapshot",
|
|
52
|
+
"get_market_hours",
|
|
53
|
+
"get_crypto_access",
|
|
54
|
+
"get_india_brokers",
|
|
55
|
+
"get_rule_changes",
|
|
56
|
+
"read_csv",
|
|
57
|
+
"mcp_call",
|
|
58
|
+
]
|