lemdaddy commited on
Commit
383415a
·
1 Parent(s): 473cf44
TODO.md CHANGED
@@ -75,4 +75,5 @@
75
  2. Create secret store and integrate
76
  3. Create ChatXBT host scalabe hosting (fly or Digital Ocean or RunPod)
77
  4. Set alerts for billing and uptime
78
- 5. Set error alerts and llm investigation
 
 
75
  2. Create secret store and integrate
76
  3. Create ChatXBT host scalabe hosting (fly or Digital Ocean or RunPod)
77
  4. Set alerts for billing and uptime
78
+ 5. Set error alerts and llm investigation
79
+ 6. Add guard rails - https://github.com/NVIDIA/NeMo-Guardrails
chatxbt-assistant.py CHANGED
@@ -5,23 +5,20 @@ load_dotenv()
5
 
6
  import chainlit as cl
7
  from phi.assistant import Assistant
8
- from phi.tools.duckduckgo import DuckDuckGo
9
  from phi.llm.openai import OpenAIChat
 
10
  from phi.tools.yfinance import YFinanceTools
 
11
  from src.tools.coin_data_toolkit import CryptoDataTools
 
 
12
 
13
-
14
- # assistant = Assistant(tools=[DuckDuckGo()], show_tool_calls=True)
15
- # assistant.print_response("Whats happening in France?", markdown=True)
16
-
17
- # f_assistant = Assistant(
18
- # llm=OpenAIChat(model="gpt-4o"),
19
- # tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True)],
20
- # show_tool_calls=True,
21
- # markdown=True,
22
- # )
23
- # f_assistant.print_response("What is the stock price of NVDA")
24
- # f_assistant.print_response("Write a comparison between NVDA and AMD, use all tools available.")
25
 
26
 
27
  @cl.oauth_callback
@@ -72,7 +69,14 @@ def start():
72
  tools=[CryptoDataTools(), DuckDuckGo(), YFinanceTools(stock_price=True)],
73
  show_tool_calls= is_dev_mode,
74
  markdown=True,
 
 
 
 
 
 
75
  )
 
76
 
77
  # Set the assistant in the user session
78
  cl.user_session.set("agent", cxbt_assistant)
 
5
 
6
  import chainlit as cl
7
  from phi.assistant import Assistant
 
8
  from phi.llm.openai import OpenAIChat
9
+ from phi.tools.duckduckgo import DuckDuckGo
10
  from phi.tools.yfinance import YFinanceTools
11
+ from src.databases.postgres import sqlalchemy_engine
12
  from src.tools.coin_data_toolkit import CryptoDataTools
13
+ from phi.storage.assistant.postgres import PgAssistantStorage
14
+ from src.knowledge_bases.knowledge_base import knowledge_base
15
 
16
+ storage = PgAssistantStorage(
17
+ # store runs in the ai.assistant_runs table
18
+ table_name="assistant_runs",
19
+ db_engine=sqlalchemy_engine
20
+ )
21
+ knowledge_base.load(recreate=False)
 
 
 
 
 
 
22
 
23
 
24
  @cl.oauth_callback
 
69
  tools=[CryptoDataTools(), DuckDuckGo(), YFinanceTools(stock_price=True)],
70
  show_tool_calls= is_dev_mode,
71
  markdown=True,
72
+ # knowledge_base=knowledge_base,
73
+ storage=storage,
74
+ search_knowledge=True,
75
+ read_chat_history=True,
76
+ add_references_to_prompt=True,
77
+ add_chat_history_to_prompt=True
78
  )
79
+ # cxbt_assistant.knowledge_base.load(recreate=False)
80
 
81
  # Set the assistant in the user session
82
  cl.user_session.set("agent", cxbt_assistant)
requirements.txt CHANGED
@@ -2,6 +2,7 @@ aiofiles==23.2.1
2
  aiohttp==3.9.5
3
  aiosignal==1.3.1
4
  annotated-types==0.7.0
 
5
  anyio==3.7.1
6
  appnope==0.1.4
7
  asgiref==3.8.1
@@ -30,11 +31,14 @@ exceptiongroup==1.2.1
30
  executing==2.0.1
31
  fastapi==0.110.3
32
  fastjsonschema==2.19.1
 
33
  filetype==1.2.0
34
  frozendict==2.4.4
35
  frozenlist==1.4.1
 
36
  gitdb==4.0.11
37
  GitPython==3.1.43
 
38
  googleapis-common-protos==1.63.1
39
  greenlet==3.0.3
40
  grpcio==1.64.1
@@ -42,11 +46,13 @@ h11==0.14.0
42
  html5lib==1.1
43
  httpcore==1.0.5
44
  httpx==0.27.0
 
45
  idna==3.7
46
  importlib_metadata==7.1.0
47
  ipython==8.12.3
48
  jedi==0.19.1
49
  Jinja2==3.1.4
 
50
  jsonpatch==1.33
51
  jsonpointer==3.0.0
52
  jsonschema==4.22.0
@@ -55,9 +61,13 @@ jupyter_client==8.6.2
55
  jupyter_core==5.7.2
56
  jupyterlab_pygments==0.3.0
57
  langchain==0.2.4
 
58
  langchain-community==0.2.4
59
  langchain-core==0.2.6
 
60
  langchain-text-splitters==0.2.1
 
 
61
  langsmith==0.1.77
62
  Lazify==0.4.0
63
  literalai==0.0.604
@@ -76,6 +86,7 @@ nbclient==0.10.0
76
  nbconvert==7.16.4
77
  nbformat==5.10.4
78
  nest-asyncio==1.6.0
 
79
  numpy==1.26.4
80
  openai==1.34.0
81
  opentelemetry-api==1.25.0
@@ -101,6 +112,7 @@ pandocfilters==1.5.1
101
  parso==0.8.4
102
  peewee==3.17.5
103
  pexpect==4.9.0
 
104
  phidata==2.4.20
105
  pickleshare==0.7.5
106
  pipdeptree==2.22.0
@@ -109,6 +121,8 @@ platformdirs==4.2.2
109
  prompt_toolkit==3.0.47
110
  protobuf==4.25.3
111
  psutil==5.9.8
 
 
112
  ptyprocess==0.7.0
113
  pure-eval==0.2.2
114
  pydantic==2.7.4
@@ -116,6 +130,7 @@ pydantic-settings==2.3.3
116
  pydantic_core==2.18.4
117
  Pygments==2.18.0
118
  PyJWT==2.8.0
 
119
  pyreqwest_impersonate==0.4.7
120
  python-dateutil==2.9.0.post0
121
  python-dotenv==1.0.1
@@ -128,6 +143,7 @@ PyYAML==6.0.1
128
  pyzmq==26.0.3
129
  redis==5.0.6
130
  referencing==0.35.1
 
131
  requests==2.32.3
132
  rich==13.7.1
133
  rpds-py==0.18.1
@@ -141,14 +157,18 @@ soupsieve==2.5
141
  SQLAlchemy==2.0.30
142
  stack-data==0.6.3
143
  starlette==0.37.2
 
144
  syncer==2.0.3
145
  tenacity==8.3.0
 
146
  tinycss2==1.3.0
 
147
  tomli==2.0.1
148
  tornado==6.4.1
149
  tqdm==4.66.4
150
  traitlets==5.14.3
151
  typer==0.12.3
 
152
  typing-inspect==0.9.0
153
  typing_extensions==4.12.2
154
  tzdata==2024.1
 
2
  aiohttp==3.9.5
3
  aiosignal==1.3.1
4
  annotated-types==0.7.0
5
+ anthropic==0.28.0
6
  anyio==3.7.1
7
  appnope==0.1.4
8
  asgiref==3.8.1
 
31
  executing==2.0.1
32
  fastapi==0.110.3
33
  fastjsonschema==2.19.1
34
+ filelock==3.15.1
35
  filetype==1.2.0
36
  frozendict==2.4.4
37
  frozenlist==1.4.1
38
+ fsspec==2024.6.0
39
  gitdb==4.0.11
40
  GitPython==3.1.43
41
+ google_search_results==2.4.2
42
  googleapis-common-protos==1.63.1
43
  greenlet==3.0.3
44
  grpcio==1.64.1
 
46
  html5lib==1.1
47
  httpcore==1.0.5
48
  httpx==0.27.0
49
+ huggingface-hub==0.23.3
50
  idna==3.7
51
  importlib_metadata==7.1.0
52
  ipython==8.12.3
53
  jedi==0.19.1
54
  Jinja2==3.1.4
55
+ jiter==0.4.2
56
  jsonpatch==1.33
57
  jsonpointer==3.0.0
58
  jsonschema==4.22.0
 
61
  jupyter_core==5.7.2
62
  jupyterlab_pygments==0.3.0
63
  langchain==0.2.4
64
+ langchain-anthropic==0.1.15
65
  langchain-community==0.2.4
66
  langchain-core==0.2.6
67
+ langchain-openai==0.1.8
68
  langchain-text-splitters==0.2.1
69
+ langchainhub==0.1.20
70
+ langgraph==0.0.68
71
  langsmith==0.1.77
72
  Lazify==0.4.0
73
  literalai==0.0.604
 
86
  nbconvert==7.16.4
87
  nbformat==5.10.4
88
  nest-asyncio==1.6.0
89
+ numexpr==2.10.0
90
  numpy==1.26.4
91
  openai==1.34.0
92
  opentelemetry-api==1.25.0
 
112
  parso==0.8.4
113
  peewee==3.17.5
114
  pexpect==4.9.0
115
+ pgvector==0.2.5
116
  phidata==2.4.20
117
  pickleshare==0.7.5
118
  pipdeptree==2.22.0
 
121
  prompt_toolkit==3.0.47
122
  protobuf==4.25.3
123
  psutil==5.9.8
124
+ psycopg==3.1.19
125
+ psycopg2==2.9.9
126
  ptyprocess==0.7.0
127
  pure-eval==0.2.2
128
  pydantic==2.7.4
 
130
  pydantic_core==2.18.4
131
  Pygments==2.18.0
132
  PyJWT==2.8.0
133
+ pypeln==0.4.9
134
  pyreqwest_impersonate==0.4.7
135
  python-dateutil==2.9.0.post0
136
  python-dotenv==1.0.1
 
143
  pyzmq==26.0.3
144
  redis==5.0.6
145
  referencing==0.35.1
146
+ regex==2024.5.15
147
  requests==2.32.3
148
  rich==13.7.1
149
  rpds-py==0.18.1
 
157
  SQLAlchemy==2.0.30
158
  stack-data==0.6.3
159
  starlette==0.37.2
160
+ stopit==1.1.2
161
  syncer==2.0.3
162
  tenacity==8.3.0
163
+ tiktoken==0.7.0
164
  tinycss2==1.3.0
165
+ tokenizers==0.19.1
166
  tomli==2.0.1
167
  tornado==6.4.1
168
  tqdm==4.66.4
169
  traitlets==5.14.3
170
  typer==0.12.3
171
+ types-requests==2.32.0.20240602
172
  typing-inspect==0.9.0
173
  typing_extensions==4.12.2
174
  tzdata==2024.1
run.py CHANGED
@@ -5,9 +5,7 @@ from src.libs.logger import logger
5
  # from src.data_sources.coingecko import CoinGecko
6
  # from src.data_sources.cryptocompare import CryptoCompare
7
 
8
-
9
  # cgc = CoinGecko()
10
- # ccp = CryptoCompare()
11
 
12
  # result = cgc.get_coin_price(ids=["bitcoin", "ethereum"], vs_currencies=["usd"])
13
  # logger.info(f"Got token price: {result}")
@@ -34,9 +32,20 @@ from src.libs.logger import logger
34
  # # logger.info(f"Got token data: {result1}")
35
  # pprint.pprint(result1)
36
 
37
- from ai_functions import AIFunctions
 
 
 
 
 
 
 
 
 
 
38
 
39
- aif = AIFunctions()
 
40
 
41
- result2 = aif.get_asset_price(asset_id="btc", vs_currency="usd")
42
- pprint.pprint(result2)
 
5
  # from src.data_sources.coingecko import CoinGecko
6
  # from src.data_sources.cryptocompare import CryptoCompare
7
 
 
8
  # cgc = CoinGecko()
 
9
 
10
  # result = cgc.get_coin_price(ids=["bitcoin", "ethereum"], vs_currencies=["usd"])
11
  # logger.info(f"Got token price: {result}")
 
32
  # # logger.info(f"Got token data: {result1}")
33
  # pprint.pprint(result1)
34
 
35
+ # from src.data_sources.cryptocompare import CryptoCompare
36
+ # ccp = CryptoCompare()
37
+
38
+ # result = ccp.get_overall_coin_data(symbol="bnb")
39
+ # pprint.pprint(result)
40
+
41
+ from src.data_sources.cryptocompare import CryptoCompare
42
+ from src.data_sources.dexscreener import DexScreener
43
+
44
+ crypto_compare = CryptoCompare()
45
+ dex_screener = DexScreener()
46
 
47
+ dexscreener_coin_data = dex_screener.search(query='PANDORA')
48
+ cryptocompare_coin_data = crypto_compare.get_overall_coin_data(symbol='PANDORA')
49
 
50
+ pprint.pprint(dexscreener_coin_data)
51
+ pprint.pprint(cryptocompare_coin_data)
src/data_sources/cryptocompare.py CHANGED
@@ -1,27 +1,30 @@
1
  import os
2
  from dotenv import load_dotenv
 
3
 
4
  import httpx
5
- from src.libs.helper_functions import convert_to_snakecase
6
- from src.databases.redis import REDIS_CACHED
7
- from src.libs.constants import ONE_MINUTE_IN_SECONDS
8
- from src.libs.constants import CRYPTO_COMPARE_BASE_URL
9
  from src.libs.logger import logger
10
-
11
-
12
- load_dotenv()
 
 
 
 
 
13
 
14
  redis_cache = REDIS_CACHED
15
 
16
 
17
  class CryptoCompare:
18
- def __init__(self, base_url: str = None) -> None:
19
- self.CRYPTO_COMPARE_BASE_URL = base_url or CRYPTO_COMPARE_BASE_URL
 
20
 
21
  @redis_cache(ttl=ONE_MINUTE_IN_SECONDS)
22
  @logger.instrument()
23
  def get_all_coins(self) -> dict:
24
- url = f"{self.CRYPTO_COMPARE_BASE_URL}data/all/coinlist"
25
  logger.debug(url)
26
  params = {"api_key": os.getenv("CRYPTOCOMPARE_API_KEY")}
27
  logger.debug(params)
@@ -41,7 +44,7 @@ class CryptoCompare:
41
  @logger.instrument()
42
  def get_coin_price(self, ids: list[str], vs_currencies: list[str], cache_ttl: int = None) -> dict:
43
 
44
- url = f"{self.CRYPTO_COMPARE_BASE_URL}data/pricemulti"
45
  # logger.debug(url)
46
 
