【问题标题】:Retrieve transaction details as shown on bscscan检索 bscscan 上显示的事务详细信息
【发布时间】:2022-08-05 18:04:45
【问题描述】:

我正在尝试使用 Bscscan api 检索有关 bsc 交易的信息,但它似乎非常有限。

endpoint = \"https://api.bscscan.com/api\"\\
   \"?module=account\"\\
   \"&action=txlistinternal\"\\
   \"&txhash={}\"\\
   \"&apikey={}\"

发送 GET 请求后,这是我得到的:

{\'status\': \'1\', \'message\': \'OK\', \'result\': [{\'blockNumber\': \'19952739\', \'timeStamp\' :\'1659033895 \',\'from \':\'0x0000000000000000000000000000000000000000000000001000 \',\'to \':\'0x000000000000000000000000000000000000000000000000000000000000000000000000DEAD CONTEM '\', \'input\': \'\', \'type\': \'call\', \'gas\': \'2300\', \'gasUsed\': \'0\' , \'isError\': \'0\', \'errCode\': \'\'}]}

但是,在 bscscan 上有更多信息并且已经解码,那么有没有办法检索信息,如 bscscan 所示?

  • 来自 api 的 BSC 数据被截断。我发现使用站点上的 \'download csv\' 选项更有用
  • 是否可以下载单个交易的 csv?
  • 我会使用 BeautifulSoup 并解析 html 以进行单一交易。您还可以考虑使用 web3 lib

标签: python api binance binance-smart-chain bscscan


【解决方案1】:

从 BSC 扫描 api 中使用它,几天前我遇到同样的问题时发现了它。填写参数如下 你的地址= 0x........ 你的 API= 你的 api 密钥 https://api.bscscan.com/api?module=account&action=txlist&address=YOUR_ADDRESS&startblock=0&endblock=99999999&page=0&offset=1&sort=asc&apikey=API_KEY

【讨论】:

    猜你喜欢
    • 2016-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-10
    • 1970-01-01
    • 2017-12-10
    相关资源
    最近更新 更多