【问题标题】:Retrieving Orders With Opensea API Blocks me Through Cloudflare使用 Opensea API 检索订单让我无法通过 Cloudflare
【发布时间】:2021-12-31 04:25:42
【问题描述】:

我尝试获取集合中列出的所有待售物品的 ID。 我尝试使用循环和 api 来执行此操作,如 in the documentation 所述。

问题是,当我定义合同和 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" />

【问题讨论】:

  • 所以你现在需要一个 api 密钥来获取买/卖订单。
  • 确实如此。你可以要求一个。它们现在相对较快

标签: javascript ethereum opensea


【解决方案1】:

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 1970-01-01
  • 2022-12-29
  • 1970-01-01
  • 2017-12-30
  • 2022-10-18
  • 2019-10-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多