47
  params = {
@@ -62,4 +65,30 @@ class CryptoCompare:
62
  except httpx.HTTPError as e:
63
  # logger.debug(f"An error occurred while making the request: {e}")
64
  print(f"An error occurred while making the request: {e}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  return None
 
1
  import os
2
  from dotenv import load_dotenv
3
+ load_dotenv()
4
 
5
  import httpx
 
 
 
 
6
  from src.libs.logger import logger
7
+ from src.databases.redis import REDIS_CACHED
8
+ from src.libs.helper_functions import convert_to_snakecase
9
+ from src.libs.constants import (
10
+ ONE_MINUTE_IN_SECONDS,
11
+ ONE_QUARTER_IN_SECONDS,
12
+ CRYPTO_COMPARE_API_BASE_URL,
13
+ CRYPTO_COMPARE_ASSET_DATA_API_BASE_URL,
14
+ )
15
 
16
  redis_cache = REDIS_CACHED
17
 
18
 
19
  class CryptoCompare:
20
+ def __init__(self, base_url: str = None, asset_data_base_url: str = None) -> None:
21
+ self.CRYPTO_COMPARE_API_BASE_URL = base_url or CRYPTO_COMPARE_API_BASE_URL
22
+ self.CRYPTO_COMPARE_ASSET_DATA_API_BASE_URL = asset_data_base_url or CRYPTO_COMPARE_ASSET_DATA_API_BASE_URL
23
 
24
  @redis_cache(ttl=ONE_MINUTE_IN_SECONDS)
25
  @logger.instrument()
26
  def get_all_coins(self) -> dict:
27
+ url = f"{self.CRYPTO_COMPARE_API_BASE_URL}data/all/coinlist"
28
  logger.debug(url)
29
  params = {"api_key": os.getenv("CRYPTOCOMPARE_API_KEY")}
30
  logger.debug(params)
 
44
  @logger.instrument()
45
  def get_coin_price(self, ids: list[str], vs_currencies: list[str], cache_ttl: int = None) -> dict:
46
 
47
+ url = f"{self.CRYPTO_COMPARE_API_BASE_URL}data/pricemulti"
48
  # logger.debug(url)
49
 
50
  params = {
 
65
  except httpx.HTTPError as e:
66
  # logger.debug(f"An error occurred while making the request: {e}")
67
  print(f"An error occurred while making the request: {e}")
68
+ return None
69
+
70
+ @redis_cache(ttl=ONE_QUARTER_IN_SECONDS)
71
+ @logger.instrument()
72
+ def get_overall_coin_data(self, symbol: str, cache_ttl: int = None) -> dict:
73
+
74
+ url = f"{self.CRYPTO_COMPARE_ASSET_DATA_API_BASE_URL}data/by/symbol"
75
+ logger.debug(f"Query URL: {url}")
76
+
77
+ params = {
78
+ "api_key": os.getenv("CRYPTOCOMPARE_API_KEY"),
79
+ "asset_symbol": symbol,
80
+ }
81
+ logger.debug(f"Query params: {params}")
82
+
83
+ headers = {"Content-type":"application/json; charset=UTF-8"}
84
+ logger.debug(f"Query headers {headers}")
85
+
86
+ try:
87
+ with httpx.Client(timeout=30.0) as client:
88
+ response = client.get(url, params=params, headers=headers)
89
+ response.raise_for_status() # Raise an exception if the request was unsuccessful
90
+ return response.json()
91
+ except httpx.HTTPError as e:
92
+ logger.debug(f"An error occurred while making the request: {e}")
93
+ # print(f"An error occurred while making the request: {e}")
94
  return None
src/data_sources/dexscreener.py CHANGED
@@ -1,10 +1,9 @@
1
  from dotenv import load_dotenv
2
 
3
  import httpx
4
- from typing import List, Union, Self
5
- from src.libs.helper_functions import convert_to_snakecase
6
  from src.databases.redis import REDIS_CACHED
7
- from src.libs.constants import ONE_MINUTE_IN_SECONDS
8
  from src.libs.constants import DEX_SCREENER_BASE_URL
9
 
10
  load_dotenv()
@@ -51,7 +50,7 @@ class DexScreener:
51
  try:
52
  response = httpx.get(url)
53
  response.raise_for_status() # Raise an exception if the request was unsuccessful
54
- return convert_to_snakecase(response.json())
55
  except httpx.HTTPError as e:
56
  print(f"An error occurred while making the request: {e}")
57
  return None
@@ -78,13 +77,13 @@ class DexScreener:
78
  try:
79
  response = httpx.get(url)
80
  response.raise_for_status() # Raise an exception if the request was unsuccessful
81
- return convert_to_snakecase(response.json())
82
  except httpx.HTTPError as e:
83
  print(f"An error occurred while making the request: {e}")
84
  return None
85
 
86
- @redis_cache(ttl=ONE_MINUTE_IN_SECONDS)
87
- def search_pairs(self, query: str) -> dict:
88
  """
89
  This method is used to search for pairs matching the provided query from Dex Screener API.
90
  The query may include pair address, token address, token name, or token symbol.
@@ -102,7 +101,7 @@ class DexScreener:
102
  try:
103
  response = httpx.get(url)
104
  response.raise_for_status() # Raise an exception if the request was unsuccessful
105
- return convert_to_snakecase(response.json())
106
  except httpx.HTTPError as e:
107
  print(f"An error occurred while making the request: {e}")
108
  return None
 
1
  from dotenv import load_dotenv
2
 
3
  import httpx
4
+ from typing import List, Union
 
5
  from src.databases.redis import REDIS_CACHED
6
+ from src.libs.constants import ONE_HOUR_IN_SECONDS, ONE_MINUTE_IN_SECONDS
7
  from src.libs.constants import DEX_SCREENER_BASE_URL
8
 
9
  load_dotenv()
 
50
  try:
51
  response = httpx.get(url)
52
  response.raise_for_status() # Raise an exception if the request was unsuccessful
53
+ return response.json()
54
  except httpx.HTTPError as e:
55
  print(f"An error occurred while making the request: {e}")
56
  return None
 
77
  try:
78
  response = httpx.get(url)
79
  response.raise_for_status() # Raise an exception if the request was unsuccessful
80
+ return response.json()
81
  except httpx.HTTPError as e:
82
  print(f"An error occurred while making the request: {e}")
83
  return None
84
 
85
+ @redis_cache(ttl=ONE_HOUR_IN_SECONDS)
86
+ def search(self, query: str) -> dict:
87
  """
88
  This method is used to search for pairs matching the provided query from Dex Screener API.
89
  The query may include pair address, token address, token name, or token symbol.
 
101
  try:
102
  response = httpx.get(url)
103
  response.raise_for_status() # Raise an exception if the request was unsuccessful
104
+ return response.json()
105
  except httpx.HTTPError as e:
106
  print(f"An error occurred while making the request: {e}")
107
  return None
src/databases/postgres.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import os
2
+ from sqlalchemy import create_engine
3
+
4
+ sqlalchemy_engine = create_engine(url=os.getenv('POSTGRES_CONNECTION_STRING'))
src/knowledge_bases/data/coin_data/bnb.json ADDED
@@ -0,0 +1,713 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Data": {
3
+ "ID": 8,
4
+ "TYPE": "162",
5
+ "ID_LEGACY": 204788,
6
+ "ID_PARENT_ASSET": null,
7
+ "SYMBOL": "BNB",
8
+ "URI": "bnb",
9
+ "ASSET_TYPE": "BLOCKCHAIN",
10
+ "PARENT_ASSET_SYMBOL": null,
11
+ "CREATED_ON": 1661250250,
12
+ "UPDATED_ON": 1717070963,
13
+ "PUBLIC_NOTICE": "2024-05-30: The BNB Chain is currently in the final phase of the BNB Smart Chain Feynman Hardfork. This stage involves migrating assets from the BNB Beacon Chain to the BNB Smart Chain (BSC). Previous steps, including enabling native BSC validators, staking, cross-chain stake migration, and governance, have been completed. Stakeholders must take necessary actions before June 2024 to avoid risks associated with this migration process. For more details, visit the [BNB Chain Fusion page](https://www.bnbchain.org/en/bnb-chain-fusion).",
14
+ "NAME": "Binance Coin",
15
+ "LOGO_URL": "https://resources.cryptocompare.com/asset-management/8/1661250459982.png",
16
+ "LAUNCH_DATE": 1555545600,
17
+ "PREVIOUS_ASSET_SYMBOLS": null,
18
+ "ASSET_ALTERNATIVE_IDS": [
19
+ {
20
+ "NAME": "CMC",
21
+ "ID": 1839
22
+ },
23
+ {
24
+ "NAME": "CG",
25
+ "ID": "binancecoin"
26
+ },
27
+ {
28
+ "NAME": "ISIN",
29
+ "ID": "XT8N2VXJKB15"
30
+ },
31
+ {
32
+ "NAME": "VALOR",
33
+ "ID": "114384091"
34
+ },
35
+ {
36
+ "NAME": "DTI",
37
+ "ID": "8N2VXJKB1"
38
+ }
39
+ ],
40
+ "ASSET_DESCRIPTION_SNIPPET": "BNB, created by Changpeng Zhao, is integral to the Binance ecosystem, serving as a versatile utility token within and outside of the Binance platform.",
41
+ "ASSET_DECIMAL_POINTS": 8,
42
+ "SUPPORTED_PLATFORMS": [
43
+ {
44
+ "BLOCKCHAIN": "MATIC",
45
+ "TOKEN_STANDARD": "ERC20",
46
+ "BRIDGE_OPERATOR": "PORTAL_TOKEN_BRIDGE",
47
+ "IS_ASSET_ISSUER": true,
48
+ "EXPLORER_URL": "https://polygonscan.com/token/0xecdcb5b88f8e3c15f95c720c51c71c9e2080525d",
49
+ "SMART_CONTRACT_ADDRESS": "0xecdcb5b88f8e3c15f95c720c51c71c9e2080525d",
50
+ "LAUNCH_DATE": 1636416000,
51
+ "TRADING_AS": "WBNB",
52
+ "DECIMALS": 18
53
+ },
54
+ {
55
+ "BLOCKCHAIN": "SOL",
56
+ "TOKEN_STANDARD": "SPL",
57
+ "BRIDGE_OPERATOR": "PORTAL_TOKEN_BRIDGE",
58
+ "IS_ASSET_ISSUER": true,
59
+ "EXPLORER_URL": "https://solscan.io/token/9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa",
60
+ "SMART_CONTRACT_ADDRESS": "9gP2kCy3wA1ctvYWQk75guqXuHfrEomqydHLtcTCqiLa",
61
+ "LAUNCH_DATE": 1633910400,
62
+ "TRADING_AS": "WBNB",
63
+ "DECIMALS": 8
64
+ },
65
+ {
66
+ "BLOCKCHAIN": "ETH",
67
+ "TOKEN_STANDARD": "ERC20",
68
+ "BRIDGE_OPERATOR": "NATIVE_ASSET",
69
+ "IS_ASSET_ISSUER": true,
70
+ "EXPLORER_URL": "https://etherscan.io/token/0xB8c77482e45F1F44dE1745F52C74426C631bDD52",
71
+ "SMART_CONTRACT_ADDRESS": "0xB8c77482e45F1F44dE1745F52C74426C631bDD52",
72
+ "LAUNCH_DATE": 1499212800,
73
+ "TRADING_AS": "BNB",
74
+ "DECIMALS": 18
75
+ },
76
+ {
77
+ "BLOCKCHAIN": "BNB",
78
+ "TOKEN_STANDARD": "BEP20",
79
+ "BRIDGE_OPERATOR": "BINANCE_BRIDGE",
80
+ "IS_ASSET_ISSUER": true,
81
+ "EXPLORER_URL": "https://bscscan.com/token/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
82
+ "SMART_CONTRACT_ADDRESS": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
83
+ "LAUNCH_DATE": 1599091200,
84
+ "TRADING_AS": "WBNB",
85
+ "DECIMALS": 18
86
+ },
87
+ {
88
+ "BLOCKCHAIN": "AVAX",
89
+ "TOKEN_STANDARD": "ERC20",
90
+ "BRIDGE_OPERATOR": "MULTICHAIN",
91
+ "IS_ASSET_ISSUER": true,
92
+ "EXPLORER_URL": "https://snowtrace.io/token/0x264c1383ea520f73dd837f915ef3a732e204a493",
93
+ "SMART_CONTRACT_ADDRESS": "0x264c1383ea520f73dd837f915ef3a732e204a493",
94
+ "LAUNCH_DATE": 1623974400,
95
+ "RETIRE_DATE": 1684627200,
96
+ "TRADING_AS": "BNB",
97
+ "DECIMALS": 18
98
+ },
99
+ {
100
+ "BLOCKCHAIN": "WEMIX",
101
+ "TOKEN_STANDARD": "ERC20",
102
+ "BRIDGE_OPERATOR": "MULTICHAIN",
103
+ "IS_ASSET_ISSUER": true,
104
+ "EXPLORER_URL": "https://explorer.wemix.com/token/0xC1Be9a4D5D45BeeACAE296a7BD5fADBfc14602C4",
105
+ "SMART_CONTRACT_ADDRESS": "0xC1Be9a4D5D45BeeACAE296a7BD5fADBfc14602C4",
106
+ "LAUNCH_DATE": 1667433600,
107
+ "RETIRE_DATE": 1684627200,
108
+ "TRADING_AS": "BNB",
109
+ "DECIMALS": 18
110
+ },
111
+ {
112
+ "BLOCKCHAIN": "MOVR",
113
+ "TOKEN_STANDARD": "ERC20",
114
+ "BRIDGE_OPERATOR": "MULTICHAIN",
115
+ "IS_ASSET_ISSUER": true,
116
+ "EXPLORER_URL": "https://moonriver.moonscan.io/token/0x2bf9b864cdc97b08b6d79ad4663e71b8ab65c45c",
117
+ "SMART_CONTRACT_ADDRESS": "0x2bf9b864cdc97b08b6d79ad4663e71b8ab65c45c",
118
+ "LAUNCH_DATE": 1630627200,
119
+ "RETIRE_DATE": 1684627200,
120
+ "TRADING_AS": "BNB",
121
+ "DECIMALS": 18
122
+ },
123
+ {
124
+ "BLOCKCHAIN": "GLMR",
125
+ "TOKEN_STANDARD": "ERC20",
126
+ "BRIDGE_OPERATOR": "MULTICHAIN",
127
+ "IS_ASSET_ISSUER": true,
128
+ "EXPLORER_URL": "https://moonscan.io/token/0xc9baa8cfdde8e328787e29b4b078abf2dadc2055",
129
+ "SMART_CONTRACT_ADDRESS": "0xc9baa8cfdde8e328787e29b4b078abf2dadc2055",
130
+ "LAUNCH_DATE": 1641945600,
131
+ "RETIRE_DATE": 1684627200,
132
+ "TRADING_AS": "BNB",
133
+ "DECIMALS": 18
134
+ },
135
+ {
136
+ "BLOCKCHAIN": "ETC",
137
+ "TOKEN_STANDARD": "ERC20",
138
+ "BRIDGE_OPERATOR": "MULTICHAIN",
139
+ "IS_ASSET_ISSUER": true,
140
+ "EXPLORER_URL": "https://blockscout.com/etc/mainnet/token/0x0dCb0CB0120d355CdE1ce56040be57Add0185BAa",
141
+ "SMART_CONTRACT_ADDRESS": "0x0dCb0CB0120d355CdE1ce56040be57Add0185BAa",
142
+ "LAUNCH_DATE": 1654819200,
143
+ "RETIRE_DATE": 1684627200,
144
+ "TRADING_AS": "BNB",
145
+ "DECIMALS": 18
146
+ },
147
+ {
148
+ "BLOCKCHAIN": "DOGE",
149
+ "TOKEN_STANDARD": "ERC20",
150
+ "BRIDGE_OPERATOR": "MULTICHAIN",
151
+ "IS_ASSET_ISSUER": true,
152
+ "EXPLORER_URL": "https://explorer.dogechain.dog/token/0xA649325Aa7C5093d12D6F98EB4378deAe68CE23F",
153
+ "SMART_CONTRACT_ADDRESS": "0xA649325Aa7C5093d12D6F98EB4378deAe68CE23F",
154
+ "LAUNCH_DATE": 1660780800,
155
+ "RETIRE_DATE": 1684627200,
156
+ "TRADING_AS": "BNB",
157
+ "DECIMALS": 18
158
+ },
159
+ {
160
+ "BLOCKCHAIN": "KAI",
161
+ "TOKEN_STANDARD": "ERC20",
162
+ "BRIDGE_OPERATOR": "MULTICHAIN",
163
+ "IS_ASSET_ISSUER": true,
164
+ "EXPLORER_URL": "https://explorer.kardiachain.io/token/0xB44a9B6905aF7c801311e8F4E76932ee959c663C",
165
+ "SMART_CONTRACT_ADDRESS": "0xB44a9B6905aF7c801311e8F4E76932ee959c663C",
166
+ "LAUNCH_DATE": 1656547200,
167
+ "RETIRE_DATE": 1684627200,
168
+ "TRADING_AS": "BNB",
169
+ "DECIMALS": 18
170
+ },
171
+ {
172
+ "BLOCKCHAIN": "FTM",
173
+ "TOKEN_STANDARD": "ERC20",
174
+ "BRIDGE_OPERATOR": "SPOOKYSWAP_BRIDGE",
175
+ "IS_ASSET_ISSUER": true,
176
+ "EXPLORER_URL": "https://ftmscan.com/token/0xd67de0e0a0fd7b15dc8348bb9be742f3c5850454",
177
+ "SMART_CONTRACT_ADDRESS": "0xd67de0e0a0fd7b15dc8348bb9be742f3c5850454",
178
+ "LAUNCH_DATE": 1620691200,
179
+ "TRADING_AS": "BNB",
180
+ "DECIMALS": 18
181
+ },
182
+ {
183
+ "BLOCKCHAIN": "ETH",
184
+ "TOKEN_STANDARD": "ERC20",
185
+ "BRIDGE_OPERATOR": "REN_BRIDGE",
186
+ "IS_ASSET_ISSUER": true,
187
+ "EXPLORER_URL": "https://etherscan.io/token/0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
188
+ "SMART_CONTRACT_ADDRESS": "0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
189
+ "LAUNCH_DATE": 1646092800,
190
+ "TRADING_AS": "RENBNB",
191
+ "DECIMALS": 18,
192
+ "IS_INHERITED": true
193
+ },
194
+ {
195
+ "BLOCKCHAIN": "FTM",
196
+ "TOKEN_STANDARD": "ERC20",
197
+ "BRIDGE_OPERATOR": "REN_BRIDGE",
198
+ "IS_ASSET_ISSUER": true,
199
+ "EXPLORER_URL": "https://ftmscan.com/token/0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
200
+ "SMART_CONTRACT_ADDRESS": "0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
201
+ "LAUNCH_DATE": 1656979200,
202
+ "TRADING_AS": "RENBNB",
203
+ "DECIMALS": 18,
204
+ "IS_INHERITED": true
205
+ },
206
+ {
207
+ "BLOCKCHAIN": "MATIC",
208
+ "TOKEN_STANDARD": "ERC20",
209
+ "BRIDGE_OPERATOR": "REN_BRIDGE",
210
+ "IS_ASSET_ISSUER": true,
211
+ "EXPLORER_URL": "https://polygonscan.com/token/0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
212
+ "SMART_CONTRACT_ADDRESS": "0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
213
+ "LAUNCH_DATE": 1638144000,
214
+ "TRADING_AS": "RENBNB",
215
+ "DECIMALS": 18,
216
+ "IS_INHERITED": true
217
+ },
218
+ {
219
+ "BLOCKCHAIN": "AVAX",
220
+ "TOKEN_STANDARD": "ERC20",
221
+ "BRIDGE_OPERATOR": "REN_BRIDGE",
222
+ "IS_ASSET_ISSUER": true,
223
+ "EXPLORER_URL": "https://snowtrace.io/token/0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
224
+ "SMART_CONTRACT_ADDRESS": "0xb8f7762192C840A5E4A6661D5Fa2D4d103E1d16a",
225
+ "LAUNCH_DATE": 1638230400,
226
+ "TRADING_AS": "RENBNB",
227
+ "DECIMALS": 18,
228
+ "IS_INHERITED": true
229
+ }
230
+ ],
231
+ "ASSET_CUSTODIANS": [
232
+ {
233
+ "NAME": "FIREBLOCKS"
234
+ },
235
+ {
236
+ "NAME": "BITGO"
237
+ },
238
+ {
239
+ "NAME": "MATRIXPORT"
240
+ },
241
+ {
242
+ "NAME": "CACTUS_CUSTODY"
243
+ },
244
+ {
245
+ "NAME": "COBO"
246
+ },
247
+ {
248
+ "NAME": "CYBAVO"
249
+ },
250
+ {
251
+ "NAME": "LEDGER_ENTERPRISE"
252
+ },
253
+ {
254
+ "NAME": "ETANA_CUSTODY"
255
+ },
256
+ {
257
+ "NAME": "BITCOIN_SUISSE"
258
+ },
259
+ {
260
+ "NAME": "COPPER"
261
+ }
262
+ ],
263
+ "CONTROLLED_ADDRESSES": null,
264
+ "ASSET_SECURITY_METRICS": [
265
+ {
266
+ "NAME": "CERTIK",
267
+ "OVERALL_SCORE": 92.11,
268
+ "OVERALL_RANK": 35,
269
+ "UPDATED_AT": 1718236800
270
+ }
271
+ ],
272
+ "SUPPLY_MAX": 100000000,
273
+ "SUPPLY_ISSUED": 202000000,
274
+ "SUPPLY_TOTAL": 147584208.501559,
275
+ "SUPPLY_CIRCULATING": 147584208.50155932,
276
+ "SUPPLY_FUTURE": 0,
277
+ "SUPPLY_LOCKED": 0,
278
+ "SUPPLY_BURNT": 54415791.498441,
279
+ "SUPPLY_STAKED": null,
280
+ "LAST_BLOCK_MINT": null,
281
+ "LAST_BLOCK_BURN": null,
282
+ "BURN_ADDRESSES": null,
283
+ "LOCKED_ADDRESSES": null,
284
+ "HAS_SMART_CONTRACT_CAPABILITIES": true,
285
+ "SMART_CONTRACT_SUPPORT_TYPE": "ADVANCED_EXECUTION_RIGHTS",
286
+ "TARGET_BLOCK_MINT": null,
287
+ "TARGET_BLOCK_TIME": null,
288
+ "LAST_BLOCK_NUMBER": 376559131,
289
+ "LAST_BLOCK_TIMESTAMP": null,
290
+ "LAST_BLOCK_TIME": null,
291
+ "LAST_BLOCK_SIZE": null,
292
+ "LAST_BLOCK_ISSUER": null,
293
+ "LAST_BLOCK_TRANSACTION_FEE_TOTAL": null,
294
+ "LAST_BLOCK_TRANSACTION_COUNT": null,
295
+ "LAST_BLOCK_HASHES_PER_SECOND": null,
296
+ "LAST_BLOCK_DIFFICULTY": null,
297
+ "SUPPORTED_STANDARDS": [
298
+ {
299
+ "NAME": "BEP2"
300
+ },
301
+ {
302
+ "NAME": "BEP20"
303
+ }
304
+ ],
305
+ "LAYER_TWO_SOLUTIONS": [
306
+ {
307
+ "NAME": "opBNB",
308
+ "WEBSITE_URL": "https://opbnb.bnbchain.org/en",
309
+ "DESCRIPTION": "Developing on opBNB, an optimistic rollup Layer 2 scaling solution for the BNB Smart Chain, is similar to building directly on the BNB Smart Chain itself. opBNB employs an Ethereum Virtual Machine (EVM) execution engine, which allows for easy migration of decentralized applications from Ethereum, BNB Smart Chain, Polygon, and other EVM-compatible chains with minimal code changes.\n\nThe platform scales the BNB Smart Chain by bundling transactions off-chain and using fraud proofs to ensure their validity, leading to significantly higher throughput compared to the underlying chain. This compatibility with the EVM means that any decentralized application (dApp), smart contract, or other application designed for the EVM can operate on opBNB with little to no modifications required.\n\nDevelopers can deploy the same applications on opBNB to benefit from Layer 2 scaling while maintaining the security features of the BNB Smart Chain. This offers the scalability and low costs associated with a rollup solution, combined with the robust security of a Layer 1 platform, providing an efficient environment for dApps to operate effectively.",
310
+ "CATEGORY": "ROLLUP"
311
+ },
312
+ {
313
+ "NAME": "Boba Network",
314
+ "WEBSITE_URL": "https://boba.network/",
315
+ "DESCRIPTION": "The Boba Network, functioning as a multichain Layer 2 optimistic rollup, seeks to harness the capabilities of rollup technology while facilitating interoperability between various blockchains and real-world applications. As a hybrid blockchain, it offers off-chain data and computational resources, making it suitable for the development of sophisticated applications geared towards widespread use. Fully compatible with EVM-based tools, the Boba Network has implemented multichain support for Ethereum, Avalanche, and BNB, providing a platform for rapid transactions and reduced fees.",
316
+ "CATEGORY": "ROLLUP"
317
+ }
318
+ ],
319
+ "PRIVACY_SOLUTIONS": null,
320
+ "CODE_REPOSITORIES": [
321
+ {
322
+ "URL": "https://github.com/binance-exchange"
323
+ },
324
+ {
325
+ "URL": "https://github.com/binance-exchange/binance-official-api-docs",
326
+ "OPEN_ISSUES": 2,
327
+ "CLOSED_ISSUES": 126,
328
+ "OPEN_PULL_REQUESTS": 0,
329
+ "CLOSED_PULL_REQUESTS": 126,
330
+ "CONTRIBUTORS": 0,
331
+ "FORKS": 2136,
332
+ "STARS": 3832,
333
+ "SUBSCRIBERS": 499,
334
+ "LAST_UPDATED_TS": 1690372964,
335
+ "LAST_PUSH_TS": 1682283934,
336
+ "CODE_SIZE_IN_BYTES": 1,
337
+ "IS_FORK": false,
338
+ "LANGUAGE": null,
339
+ "FORKED_ASSET_DATA": null
340
+ },
341
+ {
342
+ "URL": "https://github.com/binance-exchange/binance-api-node",
343
+ "OPEN_ISSUES": 1,
344
+ "CLOSED_ISSUES": 25,
345
+ "OPEN_PULL_REQUESTS": 0,
346
+ "CLOSED_PULL_REQUESTS": 25,
347
+ "CONTRIBUTORS": 102,
348
+ "FORKS": 176,
349
+ "STARS": 568,
350
+ "SUBSCRIBERS": 44,
351
+ "LAST_UPDATED_TS": 1690375176,
352
+ "LAST_PUSH_TS": 1686157630,
353
+ "CODE_SIZE_IN_BYTES": 739,
354
+ "IS_FORK": true,
355
+ "LANGUAGE": "JavaScript",
356
+ "FORKED_ASSET_DATA": null
357
+ },
358
+ {
359
+ "URL": "https://github.com/binance-exchange/go-binance",
360
+ "OPEN_ISSUES": 9,
361
+ "CLOSED_ISSUES": 10,
362
+ "OPEN_PULL_REQUESTS": 9,
363
+ "CLOSED_PULL_REQUESTS": 10,
364
+ "CONTRIBUTORS": 3,
365
+ "FORKS": 102,
366
+ "STARS": 214,
367
+ "SUBSCRIBERS": 22,
368
+ "LAST_UPDATED_TS": 1690375177,
369
+ "LAST_PUSH_TS": 1595796163,
370
+ "CODE_SIZE_IN_BYTES": 1599,
371
+ "IS_FORK": true,
372
+ "LANGUAGE": "Go",
373
+ "FORKED_ASSET_DATA": null
374
+ },
375
+ {
376
+ "URL": "https://github.com/binance-exchange/node-binance-api",
377
+ "OPEN_ISSUES": 18,
378
+ "CLOSED_ISSUES": 214,
379
+ "OPEN_PULL_REQUESTS": 0,
380
+ "CLOSED_PULL_REQUESTS": 109,
381
+ "CONTRIBUTORS": 82,
382
+ "FORKS": 150,
383
+ "STARS": 521,
384
+ "SUBSCRIBERS": 42,
385
+ "LAST_UPDATED_TS": 1690372966,
386
+ "LAST_PUSH_TS": 1682296247,
387
+ "CODE_SIZE_IN_BYTES": 1217,
388
+ "IS_FORK": true,
389
+ "LANGUAGE": "JavaScript",
390
+ "FORKED_ASSET_DATA": null
391
+ },
392
+ {
393
+ "URL": "https://github.com/binance-exchange/python-binance",
394
+ "OPEN_ISSUES": 4,
395
+ "CLOSED_ISSUES": 0,
396
+ "OPEN_PULL_REQUESTS": 4,
397
+ "CLOSED_PULL_REQUESTS": 0,
398
+ "CONTRIBUTORS": 21,
399
+ "FORKS": 182,
400
+ "STARS": 452,
401
+ "SUBSCRIBERS": 68,
402
+ "LAST_UPDATED_TS": 1690372967,
403
+ "LAST_PUSH_TS": 1531807102,
404
+ "CODE_SIZE_IN_BYTES": 347,
405
+ "IS_FORK": true,
406
+ "LANGUAGE": "Python",
407
+ "FORKED_ASSET_DATA": null
408
+ },
409
+ {
410
+ "URL": "https://github.com/binance-exchange/binance-java-api",
411
+ "OPEN_ISSUES": 154,
412
+ "CLOSED_ISSUES": 281,
413
+ "OPEN_PULL_REQUESTS": 41,
414
+ "CLOSED_PULL_REQUESTS": 97,
415
+ "CONTRIBUTORS": 43,
416
+ "FORKS": 640,
417
+ "STARS": 826,
418
+ "SUBSCRIBERS": 97,
419
+ "LAST_UPDATED_TS": 1690375177,
420
+ "LAST_PUSH_TS": 1686147366,
421
+ "CODE_SIZE_IN_BYTES": 440,
422
+ "IS_FORK": true,
423
+ "LANGUAGE": "Java",
424
+ "FORKED_ASSET_DATA": null
425
+ }
426
+ ],
427
+ "SUBREDDITS": [
428
+ {
429
+ "URL": "https://reddit.com/r/binance",
430
+ "MAKE_3RD_PARTY_REQUEST": true,
431
+ "NAME": "binance",
432
+ "CURRENT_ACTIVE_USERS": 43,
433
+ "AVERAGE_POSTS_PER_DAY": 0.22,
434
+ "AVERAGE_POSTS_PER_HOUR": 0.01,
435
+ "AVERAGE_COMMENTS_PER_DAY": 18.05,
436
+ "AVERAGE_COMMENTS_PER_HOUR": 0.75,
437
+ "SUBSCRIBERS": 904498,
438
+ "COMMUNITY_CREATED_AT": 1498873536,
439
+ "LAST_UPDATED_TS": 1718367530
440
+ }
441
+ ],
442
+ "TWITTER_ACCOUNTS": [
443
+ {
444
+ "URL": "https://twitter.com/binance",
445
+ "MAKE_3RD_PARTY_REQUEST": true,
446
+ "NAME": "Binance",
447
+ "USERNAME": "binance",
448
+ "VERIFIED": true,
449
+ "VERIFIED_TYPE": "business",
450
+ "FOLLOWING": 0,
451
+ "FOLLOWERS": 10858205,
452
+ "FAVOURITES": 0,
453
+ "LISTS": 29826,
454
+ "STATUSES": 29219,
455
+ "ACCOUNT_CREATED_AT": 1498120695,
456
+ "LAST_UPDATED_TS": 1698775503
457
+ }
458
+ ],
459
+ "DISCORD_SERVERS": [
460
+ {
461
+ "URL": "https://discord.com/invite/jE4wt8g2H2",
462
+ "MAKE_3RD_PARTY_REQUEST": false,
463
+ "NAME": "Binance",
464
+ "TOTAL_MEMBERS": 91925,
465
+ "CURRENT_ACTIVE_USERS": 7886,
466
+ "PREMIUM_SUBSCRIBERS": 25,
467
+ "LAST_UPDATED_TS": 1691075162
468
+ }
469
+ ],
470
+ "TELEGRAM_GROUPS": [
471
+ {
472
+ "URL": "https://t.me/BNBchaincommunity",
473
+ "MAKE_3RD_PARTY_REQUEST": false,
474
+ "NAME": "BNB Chain Community",
475
+ "USERNAME": "BNBchaincommunity",
476
+ "MEMBERS": 118577,
477
+ "LAST_UPDATED_TS": 1695279793
478
+ }
479
+ ],
480
+ "OTHER_SOCIAL_NETWORKS": [
481
+ {
482
+ "NAME": "FACEBOOK",
483
+ "URL": "https://www.facebook.com/binance"
484
+ },
485
+ {
486
+ "NAME": "INSTAGRAM",
487
+ "URL": "https://www.instagram.com/Binance/"
488
+ },
489
+ {
490
+ "NAME": "YOUTUBE",
491
+ "URL": "https://www.youtube.com/binanceyoutube"
492
+ },
493
+ {
494
+ "NAME": "LINKEDIN",
495
+ "URL": "https://www.linkedin.com/company/binance"
496
+ }
497
+ ],
498
+ "HELD_TOKEN_SALE": true,
499
+ "TOKEN_SALES": [
500
+ {
501
+ "TOKEN_SALE_TYPE": "ICO",
502
+ "TOKEN_SALE_DATE_START": 1498435200,
503
+ "TOKEN_SALE_DATE_END": 1499040000,
504
+ "TOKEN_SALE_DESCRIPTION": "Binance held its ICO on the 26th of June, with the ICO supply representing half of the total 200M token supply, thus selling 100,000,000 BNB tokens and raising $15,000,000. The ICO ended on the 3rd of July. The issue price was 1 ETH for 2,700 BNB or 1 BTC for 20,000 BNB (around 0.11 USD back then).",
505
+ "TOKEN_SALE_TEAM_MEMBERS": [
506
+ {
507
+ "TYPE": "EMPLOYEE",
508
+ "FULL_NAME": "Changpeng Zhao"
509
+ },
510
+ {
511
+ "TYPE": "EMPLOYEE",
512
+ "FULL_NAME": "Roger Wang"
513
+ },
514
+ {
515
+ "TYPE": "EMPLOYEE",
516
+ "FULL_NAME": "James Hofbauer"
517
+ },
518
+ {
519
+ "TYPE": "EMPLOYEE",
520
+ "FULL_NAME": "Paul Jankunas"
521
+ }
522
+ ],
523
+ "TOKEN_SALE_WEBSITE_URL": "https://www.binance.com/",
524
+ "TOKEN_SALE_SUPPLY": 100000000,
525
+ "TOKEN_SUPPLY_POST_SALE": "DECREASES",
526
+ "TOKEN_SALE_PAYMENT_METHOD_TYPE": "CRYPTO",
527
+ "TOKEN_SALE_START_PRICE": 0.15,
528
+ "TOKEN_SALE_START_PRICE_CURRENCY": "USD",
529
+ "TOKEN_SALE_FUNDS_RAISED": [
530
+ {
531
+ "CURRENCY": "BNB",
532
+ "TOTAL_VALUE": 100000000,
533
+ "DESCRIPTION": "Out of the total 200 million BNB token supply, 100 million BNB coins were sold during the ICO at a Binance ICO price of 2,700 BNB for 1 ETH"
534
+ }
535
+ ],
536
+ "TOKEN_SALE_FUNDS_RAISED_USD": 15000000,
537
+ "TOKEN_SALE_INVESTORS_SPLIT": [
538
+ {
539
+ "CATEGORY": "PUBLIC",
540
+ "TOTAL_TOKENS": 50000000
541
+ }
542
+ ],
543
+ "TOKEN_SALE_RESERVE_SPLIT": [
544
+ {
545
+ "CATEGORY": "TEAM",
546
+ "TOTAL_TOKENS": 80000000
547
+ },
548
+ {
549
+ "CATEGORY": "TEAM",
550
+ "TOTAL_TOKENS": 20000000
551
+ }
552
+ ],
553
+ "TOKEN_SALE_JURISDICTIONS": [
554
+ {
555
+ "NAME": "KY"
556
+ }
557
+ ],
558
+ "TOKEN_SALE_LEGAL_FORMS": [
559
+ {
560
+ "NAME": "CORPORATION"
561
+ }
562
+ ]
563
+ }
564
+ ],
565
+ "HELD_EQUITY_SALE": false,
566
+ "WEBSITE_URL": "https://www.binance.com/",
567
+ "BLOG_URL": "https://www.binance.com/en/blog",
568
+ "WHITE_PAPER_URL": "https://resources.cryptocompare.com/asset-management/8/1661250302524.pdf",
569
+ "OTHER_DOCUMENT_URLS": [
570
+ {
571
+ "TYPE": "TOKEN_ECONOMICS",
572
+ "VERSION": 1,
573
+ "URL": "https://resources.cryptocompare.com/asset-management/8/1664528054778.pdf",
574
+ "COMMENT": "\"Tokenomics Deep Dive\""
575
+ },
576
+ {
577
+ "TYPE": "AUDIT",
578
+ "URL": "https://resources.cryptocompare.com/asset-management/8/1702984453160.pdf",
579
+ "COMMENT": "Certik audit"
580
+ },
581
+ {
582
+ "TYPE": "AUDIT",
583
+ "URL": "https://resources.cryptocompare.com/asset-management/8/1702984652594.pdf",
584
+ "COMMENT": "Hacken audit"
585
+ },
586
+ {
587
+ "TYPE": "ROADMAP",
588
+ "URL": "https://resources.cryptocompare.com/asset-management/8/1703172228924.pdf",
589
+ "COMMENT": "Uploaded 21/12/2023"
590
+ },
591
+ {
592
+ "TYPE": "ROADMAP",
593
+ "URL": "https://resources.cryptocompare.com/asset-management/8/1703172721792.pdf",
594
+ "COMMENT": "BNB Chain Fusion Roadmap"
595
+ },
596
+ {
597
+ "TYPE": "ESG_REPORT",
598
+ "URL": "https://resources.cryptocompare.com/asset-management/8/1703174584333.pdf",
599
+ "COMMENT": "Governance of BSC"
600
+ },
601
+ {
602
+ "TYPE": "ESG_REPORT",
603
+ "URL": "https://resources.cryptocompare.com/asset-management/8/1703174851909.pdf",
604
+ "COMMENT": "Governance of BNB Beacon Chain"
605
+ }
606
+ ],
607
+ "EXPLORER_ADDRESSES": [
608
+ {
609
+ "URL": "https://explorer.bnbchain.org/"
610
+ },
611
+ {
612
+ "URL": "https://bscscan.com/"
613
+ },
614
+ {
615
+ "URL": "https://binance.mintscan.io/"
616
+ },
617
+ {
618
+ "URL": "https://explorer.bitquery.io/bsc"
619
+ },
620
+ {
621
+ "URL": "https://bsctrace.com/"
622
+ },
623
+ {
624
+ "URL": "https://www.oklink.com/bsc"
625
+ },
626
+ {
627
+ "URL": "https://getblock.io/explorers/bsc/"
628
+ },
629
+ {
630
+ "URL": "https://blockchair.com/bnb"
631
+ },
632
+ {
633
+ "URL": "https://bsc.tokenview.io/"
634
+ },
635
+ {
636
+ "URL": "https://bnb.dex.guru/"
637
+ }
638
+ ],
639
+ "ASSET_INDUSTRIES": [
640
+ {
641
+ "ASSET_INDUSTRY": "PLATFORM"
642
+ },
643
+ {
644
+ "ASSET_INDUSTRY": "BRIDGE_OPERATOR"
645
+ },
646
+ {
647
+ "ASSET_INDUSTRY": "PAYMENTS"
648
+ }
649
+ ],
650
+ "CONSENSUS_MECHANISMS": [
651
+ {
652
+ "NAME": "POS"
653
+ },
654
+ {
655
+ "NAME": "POA"
656
+ }
657
+ ],
658
+ "CONSENSUS_ALGORITHM_TYPES": [
659
+ {
660
+ "NAME": "Tendermint BFT",
661
+ "DESCRIPTION": "Binance Chain relies on the Tendermint BFT consensus and Delegated Proof of Stake (DPoS) with a dedicated application layer that runs upon it. As of today, the vote delegation feature is not open for users.\n\nBinance Chain is built on forks of Tendermint and Cosmos SDK. Specifically, Binance Chain is made on a revised edition of the Tendermint consensus while leveraging its P2P networking logic.\n\nAt any given state, the following information is being recorded:\n\n- Account and balances: the balance (i.e., the number of tokens) of each asset is composed of 3 different parts: locked, frozen, and available. It is recorded on all accounts.\n- Fees: it represents how much fees were paid in the previous block.\n- Token information: what are the tokens, along with their respective information (frozen supply, etc.)\n- Trading pairs: the list of all the trading pairs on Binance DEX.\n- Tick size and lot size: various information related to the trading engine of Binance DEX.\n- Governance information: information about the validators, and governance mechanism of the Binance Chain."
662
+ },
663
+ {
664
+ "NAME": "Proof-of-Staked Authority (PoSA)",
665
+ "DESCRIPTION": "The Binance Smart Chain combines several features from Delegated Proof-of-Stake (DPoS) and Proof-of-Authority (PoA) for consensus finding.\n\nAt its core, this consensus algorithm called Parlia is built on a network of 21 validators and delegators, who vote for validators.\n\nIn Binance Smart Chain, any party can attempt to become a validator, assuming they meet (1) the hardware requirement to run the network, (2) manage their own keys, (3) guarantee a high uptime and (4) own and stake at least 20,000 BNB. Similar to other DPoS blockchains, BSC validators receive network fees for validating blocks.\n\nAs of writing, the top 21 validators with the largest number of BNBs staked are selected every day and eligible to validate and produce blocks on the Binance Smart Chain. \n\nDelegators can vote for validators, allocating BNB to increase the validator\u2019s capacity to produce blocks, while receiving some of the rewards from network fees. This election is repeated every 24 hours. At the end of the period, the staking status decides what the top 21 highest nodes with votes to become the validator set for the next period are.\n\nIn addition, Binance Smart Chain introduces a slashing mechanism to prevent bad behaviour and other issues: e.g., prevent double signatures, penalties for being offline, etc.\n\nFor instance, BSC\u2019s slashing mechanism allows any individual to submit a \u201cslashing request\u201d on Binance Chain, assuming they are able to bring the proof that the malicious validator produced two block headers with the same height and parent block."
666
+ }
667
+ ],
668
+ "HASHING_ALGORITHM_TYPES": [
669
+ {
670
+ "NAME": "SHA_256"
671
+ }
672
+ ],
673
+ "PRICE_USD": 605.351392574596,
674
+ "PRICE_USD_SOURCE": "cadli",
675
+ "PRICE_USD_LAST_UPDATE_TS": 1718377245,
676
+ "MKT_CAP_PENALTY": 0,
677
+ "CIRCULATING_MKT_CAP_USD": 89340306138.43848,
678
+ "TOTAL_MKT_CAP_USD": 89340306138.43828,
679
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_DIRECT_USD": 5717.5208552127,
680
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_DIRECT_USD": 681557.540655213,
681
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_USD": 337790572.034656,
682
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD": 507742353.298955,
683
+ "SPOT_MOVING_24_HOUR_CHANGE_USD": 8.158248751072,
684
+ "SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD": 1.3660988635667999,
685
+ "TOPLIST_BASE_RANK": {
686
+ "LAUNCH_DATE": 4601,
687
+ "CIRCULATING_MKT_CAP_USD": 4,
688
+ "TOTAL_MKT_CAP_USD": 4,
689
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD": 8,
690
+ "SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD": 1037
691
+ },
692
+ "ASSET_DESCRIPTION": "## What is Binance Coin (BNB)?\nBinance Coin, known as BNB, is the cryptocurrency token that powers the BNB Chain ecosystem. Initially referred to as Binance Coin, it plays a central role in the functionalities of the Binance ecosystem, which includes the world's largest cryptocurrency exchange by volume. BNB operates as a utility token, allowing users to trade it like any other cryptocurrency. Furthermore, BNB is used in a variety of applications and use cases, extending its utility beyond mere trading. The Binance Chain, supporting BNB, uses a Byzantine Fault Tolerance (BFT) consensus mechanism for fast and efficient transaction processing.\n\nBinance is a cryptocurrency exchange platform. It offers a variety of services including cryptocurrency trading, digital asset management, and various blockchain-based offerings. Binance is known for supporting a wide array of cryptocurrencies for trading. The platform also provides features like crypto-to-crypto trading, staking, and an option for users to participate in initial coin offerings (ICOs) and token sales. The exchange is designed to cater to both beginner and experienced traders, offering a range of tools and functionalities tailored to different levels of expertise in the cryptocurrency market.\n\n## What is Binance Coin (BNB) used for?\nBNB was initially used mainly to pay for trading and transaction fees on the Binance cryptocurrency exchange. Over time, its utility has expanded significantly. Today, BNB is used in various applications within and outside the Binance ecosystem, showcasing its versatility as a utility token. The token's role in facilitating various transactions and activities within the Binance ecosystem has been a key factor in its widespread adoption and use. Additionally, the introduction of the Binance Smart Chain, a parallel blockchain, has enabled smart contract functionality and interoperability, further expanding BNB's use cases.\n\n## Who created Binance Coin (BNB)?\nBinance Coin (BNB) was founded in 2017 by Changpeng Zhao, a tech entrepreneur commonly referred to as CZ. He established BNB as the native utility token of the Binance exchange. The BNB Chain employs a unique combination of Proof of Stake (PoS) and Proof of Authority (PoA) consensus mechanisms to validate network transactions, contributing to the security and efficiency of the ecosystem.",
693
+ "ASSET_DESCRIPTION_SUMMARY": "Binance Coin (BNB) is a cryptocurrency token central to the Binance ecosystem, including the world's largest cryptocurrency exchange. Created by Changpeng Zhao in 2017, BNB has evolved from a tool for paying transaction fees on the Binance exchange to a widely used utility token in various applications. Its importance in the Binance ecosystem is underscored by its role in facilitating transactions and activities across the platform.",
694
+ "PROJECT_LEADERS": [
695
+ {
696
+ "LEADER_TYPE": "FOUNDER",
697
+ "FULL_NAME": "Changpeng Zhao"
698
+ },
699
+ {
700
+ "LEADER_TYPE": "FOUNDER",
701
+ "FULL_NAME": "Yi He"
702
+ }
703
+ ],
704
+ "ASSOCIATED_CONTACT_DETAILS": [
705
+ {
706
+ "CONTACT_MEDIUM": "EMAIL_ADDRESS"
707
+ }
708
+ ],
709
+ "SEO_TITLE": "Binance Coin (BNB)",
710
+ "SEO_DESCRIPTION": "Live Binance Coin price movements from all markets and BNB market cap, use our charts and see when there is an opportunity to buy or sell."
711
+ },
712
+ "Err": {}
713
+ }
src/knowledge_bases/data/coin_data/pepe.json ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Data": {
3
+ "ID": 3010,
4
+ "TYPE": "162",
5
+ "ID_LEGACY": 953245,
6
+ "ID_PARENT_ASSET": null,
7
+ "SYMBOL": "PEPE",
8
+ "URI": "pepe",
9
+ "ASSET_TYPE": "TOKEN",
10
+ "PARENT_ASSET_SYMBOL": null,
11
+ "CREATED_ON": 1683799924,
12
+ "UPDATED_ON": 1709050507,
13
+ "PUBLIC_NOTICE": null,
14
+ "NAME": "Pepe",
15
+ "LOGO_URL": "https://resources.cryptocompare.com/asset-management/3010/1709049889749.png",
16
+ "LAUNCH_DATE": 1681430400,
17
+ "PREVIOUS_ASSET_SYMBOLS": null,
18
+ "ASSET_ALTERNATIVE_IDS": [
19
+ {
20
+ "NAME": "CG",
21
+ "ID": "pepe"
22
+ },
23
+ {
24
+ "NAME": "CMC",
25
+ "ID": 24478
26
+ }
27
+ ],
28
+ "ASSET_DESCRIPTION_SNIPPET": "$PEPE is an ERC-20 token, known as the most memeable memecoin, embracing the internet meme Pepe's popularity. Unlike other meme-based cryptocurrencies, it launched stealthily without presale or taxes, aiming to be a coin for the people.",
29
+ "SUPPORTED_PLATFORMS": [
30
+ {
31
+ "BLOCKCHAIN": "ETH",
32
+ "TOKEN_STANDARD": "ERC20",
33
+ "BRIDGE_OPERATOR": "NATIVE_ASSET",
34
+ "IS_ASSET_ISSUER": true,
35
+ "EXPLORER_URL": "https://etherscan.io/token/0x6982508145454Ce325dDbE47a25d4ec3d2311933",
36
+ "SMART_CONTRACT_ADDRESS": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
37
+ "LAUNCH_DATE": 1681430400,
38
+ "TRADING_AS": "PEPE",
39
+ "DECIMALS": 18
40
+ }
41
+ ],
42
+ "ASSET_CUSTODIANS": null,
43
+ "CONTROLLED_ADDRESSES": null,
44
+ "ASSET_SECURITY_METRICS": [
45
+ {
46
+ "NAME": "CERTIK",
47
+ "OVERALL_SCORE": 86.87,
48
+ "OVERALL_RANK": 211,
49
+ "UPDATED_AT": 1718409600
50
+ }
51
+ ],
52
+ "SUPPLY_MAX": -1,
53
+ "SUPPLY_ISSUED": 420689899999995,
54
+ "SUPPLY_TOTAL": 420689899999995,
55
+ "SUPPLY_CIRCULATING": 420689899999995,
56
+ "SUPPLY_FUTURE": -1,
57
+ "SUPPLY_LOCKED": 0,
58
+ "SUPPLY_BURNT": 0,
59
+ "SUPPLY_STAKED": null,
60
+ "BURN_ADDRESSES": null,
61
+ "LOCKED_ADDRESSES": null,
62
+ "CODE_REPOSITORIES": null,
63
+ "SUBREDDITS": null,
64
+ "TWITTER_ACCOUNTS": [
65
+ {
66
+ "URL": "https://twitter.com/pepecoineth",
67
+ "NAME": "Pepe",
68
+ "USERNAME": "pepecoineth",
69
+ "FOLLOWING": 1,
70
+ "FOLLOWERS": 413507,
71
+ "FAVOURITES": 254,
72
+ "LISTS": 458,
73
+ "STATUSES": 407,
74
+ "ACCOUNT_CREATED_AT": 1680625027,
75
+ "LAST_UPDATED_TS": 1689344201
76
+ }
77
+ ],
78
+ "DISCORD_SERVERS": [
79
+ {
80
+ "URL": "https://discord.com/invite/pepe-palace",
81
+ "MAKE_3RD_PARTY_REQUEST": false,
82
+ "NAME": "\ud83d\udc38Pepe Palace\ud83d\udc38",
83
+ "TOTAL_MEMBERS": 16821,
84
+ "CURRENT_ACTIVE_USERS": 1262,
85
+ "PREMIUM_SUBSCRIBERS": 14,
86
+ "LAST_UPDATED_TS": 1688912388
87
+ }
88
+ ],
89
+ "TELEGRAM_GROUPS": [
90
+ {
91
+ "URL": "https://t.me/pepecoineth"
92
+ }
93
+ ],
94
+ "OTHER_SOCIAL_NETWORKS": null,
95
+ "HELD_TOKEN_SALE": false,
96
+ "HELD_EQUITY_SALE": false,
97
+ "WEBSITE_URL": "https://www.pepe.vip/",
98
+ "BLOG_URL": null,
99
+ "WHITE_PAPER_URL": null,
100
+ "OTHER_DOCUMENT_URLS": [
101
+ {
102
+ "TYPE": "ROADMAP",
103
+ "URL": "https://resources.cryptocompare.com/asset-management/3010/1683800472809.png"
104
+ },
105
+ {
106
+ "TYPE": "TOKEN_ECONOMICS",
107
+ "URL": "https://resources.cryptocompare.com/asset-management/3010/1683800517243.png"
108
+ },
109
+ {
110
+ "TYPE": "AUDIT",
111
+ "URL": "https://resources.cryptocompare.com/asset-management/3010/1699438872469.pdf",
112
+ "COMMENT": "Pepe-Token-Audit-Report 2023-08-21"
113
+ },
114
+ {
115
+ "TYPE": "AUDIT",
116
+ "URL": "https://resources.cryptocompare.com/asset-management/3010/1709050208378.pdf",
117
+ "COMMENT": "Certik audit"
118
+ }
119
+ ],
120
+ "ASSET_INDUSTRIES": [
121
+ {
122
+ "ASSET_INDUSTRY": "PLATFORM"
123
+ },
124
+ {
125
+ "ASSET_INDUSTRY": "PAYMENT"
126
+ },
127
+ {
128
+ "ASSET_INDUSTRY": "BRIDGE_OPERATOR"
129
+ }
130
+ ],
131
+ "PRICE_USD": 1.23046108057731e-05,
132
+ "PRICE_USD_SOURCE": "cadli",
133
+ "PRICE_USD_LAST_UPDATE_TS": 1718570876,
134
+ "MKT_CAP_PENALTY": null,
135
+ "CIRCULATING_MKT_CAP_USD": 5176425489.419543,
136
+ "TOTAL_MKT_CAP_USD": 5176425489.419543,
137
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_DIRECT_USD": 4732463.87575718,
138
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_DIRECT_USD": 15781091.0909223,
139
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_TOP_TIER_USD": 335538908.468033,
140
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD": 425993603.001758,
141
+ "SPOT_MOVING_24_HOUR_CHANGE_USD": 4.714449013124e-07,
142
+ "SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD": 3.9840977902175903,
143
+ "TOPLIST_BASE_RANK": {
144
+ "LAUNCH_DATE": 10706,
145
+ "CIRCULATING_MKT_CAP_USD": 23,
146
+ "TOTAL_MKT_CAP_USD": 38,
147
+ "SPOT_MOVING_24_HOUR_QUOTE_VOLUME_USD": 7,
148
+ "SPOT_MOVING_24_HOUR_CHANGE_PERCENTAGE_USD": 614
149
+ },
150
+ "ASSET_DESCRIPTION": "## What is Pepe (PEPE)?\n\nPepe (PEPE) is a digital currency positioned as the next step in the evolution of meme coins, leveraging the memetic power of Pepe, a recognizable internet meme. Launched without any presale or taxes, PEPE aims to be a coin for the people, with its liquidity provider tokens burned and contract renounced.\n\n## Who created Pepe?\n\nThe specific creator of Pepe (PEPE) is not mentioned, but it is clarified that it is not associated with Matt Furie or his creation Pepe the Frog. Instead, it pays homage to the meme character.\n\n## What is $PEPE used for?\n\nThe PEPE token serves as a meme coin with no intrinsic value or financial return expectation. It follows a roadmap with phases like getting listed on popular crypto platforms, community partnerships, launching Pepe Times newsletter, token-gated Discord group, and plans for Pepe merchandise and academy. PEPE is intended to be entirely useless and solely for entertainment purposes.",
151
+ "ASSET_DESCRIPTION_SUMMARY": "Pepe (PEPE) is a digital currency that positions itself as the next step in meme coin evolution, leveraging the memetic power of the internet meme Pepe. Launched without presale or taxes, it aims to be a coin for the people, with liquidity provider tokens burned and contract renounced. The token has a roadmap with different phases, including community partnerships, launching a digital newsletter, and getting listed on exchanges. However, it's important to note that PEPE is not associated with Pepe the Frog and is intended to be entirely useless and for entertainment purposes only.",
152
+ "PROJECT_LEADERS": null,
153
+ "ASSOCIATED_CONTACT_DETAILS": null,
154
+ "SEO_TITLE": "Pepe (PEPE)",
155
+ "SEO_DESCRIPTION": "Live Pepe price movements from all markets and PEPE market cap, use our charts and see when there is an opportunity to buy or sell."
156
+ },
157
+ "Err": {}
158
+ }
src/knowledge_bases/json_knowledge_base.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from phi.knowledge.json import JSONKnowledgeBase
2
+ from phi.vectordb.pgvector import PgVector2
3
+ from src.databases.postgres import sqlalchemy_engine
4
+
5
+ json_knowledge_base = JSONKnowledgeBase(
6
+ path="data/json",
7
+ # Table name: ai.json_documents
8
+ vector_db=PgVector2(
9
+ collection="json_documents",
10
+ db_engine=sqlalchemy_engine
11
+ ),
12
+ )
src/knowledge_bases/knowledge_base.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from phi.knowledge.combined import CombinedKnowledgeBase
2
+ from phi.vectordb.pgvector import PgVector2
3
+ from src.knowledge_bases.json_knowledge_base import json_knowledge_base
4
+ from src.databases.postgres import sqlalchemy_engine
5
+
6
+ knowledge_base = CombinedKnowledgeBase(
7
+ sources=[
8
+ json_knowledge_base,
9
+ # website_knowledge_base,
10
+ # local_pdf_knowledge_base,
11
+ ],
12
+ vector_db=PgVector2(
13
+ # Table name: ai.combined_documents
14
+ collection="combined_documents",
15
+ db_engine=sqlalchemy_engine
16
+ ),
17
+ )
src/knowledge_bases/store_data.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from src.data_sources.cryptocompare import CryptoCompare
2
+ from src.libs.helper_functions import store_json_data
3
+ from src.libs.logger import logger
4
+
5
+ ccp = CryptoCompare()
6
+
7
+ def store_coin_data(id: str):
8
+ result = ccp.get_overall_coin_data(symbol=id)
9
+ store_json_data(result, f"data/coin_data/{id}.json")
10
+ logger.debug(f"Data stored for {id}")
src/libs/constants.py CHANGED
@@ -1,15 +1,20 @@
1
  """
2
- Constants representing the nuumber of seconds in a week.
 
 
 
 
 
3
  """
