简体   繁体   English

Binance BSC logs API 请求数据失败

[英]Binance BSC logs API request data failed

I am submitting a request for data from the Binanance API as follows:我正在向 Binanance API 提交数据请求,如下所示:

https://api.bscscan.com/api
    ?module=logs
    &action=getLogs
    &fromblock=24726622
    &toBlock=24726632
    &address=0x94084b7a8d80b2c3cc0dccd87cb6ae3cc67d364d
    &topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
    &apikey=JRYDR6FBWRKY5C8NMZJKFB8GEP1QHFQJQT

However, I can't get any data from this URL. I have double-checked, and I know that the parameters are correct.但是,我从这个URL上取不到任何数据。我仔细检查过,我知道参数是正确的。

Here is an example of using Binanace's API, which works well:下面是一个使用 Binanace 的 API 的例子,效果很好:

https://api.bscscan.com/api
   ?module=logs
   &action=getLogs
   &fromBlock=4993830
   &toBlock=4993832
   &address=0xe561479bebee0e606c19bb1973fc4761613e3c42
   &topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
   &apikey=YourApiKeyToken

Why is that working but mine not working?为什么那行得通,而我的行不通?

I would highly suggest using Postman , which you can use to quickly test requests.我强烈建议使用Postman ,您可以使用它来快速测试请求。 I ran your request, with api-key, through Postman and was able to get a 200 response with data.我使用 api 密钥通过 Postman 运行了您的请求,并且能够获得包含数据的 200 响应。 See this screenshot.请参阅此屏幕截图。

Please note I blanked out the api key value.请注意,我删除了 api 键值。 I suggest you do the same in your post unless its fake.我建议你在你的帖子中做同样的事情,除非它是假的。

I had to remove the line breaks in the code you pasted.我不得不删除您粘贴的代码中的换行符。 Could this possibly be the issue?这可能是问题所在吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM