分享 W 币用户持有者向 Binance 的转账分析

aaa · 2024年06月24日 · 68 次阅读

Wormhole 最近推出了质押。许多用户开始往 Binance 转入 W,这篇文章分析了最近一周的往币安转入的记录。 发现最少的也往里面转了 500560000 个 W 在币安,下面将给出图表。 f9e0bc36e74ecb6a6247a7c7303cd9bc.png 这张图可以看出,币的数量集中在 0.050 到 1.024 的范围,后面的人数将持续减少。 这张表是通过vybenetwork的 api 以及一些 python 分析得到的。 使用vybenetwork

import requests
import pandas as pd
from collections import defaultdict
import matplotlib.pyplot as plt

url = "https://api.vybenetwork.xyz/token/transfers?mintAddress=85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ&receiverAddress=5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9&timeStart=1717998402&timeEnd=1718603202"

headers = {
"accept": "application/json",
"X-API-KEY": "YOUR-API-KEY"
}

response = requests.get(url, headers=headers)
data = response.json()

transactions = data["transactions"]
sorted_transactions = sorted(transactions, key=lambda x: x["amount"], reverse=True)
merged_transactions = defaultdict(lambda: {'amount': 0, 'receiverAddress': None})
for transaction in sorted_transactions:
sender = transaction["senderAddress"]
amount = transaction["amount"]
receiver = transaction["receiverAddress"]
merged_transactions[sender]["amount"] += amount
merged_transactions[sender]["receiverAddress"] = receiver
result = pd.DataFrame([
{"senderAddress": sender, "amount": data["amount"], "receiverAddress": data["receiverAddress"]}
for sender, data in merged_transactions.items()
])
result = result.sort_values(by="amount", ascending=False)
result.to_csv("sorted_transactions.csv", index=False)

print(result)

另外通过得到sorted_transactions.csv得到柱状图代码如下

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

file_path = 'sorted_transactions.csv' 

data = pd.read_csv(file_path)
prices = data['amount']
min_price = prices.min()
max_price = prices.max()
num_bins = 20
bins = np.linspace(min_price, max_price, num_bins + 1)
hist, bin_edges = np.histogram(prices, bins)
plt.figure(figsize=(10, 6))
bars = plt.bar(bin_edges[:-1], hist, width=np.diff(bin_edges), edgecolor="black", align="edge")

for bar, count in zip(bars, hist):
height = bar.get_height()
plt.text(bar.get_x() + bar.get_width() / 2, height, str(count), ha='center', va='bottom')

plt.xlabel('price')
plt.ylabel('people')
plt.title('people distribution of every price bin')
plt.xticks(bin_edges, rotation=45)
plt.grid(axis='y')
plt.savefig('chart_of_sorted_distribution2.png')

plt.show()
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号