4
  ONE_MONTH_IN_SECONDS : int = 86400 * 30
5
 
6
  """
7
- Constants representing the nuumber of seconds in a week.
8
  """
9
  ONE_WEEK_IN_SECONDS : int = 604800
10
 
11
  """
12
- Constants representing the nuumber of seconds in a day.
13
  """
14
  ONE_DAY_IN_SECONDS : int = 86400
15
 
@@ -24,36 +29,40 @@ Constant representing the number of seconds in one minute.
24
  ONE_MINUTE_IN_SECONDS : int = 60
25
 
26
  """
27
- DEX_SCREENER_BASE_URL : str = "https://api.dexscreener.com/latest/dex/"
28
-
29
  This constant is used to represent the base URL for DexScreener API.
30
- It is defined as "https://api.dexscreener.com/latest/dex/".
 
31
  """
32
  DEX_SCREENER_BASE_URL : str = "https://api.dexscreener.com/latest/dex/"
33
 
34
  """
35
- JINA_SEARCH_BASE_ENDPOINT : str = "https://s.jina.ai/"
36
-
37
  This constant is used to represent the base endpoint for Jina Search API.
38
- It is defined as "https://s.jina.ai/".
 
39
  """
40
  JINA_SEARCH_BASE_ENDPOINT : str = "https://s.jina.ai/"
