mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
fixing crypto nft integration bug (#2639)
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
This commit is contained in:
@@ -52,6 +52,9 @@ def get_collection_stats(slug: str) -> pd.DataFrame:
|
||||
"Creation Date",
|
||||
"URL",
|
||||
]
|
||||
# T his variable is here because sometimes the created dates also have
|
||||
# milliseconds in the string and we dont it, so this just gets the m,d,y,h,m,s
|
||||
created_date = collection["created_date"][0:19]
|
||||
values = [
|
||||
collection["name"],
|
||||
"-" if not stats["floor_price"] else float(stats["floor_price"]),
|
||||
@@ -69,9 +72,7 @@ def get_collection_stats(slug: str) -> pd.DataFrame:
|
||||
round(float(stats["total_supply"]), 2),
|
||||
round(float(stats["total_sales"]), 2),
|
||||
round(float(stats["total_volume"]), 2),
|
||||
datetime.strptime(
|
||||
collection["created_date"], "%Y-%m-%dT%H:%M:%S.%f"
|
||||
).strftime("%b %d, %Y"),
|
||||
datetime.strptime(created_date, "%Y-%m-%dT%H:%M:%S").strftime("%b %d, %Y"),
|
||||
"-" if not collection["external_url"] else collection["external_url"],
|
||||
]
|
||||
df = pd.DataFrame({"Metric": metrics, "Value": values})
|
||||
|
||||
Reference in New Issue
Block a user