Opensea Unofficial API

Deno Opensea Unofficial Version

Usage

import { query } from "https://raw.githubusercontent.com/0x2faced/opensea-unofficial/main/opensea.ts";

// specific version
// import { query } from "https://raw.githubusercontent.com/0x2faced/opensea-unofficial/0.1.0/opensea.ts";

const { query: { search } } = await query("AssetSearchQuery", {
  collection: "ujin",
  collectionQuery: null,
  collectionSortBy: "SEVEN_DAY_VOLUME",
  collections: [
    "ujin",
  ],
  count: 32,
  resultModel: "ASSETS",
  showContextMenu: true,
  shouldShowQuantity: false,
  sortAscending: false,
  sortBy: "CREATED_DATE",
});

console.log(search); // show your opensea list

with Proxy

const client = Deno.createHttpClient({/* ... */});

const { query: { search } } = await query({
  id: "AssetSearchQuery",
  variables: {
    collection: "ujin",
    collectionQuery: null,
    collectionSortBy: "SEVEN_DAY_VOLUME",
    collections: [
      "ujin",
    ],
    count: 32,
    resultModel: "ASSETS",
    showContextMenu: true,
    shouldShowQuantity: false,
    sortAscending: false,
    sortBy: "CREATED_DATE",
  },
  // type of init => second fetch parameters
  init: {
    client,
  },
});