Transactions

如何將交易導出到 CSV 文件

  • August 16, 2021

有沒有一種簡單的方法可以將與特定賬戶/智能合約相關的所有交易導出為 CSV 或其他純文字格式?

或者您可以簡單地使用 etherscan API 和 Json to CSV 線上服務。

使用API​​,即:https ://api.etherscan.io/api?module=account&action=txlist&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae&sort=asc並將其放在http://www.convertcsv.com/json-to-csv的URL欄位中。 htm

你去吧。

這是有關如何將乙太坊數據導出到 csv 的指南https://medium.com/@medvedev1088/exporting-and-analyzing-ethereum-blockchain-f5353414a94e

它使用https://github.com/medvedev1088/ethereum-etl將數據輸出到blocks.csv, transactions.csv, erc20_transfers.csv.

blocks.csv

Column                  | Type               |
------------------------|---------------------
block_number            | bigint             |
block_hash              | hex_string         |
block_parent_hash       | hex_string         |
block_nonce             | hex_string         |
block_sha3_uncles       | hex_string         |
block_logs_bloom        | hex_string         |
block_transactions_root | hex_string         |
block_state_root        | hex_string         |
block_miner             | hex_string         |
block_difficulty        | bigint             |
block_total_difficulty  | bigint             |
block_size              | bigint             |
block_extra_data        | hex_string         |
block_gas_limit         | bigint             |
block_gas_used          | bigint             |
block_timestamp         | bigint             |
block_transaction_count | bigint             |

transactions.csv

Column              |    Type     |
--------------------|--------------
tx_hash             | hex_string  |
tx_nonce            | bigint      |
tx_block_hash       | hex_string  |
tx_block_number     | bigint      |
tx_index            | bigint      |
tx_from             | hex_string  |
tx_to               | hex_string  |
tx_value            | bigint      |
tx_gas              | bigint      |
tx_gas_price        | bigint      |
tx_input            | hex_string  |

erc20_transfers.csv

Column              |    Type     |
--------------------|--------------
erc20_token         | hex_string  |
erc20_from          | hex_string  |
erc20_to            | hex_string  |
erc20_value         | bigint      |
erc20_tx_hash       | hex_string  |
erc20_block_number  | bigint      |

引用自:https://ethereum.stackexchange.com/questions/3536