cryptotab 1.0.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.
- cryptotab-1.0.0/LICENSE +21 -0
- cryptotab-1.0.0/PKG-INFO +47 -0
- cryptotab-1.0.0/README.md +25 -0
- cryptotab-1.0.0/pyproject.toml +3 -0
- cryptotab-1.0.0/setup.cfg +39 -0
- cryptotab-1.0.0/src/cryptotab/__init__.py +3 -0
- cryptotab-1.0.0/src/cryptotab/bin.py +46 -0
- cryptotab-1.0.0/src/cryptotab/cli.py +53 -0
- cryptotab-1.0.0/src/cryptotab/environ.py +52 -0
- cryptotab-1.0.0/src/cryptotab/ping.py +47 -0
- cryptotab-1.0.0/src/cryptotab/tab.py +54 -0
- cryptotab-1.0.0/src/cryptotab/task.py +25 -0
- cryptotab-1.0.0/src/cryptotab.egg-info/PKG-INFO +47 -0
- cryptotab-1.0.0/src/cryptotab.egg-info/SOURCES.txt +17 -0
- cryptotab-1.0.0/src/cryptotab.egg-info/dependency_links.txt +1 -0
- cryptotab-1.0.0/src/cryptotab.egg-info/entry_points.txt +2 -0
- cryptotab-1.0.0/src/cryptotab.egg-info/requires.txt +6 -0
- cryptotab-1.0.0/src/cryptotab.egg-info/top_level.txt +1 -0
cryptotab-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Asinerum Conlang Project
|
|
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.
|
cryptotab-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cryptotab
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Crypto Comparison Universal Toolkit
|
|
5
|
+
Home-page: https://github.com/asinerum/cryptotab
|
|
6
|
+
Author: Asinerum Conlang Project
|
|
7
|
+
Author-email: asinerum.com@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: jinja2>=3.1.6
|
|
16
|
+
Requires-Dist: pingouin>=0.5.5
|
|
17
|
+
Requires-Dist: tagrepo>=1.0.19
|
|
18
|
+
Requires-Dist: cometaz>=1.0.4
|
|
19
|
+
Requires-Dist: vapp>=1.0.5
|
|
20
|
+
Requires-Dist: uvia>=1.0.2
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# Crypto Comparison Universal Toolkit
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
```bash
|
|
27
|
+
pip install uvia vapp cryptotab
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Data Prerequisites
|
|
31
|
+
A valid YAML data file should be created in working folder.
|
|
32
|
+
Sample well-formatted files (with real cryptocurrency lists) are included in the package.
|
|
33
|
+
|
|
34
|
+
## Web Daemon Usage
|
|
35
|
+
```bash
|
|
36
|
+
uvia -a vapp -m cryptotab --host 127.0.0.1 --port 7890
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## CLI Usage
|
|
40
|
+
```bash
|
|
41
|
+
cryptotab --help
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Detailed tips, tricks, and examples, can be found at project's repository
|
|
45
|
+
https://github.com/asinerum/cryptotab
|
|
46
|
+
|
|
47
|
+
(C)2026 Asinerum Conlang Project
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Crypto Comparison Universal Toolkit
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
```bash
|
|
5
|
+
pip install uvia vapp cryptotab
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Data Prerequisites
|
|
9
|
+
A valid YAML data file should be created in working folder.
|
|
10
|
+
Sample well-formatted files (with real cryptocurrency lists) are included in the package.
|
|
11
|
+
|
|
12
|
+
## Web Daemon Usage
|
|
13
|
+
```bash
|
|
14
|
+
uvia -a vapp -m cryptotab --host 127.0.0.1 --port 7890
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## CLI Usage
|
|
18
|
+
```bash
|
|
19
|
+
cryptotab --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Detailed tips, tricks, and examples, can be found at project's repository
|
|
23
|
+
https://github.com/asinerum/cryptotab
|
|
24
|
+
|
|
25
|
+
(C)2026 Asinerum Conlang Project
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = cryptotab
|
|
3
|
+
version = 1.0.0
|
|
4
|
+
author = Asinerum Conlang Project
|
|
5
|
+
author_email = asinerum.com@gmail.com
|
|
6
|
+
description = Crypto Comparison Universal Toolkit
|
|
7
|
+
long_description = file: README.md
|
|
8
|
+
long_description_content_type = text/markdown
|
|
9
|
+
url = https://github.com/asinerum/cryptotab
|
|
10
|
+
license = MIT
|
|
11
|
+
classifiers =
|
|
12
|
+
Programming Language :: Python :: 3
|
|
13
|
+
License :: OSI Approved :: MIT License
|
|
14
|
+
Operating System :: OS Independent
|
|
15
|
+
|
|
16
|
+
[options]
|
|
17
|
+
package_dir =
|
|
18
|
+
= src
|
|
19
|
+
packages = find:
|
|
20
|
+
python_requires = >=3.7
|
|
21
|
+
install_requires =
|
|
22
|
+
jinja2 >= 3.1.6
|
|
23
|
+
pingouin >= 0.5.5
|
|
24
|
+
tagrepo >= 1.0.19
|
|
25
|
+
cometaz >= 1.0.4
|
|
26
|
+
vapp >= 1.0.5
|
|
27
|
+
uvia >= 1.0.2
|
|
28
|
+
|
|
29
|
+
[options.packages.find]
|
|
30
|
+
where = src
|
|
31
|
+
|
|
32
|
+
[options.entry_points]
|
|
33
|
+
console_scripts =
|
|
34
|
+
cryptotab = cryptotab.cli:main
|
|
35
|
+
|
|
36
|
+
[egg_info]
|
|
37
|
+
tag_build =
|
|
38
|
+
tag_date = 0
|
|
39
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from jinja2 import Template
|
|
2
|
+
|
|
3
|
+
from .task import *
|
|
4
|
+
|
|
5
|
+
APP_PORT = 8087
|
|
6
|
+
APP_DESC = "Crypto Comparison Toolkit"
|
|
7
|
+
|
|
8
|
+
METRICS = [
|
|
9
|
+
PRICE_FLUCTUATION,
|
|
10
|
+
VOLUME_FLUCTUATION,
|
|
11
|
+
MARTKETCAP_FLUCTUATION,
|
|
12
|
+
SURPLUS_FLUCTUATION,
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def form_content():
|
|
16
|
+
return f'''
|
|
17
|
+
<form method="post">
|
|
18
|
+
<p>{html_coin_checkboxes()}</p>
|
|
19
|
+
<p>{html_form_date_range()}</p>
|
|
20
|
+
<p>{html_submit_button()}</p>
|
|
21
|
+
</form>
|
|
22
|
+
'''
|
|
23
|
+
|
|
24
|
+
def form_page():
|
|
25
|
+
return Template(APP_TMP_SIMPLE_PAGE).render(
|
|
26
|
+
APP_CHARSET=APP_CHARSET,
|
|
27
|
+
APP_VIEWPORT=APP_VIEWPORT,
|
|
28
|
+
APP_TITLE=APP_DESC,
|
|
29
|
+
FORM_TITLE=FORM_TITLE,
|
|
30
|
+
FORM_BODY=form_content())
|
|
31
|
+
|
|
32
|
+
def homepage(formpage=form_page):
|
|
33
|
+
async def submit(request: Request):
|
|
34
|
+
if request.method == "GET":
|
|
35
|
+
return HTMLResponse(formpage())
|
|
36
|
+
else:
|
|
37
|
+
form = await request.form()
|
|
38
|
+
symbols = form.getlist("symbols")
|
|
39
|
+
start, end = get_form_date_range(form)
|
|
40
|
+
plotter = html_metrics_plot(
|
|
41
|
+
label=LABEL_COMPARISON,
|
|
42
|
+
metrics=METRICS,
|
|
43
|
+
plot_func=binance_fluctuation_plot(symbols, start=start, end=end, client=client))
|
|
44
|
+
clear_binance_data()
|
|
45
|
+
return plotter
|
|
46
|
+
return submit
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Usage:
|
|
3
|
+
cryptotab (-h|--help)
|
|
4
|
+
cryptotab [-s <starting_date>] [-e <ending_date>] [-l <symbols_list>] [-c <stable_coin>] [-f <symbols_file>]
|
|
5
|
+
|
|
6
|
+
Arguments:
|
|
7
|
+
-s, --start Starting date of chart
|
|
8
|
+
-e, --end Ending date of chart
|
|
9
|
+
-l, --list Crypto symbols list for chart
|
|
10
|
+
-c, --coin Stable coin for crypto evaluation
|
|
11
|
+
-f, --file YAML file containing symbols list
|
|
12
|
+
<starting_date> A date string in UK format d/m/yyyy
|
|
13
|
+
<ending_date> A date string in UK format d/m/yyyy
|
|
14
|
+
<symbols_list> A list of charting coins, eg. "BTC,ETH", or "?" for manual input
|
|
15
|
+
<stable_coin> A big Binance stable coin, eg. "USDT" or "USDC"
|
|
16
|
+
<symbols_file> Standard YAML file with a list of symbols
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from cometaz.cli import main as bin_main, input_data, show_chart
|
|
20
|
+
|
|
21
|
+
from .bin import *
|
|
22
|
+
|
|
23
|
+
def build_chart_images(
|
|
24
|
+
symbols: list,
|
|
25
|
+
start: date,
|
|
26
|
+
end: date,
|
|
27
|
+
metrics: list=METRICS) -> list:
|
|
28
|
+
plotter = html_metrics_plot(
|
|
29
|
+
label=LABEL_COMPARISON,
|
|
30
|
+
metrics=metrics,
|
|
31
|
+
plot_func=binance_fluctuation_plot(
|
|
32
|
+
symbols=symbols,
|
|
33
|
+
start=start,
|
|
34
|
+
end=end,
|
|
35
|
+
client=client),
|
|
36
|
+
response_func=None)
|
|
37
|
+
clear_binance_data()
|
|
38
|
+
return plotter
|
|
39
|
+
|
|
40
|
+
def run(args):
|
|
41
|
+
try:
|
|
42
|
+
bisymbols, start, end = input_data(args)
|
|
43
|
+
print("Adjusted ISO starting:", start)
|
|
44
|
+
print("Adjusted ISO ending:", end)
|
|
45
|
+
show_chart(build_chart_images(bisymbols, start, end))
|
|
46
|
+
except Exception as e:
|
|
47
|
+
print(f"Error: {e}")
|
|
48
|
+
|
|
49
|
+
def main():
|
|
50
|
+
bin_main(run, APP_DESC)
|
|
51
|
+
|
|
52
|
+
if __name__ == "__main__":
|
|
53
|
+
main()
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from tagrepo.environ import set_environ
|
|
2
|
+
from cometaz.cli import read_yaml
|
|
3
|
+
|
|
4
|
+
from cryptobin import *
|
|
5
|
+
|
|
6
|
+
SYMB = "symb"
|
|
7
|
+
NAME = "name"
|
|
8
|
+
|
|
9
|
+
DEF_COINS = {"Defaults": [
|
|
10
|
+
{SYMB: "BTC", NAME: "Bitcoin"},
|
|
11
|
+
{SYMB: "ETH", NAME: "Ethereum"},
|
|
12
|
+
{SYMB: "BNB", NAME: "BNB"},
|
|
13
|
+
{SYMB: "SOL", NAME: "Solana"},
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if SYMBOLS_LIST: DEF_COINS = {"Favorites": [{SYMB: x.strip().upper(), NAME: x.strip()} for x in SYMBOLS_LIST.split(",")]}
|
|
18
|
+
|
|
19
|
+
coin_data_adjust = lambda data: {k: [{SYMB: x, NAME: y} for x, y in v.items()] for k, v in data.items()}
|
|
20
|
+
add_suffix = lambda var, *args: str(var) + "".join(list(map(str, args)))
|
|
21
|
+
|
|
22
|
+
def coin_data_load(file: str) -> dict:
|
|
23
|
+
coins = read_yaml(file)
|
|
24
|
+
if coins and type(coins[next(iter(coins))]) is dict:
|
|
25
|
+
coins = coin_data_adjust(coins)
|
|
26
|
+
if not coins:
|
|
27
|
+
coins = DEF_COINS.copy()
|
|
28
|
+
return coins
|
|
29
|
+
|
|
30
|
+
COINS = coin_data_load("list.yaml")
|
|
31
|
+
|
|
32
|
+
def html_coin_checkbox(symbol: dict, list_name: str="symbols", stuff: str=STABLE_COIN, symb=SYMB, name=NAME, symb_func=add_suffix) -> str:
|
|
33
|
+
return html_checkbox(symb_func(symbol[symb], stuff), list_name, labelfunc=lambda arg: symbol[name])
|
|
34
|
+
|
|
35
|
+
def html_coin_group_checkboxes(group: list[dict], list_name: str="symbols", stuff: str=STABLE_COIN, symb=SYMB, name=NAME, symb_func=add_suffix) -> str:
|
|
36
|
+
content_html = ""
|
|
37
|
+
for symbol in group:
|
|
38
|
+
content_html += html_coin_checkbox(symbol, list_name=list_name, stuff=stuff, symb=symb, name=name, symb_func=symb_func)
|
|
39
|
+
return content_html
|
|
40
|
+
|
|
41
|
+
def html_coin_checkboxes(coins: dict=COINS, list_name: str="symbols", stuff: str=STABLE_COIN, symb=SYMB, name=NAME, symb_func=add_suffix) -> str:
|
|
42
|
+
content_html = ""
|
|
43
|
+
for key, group in coins.items():
|
|
44
|
+
content_html += html_fieldset(key.title(), html_coin_group_checkboxes(group, list_name=list_name, stuff=stuff, symb=symb, name=name, symb_func=symb_func))
|
|
45
|
+
return content_html
|
|
46
|
+
|
|
47
|
+
set_environ("PRICE_FLUCTUATION", "Price Fluctuation")
|
|
48
|
+
set_environ("VOLUME_FLUCTUATION", "Volume Fluctuation")
|
|
49
|
+
set_environ("MARTKETCAP_FLUCTUATION", "Martketcap Fluctuation")
|
|
50
|
+
set_environ("SURPLUS_FLUCTUATION", "Profit Fluctuation")
|
|
51
|
+
|
|
52
|
+
set_environ("FORM_TITLE", "Crypto Comparison")
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import random
|
|
2
|
+
import pandas as pd
|
|
3
|
+
import pingouin as pg
|
|
4
|
+
|
|
5
|
+
from .tab import *
|
|
6
|
+
|
|
7
|
+
RANDOM_SEED = 1234
|
|
8
|
+
SAMPLE_SIZE = 100
|
|
9
|
+
|
|
10
|
+
are_lists = lambda *args: all([type(x) is list for x in args])
|
|
11
|
+
same_size = lambda *args: are_lists(*args) and len(args) and all(len(lst) == len(args[0]) for lst in args)
|
|
12
|
+
|
|
13
|
+
def multivariate(x: list[float], y: list[float], size: int=SAMPLE_SIZE):
|
|
14
|
+
if not same_size(x, y): return None
|
|
15
|
+
t = Tab([x, y])
|
|
16
|
+
np.random.seed(RANDOM_SEED)
|
|
17
|
+
mean, cov = t.mean(), t.cov()
|
|
18
|
+
return np.random.multivariate_normal(mean, cov, size).T.tolist()
|
|
19
|
+
|
|
20
|
+
def t_test(x: list[float], y: list[float], size: int=SAMPLE_SIZE):
|
|
21
|
+
r = multivariate(x, y, size=size)
|
|
22
|
+
return pg.ttest(r[0], r[1]) if are_lists(r) else None
|
|
23
|
+
|
|
24
|
+
def pearson_corr(x: list[float], y: list[float], size: int=SAMPLE_SIZE):
|
|
25
|
+
r = multivariate(x, y, size=size)
|
|
26
|
+
return pg.corr(r[0], r[1]) if are_lists(r) else None
|
|
27
|
+
|
|
28
|
+
def robust_corr(x: list[float], y: list[float], size: int=SAMPLE_SIZE):
|
|
29
|
+
r = multivariate(x, y, size=size)
|
|
30
|
+
if are_lists(r):
|
|
31
|
+
r[0][0] = random.uniform(0, 10**6)
|
|
32
|
+
return pg.corr(r[0], r[1], method="bicor")
|
|
33
|
+
return None
|
|
34
|
+
|
|
35
|
+
def pairwise_corr(x: list[float], y: list[float], size: int=SAMPLE_SIZE):
|
|
36
|
+
r = multivariate(x, y, size=size)
|
|
37
|
+
if are_lists(r):
|
|
38
|
+
data = pd.DataFrame({'X': r[0], 'Y': r[1]})
|
|
39
|
+
return pg.pairwise_corr(data, columns=['X', 'Y'], method='pearson')
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
def pairwise_t_test(x: list[float], y: list[float], size: int=SAMPLE_SIZE):
|
|
43
|
+
r = multivariate(x, y, size=size)
|
|
44
|
+
if are_lists(r):
|
|
45
|
+
data = pd.DataFrame({'X': r[0], 'Y': r[1]})
|
|
46
|
+
return data.ptests(paired=True, stars=False)
|
|
47
|
+
return None
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
## tabular data: rows:=variables, cols:=observations
|
|
4
|
+
## for example: [A_daily_prices[], B_daily_prices[]]
|
|
5
|
+
|
|
6
|
+
class Tab:
|
|
7
|
+
def __init__(self, data: list[list], decimals: int=5):
|
|
8
|
+
self.data = data.copy()
|
|
9
|
+
self.decimals = decimals
|
|
10
|
+
def cov0(self, bias: bool=False) -> list: ## pure python with no number adjustment
|
|
11
|
+
data = self.data
|
|
12
|
+
n_vars = len(data) ## data.rows
|
|
13
|
+
n_obs = len(data[0]) ## data.cols
|
|
14
|
+
means = [sum(var) / n_obs for var in data]
|
|
15
|
+
matrix = [[0.0] * n_vars for _ in range(n_vars)]
|
|
16
|
+
for i in range(n_vars):
|
|
17
|
+
for j in range(i, n_vars):
|
|
18
|
+
cov = sum((data[i][k] - means[i]) * (data[j][k] - means[j]) for k in range(n_obs)) / (n_obs - (1 if not bias else 0))
|
|
19
|
+
matrix[i][j] = cov
|
|
20
|
+
matrix[j][i] = cov ## symmetric cov
|
|
21
|
+
return matrix
|
|
22
|
+
def cov(self, bias: bool=False) -> list: ## using numpy
|
|
23
|
+
return np.cov(np.array(self.data), bias=bias).tolist()
|
|
24
|
+
def mean(self, axis: int=1) -> list: ## default mean on rows
|
|
25
|
+
return np.mean(self.data, axis=axis).tolist() ## axis=0 for mean on columns
|
|
26
|
+
def round(self, data=None, decimals: int=-1) -> list: ## for data printing
|
|
27
|
+
if data is None: data = self.data
|
|
28
|
+
if decimals < 0: decimals = self.decimals
|
|
29
|
+
return np.round(data, decimals=decimals).tolist()
|
|
30
|
+
|
|
31
|
+
class Frame:
|
|
32
|
+
import pandas as pd
|
|
33
|
+
def __init__(self, data: list[list]):
|
|
34
|
+
self.df = self.pd.DataFrame(list(row) for row in zip(*data))
|
|
35
|
+
def diff(self, fillna: any=None, colabs: str="abs_change", colpct: str="pct_change"):
|
|
36
|
+
df = self.df.copy()
|
|
37
|
+
for i in range(len(df.columns)):
|
|
38
|
+
df[f"{colabs}_{i}"] = df[i].diff()
|
|
39
|
+
df[f"{colpct}_{i}"] = df[i].pct_change() * 100
|
|
40
|
+
if fillna is not None: df = df.fillna(fillna)
|
|
41
|
+
return df
|
|
42
|
+
def getdiff(self, fillna: any=None): ## income
|
|
43
|
+
df = self.diff(fillna=fillna)
|
|
44
|
+
df = df.drop(columns=df.columns[:len(self.df.columns)])
|
|
45
|
+
return df
|
|
46
|
+
def avgdiff(self, skip: int=1) -> tuple: ## skip first row at default
|
|
47
|
+
df = self.getdiff(fillna=0)
|
|
48
|
+
return df, df.iloc[skip:].mean()
|
|
49
|
+
def diffdev(self, skip: int=1): ## income surplus
|
|
50
|
+
df, means = self.avgdiff(skip=skip)
|
|
51
|
+
for col in df.columns:
|
|
52
|
+
df[f"dev_{col}"] = df[col] - means[col]
|
|
53
|
+
df = df.drop(columns=df.columns[:len(self.df.columns) * 2])
|
|
54
|
+
return df.iloc[skip:]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from .environ import *
|
|
2
|
+
from .tab import *
|
|
3
|
+
|
|
4
|
+
def clear_binance_data():
|
|
5
|
+
global binance_data
|
|
6
|
+
binance_data = {}
|
|
7
|
+
|
|
8
|
+
def binance_fluctuation_plot(symbols: list, start: date, end: date, client: Client, valfield="pct_change_0", devprefix="dev_"):
|
|
9
|
+
global binance_data
|
|
10
|
+
if not binance_data: binance_data = binance_core_data(symbols=symbols, start=start, end=end, client=client)
|
|
11
|
+
def plot(metric: str):
|
|
12
|
+
if metric in [VOLUME_FLUCTUATION]:
|
|
13
|
+
key = "volumes"
|
|
14
|
+
elif metric in [MARTKETCAP_FLUCTUATION]:
|
|
15
|
+
key = "caps"
|
|
16
|
+
else:
|
|
17
|
+
key = "rates"
|
|
18
|
+
for symbol, data in binance_data.items():
|
|
19
|
+
frame = Frame([data[key]])
|
|
20
|
+
if metric in [SURPLUS_FLUCTUATION]:
|
|
21
|
+
data["chart"] = frame.diffdev(0)[devprefix + valfield].tolist()
|
|
22
|
+
else:
|
|
23
|
+
data["chart"] = frame.getdiff(0)[valfield].tolist()
|
|
24
|
+
plt.plot(data["dates"], data["chart"], label=symbol)
|
|
25
|
+
return plot
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cryptotab
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Crypto Comparison Universal Toolkit
|
|
5
|
+
Home-page: https://github.com/asinerum/cryptotab
|
|
6
|
+
Author: Asinerum Conlang Project
|
|
7
|
+
Author-email: asinerum.com@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: jinja2>=3.1.6
|
|
16
|
+
Requires-Dist: pingouin>=0.5.5
|
|
17
|
+
Requires-Dist: tagrepo>=1.0.19
|
|
18
|
+
Requires-Dist: cometaz>=1.0.4
|
|
19
|
+
Requires-Dist: vapp>=1.0.5
|
|
20
|
+
Requires-Dist: uvia>=1.0.2
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# Crypto Comparison Universal Toolkit
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
```bash
|
|
27
|
+
pip install uvia vapp cryptotab
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Data Prerequisites
|
|
31
|
+
A valid YAML data file should be created in working folder.
|
|
32
|
+
Sample well-formatted files (with real cryptocurrency lists) are included in the package.
|
|
33
|
+
|
|
34
|
+
## Web Daemon Usage
|
|
35
|
+
```bash
|
|
36
|
+
uvia -a vapp -m cryptotab --host 127.0.0.1 --port 7890
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## CLI Usage
|
|
40
|
+
```bash
|
|
41
|
+
cryptotab --help
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Detailed tips, tricks, and examples, can be found at project's repository
|
|
45
|
+
https://github.com/asinerum/cryptotab
|
|
46
|
+
|
|
47
|
+
(C)2026 Asinerum Conlang Project
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.cfg
|
|
5
|
+
src/cryptotab/__init__.py
|
|
6
|
+
src/cryptotab/bin.py
|
|
7
|
+
src/cryptotab/cli.py
|
|
8
|
+
src/cryptotab/environ.py
|
|
9
|
+
src/cryptotab/ping.py
|
|
10
|
+
src/cryptotab/tab.py
|
|
11
|
+
src/cryptotab/task.py
|
|
12
|
+
src/cryptotab.egg-info/PKG-INFO
|
|
13
|
+
src/cryptotab.egg-info/SOURCES.txt
|
|
14
|
+
src/cryptotab.egg-info/dependency_links.txt
|
|
15
|
+
src/cryptotab.egg-info/entry_points.txt
|
|
16
|
+
src/cryptotab.egg-info/requires.txt
|
|
17
|
+
src/cryptotab.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cryptotab
|