41
 
42
  """
43
- JINA_READER_BASE_ENDPOINT : str = "https://r.jina.ai/"
44
-
45
  This constant is used to represent the base endpoint for Jina Reader API.
46
- It is defined as "https://r.jina.ai/".
 
47
  """
48
  JINA_READER_BASE_ENDPOINT : str = "https://r.jina.ai/"
49
 
50
  """
51
- CRYPTO_COMPARE_BASE_URL: str = "https://min-api.cryptocompare.com/"
52
-
53
  This constant is used to represent the base URL for CryptoCompare API.
54
- It is defined as "https://min-api.cryptocompare.com/".
 
 
 
 
 
 
 
 
 
55
  """
56
- CRYPTO_COMPARE_BASE_URL: str = "https://min-api.cryptocompare.com/"
57
 
58
 
59
  # TTLs
 
1
  """
2
+ Constants representing the number of seconds in a quarter.
3
+ """
4
+ ONE_QUARTER_IN_SECONDS : int = (86400 * 30) * 3
5
+
6
+ """
7
+ Constants representing the number of seconds in a month.
8
  """
9
  ONE_MONTH_IN_SECONDS : int = 86400 * 30
10
 
11
  """
12
+ Constants representing the number of seconds in a week.
13
  """
14
  ONE_WEEK_IN_SECONDS : int = 604800
