2

我尝试获取集合中列出的所有待售物品的 ID。我尝试按照文档中的说明使用循环和 api 来做到这一点。

问题是,当我定义合同和 item_id 时,我总是收到 cloudflare 阻止我的错误。即使我从不同的设备和网络尝试,问题仍然存在。同时检索一般资产信息也适用于 api 的其他命令。

我做错了什么还是这是opensea的问题?

const options = {method: 'GET', headers: {Accept: 'application/json'}};

fetch('https://api.opensea.io/wyvern/v1/orders?asset_contract_address=0xbd3531da5cf5857e7cfaa92426877b022e612cf8&bundled=false&include_bundled=false&include_invalid=false&token_id=3881&limit=20&offset=0&order_by=created_date&order_direction=desc', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Access denied | api.opensea.io used Cloudflare to restrict access</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/main.css" type="text/css" media="screen,projection" />

4

1 回答 1

0

对于任何寻找它的人来说,这似乎是一个公海问题。

https://github.com/ProjectOpenSea/opensea-js/issues/245 https://twitter.com/apiopensea/status/1461135305193443334

于 2021-11-21T01:33:23.157 回答