質問編集履歴

2

抽出時のコードを追加しました。

2019/02/08 08:13

投稿

nishina5
nishina5

スコア19

test CHANGED
File without changes
test CHANGED
@@ -75,3 +75,59 @@
75
75
 
76
76
 
77
77
  ```
78
+
79
+
80
+
81
+ ※抽出じのコードです。
82
+
83
+ ```
84
+
85
+ from etherscan import accounts
86
+
87
+ import pandas as pd
88
+
89
+ import datetime as dt
90
+
91
+ API_KEY = 'API_KEY' # change API_KEY
92
+
93
+ ADDRESS = 'ADDRESS' # change address
94
+
95
+
96
+
97
+ def get_tx_value(page_no, address, api_key):
98
+
99
+ ac = accounts.Account(address=address,api_key=api_key)
100
+
101
+ # txes = ac.get_all_transactions()
102
+
103
+ txes = ac.get_transaction_page(page_no)
104
+
105
+
106
+
107
+ ret = []
108
+
109
+ for t in txes:
110
+
111
+ tmp = []
112
+
113
+ tmp.append(t.get('from'))
114
+
115
+ tmp.append(t.get('to'))
116
+
117
+ tmp.append(int(t.get('value')) / 1000000000000000000 )
118
+
119
+ tmp.append(dt.datetime.fromtimestamp(int(t.get('timeStamp'))))
120
+
121
+ ret.append(tmp)
122
+
123
+ return ret
124
+
125
+
126
+
127
+ ret = get_tx_value(page_no=1, address=ADDRESS,api_key=API_KEY)
128
+
129
+ df = pd.DataFrame(ret,columns=['from','to','value','datetime'])
130
+
131
+ df.to_csv('txes.tsv',sep='\t')
132
+
133
+ ```

1

tsv データを追記致しました。

2019/02/08 08:13

投稿

nishina5
nishina5

スコア19

test CHANGED
File without changes
test CHANGED
@@ -21,3 +21,57 @@
21
21
 
22
22
 
23
23
  また、現状pythonでtsv出力していますが、もし出力せずにそのままpython上でグラフ化できるようであればその方法も教えていただけると嬉しいです。
24
+
25
+
26
+
27
+ ```
28
+
29
+ from to value datetime
30
+
31
+ 0 0x4e6f10ed3b919cbbd872807f866ded9acdf7eede 0.0 2019-01-08 10:28:22
32
+
33
+ 1 0x5a4d185c590c5815a070ed62c278e665d137a0d9 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 02:00:23
34
+
35
+ 2 0x5a4d185c590c5815a070ed62c278e665d137a0d9 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 07:12:22
36
+
37
+ 3 0x5a4d185c590c5815a070ed62c278e665d137a0d9 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 07:13:43
38
+
39
+ 4 0x5a4d185c590c5815a070ed62c278e665d137a0d9 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 07:39:11
40
+
41
+ 5 0x7efee171ed6e9fd40dff6d7beaeba006d05ba559 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:12:38
42
+
43
+ 6 0x31cdabb1a0b18dd9326f150f352ab2b4597d2bab 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:14:46
44
+
45
+ 7 0x6d603b234a927af2226c0688ad5f8ee7399e984c 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:16:14
46
+
47
+ 8 0x6d603b234a927af2226c0688ad5f8ee7399e984c 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:16:58
48
+
49
+ 9 0xcecddbe88359f6ecebe90b42643b002543f27fe9 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:19:33
50
+
51
+ 10 0x3cd673f4b8e7815f4862222ef0786241f952aeae 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:21:24
52
+
53
+ 11 0x3cd673f4b8e7815f4862222ef0786241f952aeae 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:21:32
54
+
55
+ 12 0x3cd673f4b8e7815f4862222ef0786241f952aeae 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:22:05
56
+
57
+ 13 0x02632569d858370906ac6116b0ae25059fb34a82 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.216 2019-01-11 08:22:05
58
+
59
+ 14 0x3cd673f4b8e7815f4862222ef0786241f952aeae 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:22:22
60
+
61
+ 15 0x3c5f0629535c755453ad88ef1fd433022f9d306a 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:23:32
62
+
63
+ 16 0xbae25a69a6eb7341ee834be7635e247e22a1e57a 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:25:05
64
+
65
+ 17 0xde9fcd2c2d0f20699b6f08cc4d449499271d8f18 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:25:09
66
+
67
+ 18 0x862244eeca0c73925b5a4daa14815fb81f499c93 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:26:08
68
+
69
+ 19 0xc35a5fec6be6957899e15559be252db882220b37 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:27:17
70
+
71
+ 20 0xcc55a426d4221d299a4586aaa0cef6e5c12783a4 0x6cb4ad504816bd3021ae48286f018ac725239b89 0.024 2019-01-11 08:27:17
72
+
73
+
74
+
75
+
76
+
77
+ ```