15
 
16
  """
17
+ Constants representing the number of seconds in a day.
18
  """
19
  ONE_DAY_IN_SECONDS : int = 86400
20
 
 
29
  ONE_MINUTE_IN_SECONDS : int = 60
30
 
31
  """
 
 
32
  This constant is used to represent the base URL for DexScreener API.
33
+
34
+ DEX_SCREENER_BASE_URL : str
35
  """
36
  DEX_SCREENER_BASE_URL : str = "https://api.dexscreener.com/latest/dex/"
37
 
38
  """
 
 
39
  This constant is used to represent the base endpoint for Jina Search API.
40
+
41
+ JINA_SEARCH_BASE_ENDPOINT : str
42
  """
43
  JINA_SEARCH_BASE_ENDPOINT : str = "https://s.jina.ai/"
44
 
45
  """
 
 
46
  This constant is used to represent the base endpoint for Jina Reader API.
47
+
48
+ JINA_READER_BASE_ENDPOINT : str
49
  """
50
  JINA_READER_BASE_ENDPOINT : str = "https://r.jina.ai/"
51
 
52
  """
 
 
53
  This constant is used to represent the base URL for CryptoCompare API.
54
+
55
+ CRYPTO_COMPARE_BASE_URL: str
56
+ """
57
+ CRYPTO_COMPARE_API_BASE_URL: str = "https://min-api.cryptocompare.com/"
58
+
59
+
60
+ """
61
+ This constant is used to represent the base URL for CryptoCompare asset data API.
62
+
63
+ CRYPTO_COMPARE_ASSET_DATA_API_BASE_URL: str
64
  """
65
+ CRYPTO_COMPARE_ASSET_DATA_API_BASE_URL : str = "https://data-api.cryptocompare.com/asset/v1/"
66
 
67
 
68
  # TTLs
src/libs/helper_functions.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import re
2
  import uuid
3
  import hashlib
@@ -130,4 +131,19 @@ def convert_to_snakecase(original_data):
130
  elif isinstance(original_data, list):
131
  return [convert_to_snakecase(item) for item in original_data]
132
  else:
133
- raise TypeError("Input must be a dictionary or a list of dictionaries.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
  import re
3
  import uuid
4
  import hashlib
 
131
  elif isinstance(original_data, list):
132
  return [convert_to_snakecase(item) for item in original_data]
133
  else:
134
+ raise TypeError("Input must be a dictionary or a list of dictionaries.")
135
+
136
+ import json
137
+
138
+ def store_json_data(data, output_file):
139
+ try:
140
+ # Create directory if it doesn't exist
141
+ os.makedirs(os.path.dirname(output_file), exist_ok=True)
142
+
143
+ # Write the JSON data to a file
144
+ with open(output_file, 'w') as file:
145
+ json.dump(data, file, indent=4)
146
+
147
+ print(f"Data successfully stored in {output_file}")
148
+ except Exception as e:
149
+ print(f"An error occurred: {e}")
src/tools/coin_data_toolkit.py CHANGED
@@ -5,13 +5,18 @@ from phi.utils.log import logger
5
 
6
  from src.data_sources.coin_gecko import CoinGecko
7
  from src.data_sources.cryptocompare import CryptoCompare
 
8
 
9
  class CryptoDataTools(Toolkit):
10
  def __init__(self):
11
  super().__init__(name="crypto_data_tools")
 
12
  self.register(self.get_coin_price)
 
 
13
  self.coingecko = CoinGecko()
14
  self.crypto_compare = CryptoCompare()
 
15
 
16
  def get_coin_price(self, coin_id: str, vs_currency: str = "usd") -> str:
17
  """
@@ -51,10 +56,39 @@ class CryptoDataTools(Toolkit):
51
  else:
52
  logger.warning(f"Warning: CryptoCompare data for {coin_id} not found.")
53
 
54
- logger.debug(f"respons {coingecko_price}")
55
- logger.debug(f"respons {crypto_compare_price}")
56
 
57
  return f"{(coingecko_price, crypto_compare_price)}"
58
  except Exception as e:
59
  logger.warning(f"Failed to fetch price data for {coin_id}: {e}")
60
  return f"Error: {e}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  from src.data_sources.coin_gecko import CoinGecko
7
  from src.data_sources.cryptocompare import CryptoCompare
8
+ from src.data_sources.dexscreener import DexScreener
9
 
10
  class CryptoDataTools(Toolkit):
11
  def __init__(self):
12
  super().__init__(name="crypto_data_tools")
13
+
14
  self.register(self.get_coin_price)
15
+ self.register(self.get_coin_data)
16
+
17
  self.coingecko = CoinGecko()
18
  self.crypto_compare = CryptoCompare()
19
+ self.dex_screener = DexScreener()
20
 
21
  def get_coin_price(self, coin_id: str, vs_currency: str = "usd") -> str:
22
  """
 
56
  else:
57
  logger.warning(f"Warning: CryptoCompare data for {coin_id} not found.")
58
 
59
+ logger.debug(f"response {coingecko_price}")
60
+ logger.debug(f"response {crypto_compare_price}")
61
 
62
  return f"{(coingecko_price, crypto_compare_price)}"
63
  except Exception as e:
64
  logger.warning(f"Failed to fetch price data for {coin_id}: {e}")
65
  return f"Error: {e}"
66
+
67
+ def get_coin_data(self, coin_symbol: str) -> str:
68
+ """
69
+ Fetches coin data for a given cryptocurrency coin from DexScreener and CryptoCompare.
70
+
71
+ Args:
72
+ coin_symbol (str): The symbol for the cryptocurrency coin.
73
+
74
+ Returns:
75
+ str: A JSON string containing the coin data from DexScreener and CryptoCompare for the specified coin.
76
+
77
+ Raises:
78
+ Exception: If an error occurs while fetching the coin data.
79
+
80
+ Example:
81
+ >>> get_coin_data("BTC")
82
+ """
83
+ logger.info(f"Fetching coin data for {coin_symbol} cryptocurrency coin")
84
+ try:
85
+ dexscreener_coin_data = self.dex_screener.search(query=coin_symbol)
86
+ cryptocompare_coin_data = self.crypto_compare.get_overall_coin_data(symbol=coin_symbol)
87
+
88
+ logger.debug(f"dexscreener_coin_data: {dexscreener_coin_data}")
89
+ logger.debug(f"cryptocompare_coin_data: {cryptocompare_coin_data}")
90
+
91
+ return f"{(dexscreener_coin_data, cryptocompare_coin_data)}"
92
+ except Exception as e:
93
+ logger.warning(f"Failed to fetch coin data for {coin_symbol}: {e}")
94
+ return f"Error: {e}"