Skip to content

Latest commit

 

History

History
795 lines (561 loc) · 59.6 KB

File metadata and controls

795 lines (561 loc) · 59.6 KB

NFTDataAndHistoricalStatistics

(nftDataAndHistoricalStatistics)

Overview

Available Operations

getUserRankingByVolume

Users (top buyers/sellers) leaderboard. Calculated as traded worth for the period.

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getUserRankingByVolume({
    entity: "sellers",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetUserRankingByVolume } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetUserRankingByVolume.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetUserRankingByVolume(raribleProtocolMcp, {
    entity: "sellers",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetUserRankingByVolumeRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapUserVolumeRankingResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getCollectionRankingByVolume

Collections leaderboard by trade activity

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getCollectionRankingByVolume({});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetCollectionRankingByVolume } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetCollectionRankingByVolume.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetCollectionRankingByVolume(raribleProtocolMcp, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetCollectionRankingByVolumeRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapCollectionVolumeRankingResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getTransactions

Get historical statistics about Collection transactions

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getTransactions({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetTransactions } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetTransactions.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetTransactions(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetTransactionsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapStatsGraphResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getCollectionStats

Get general statistics about Collection

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getCollectionStats({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetCollectionStats } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetCollectionStats.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetCollectionStats(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetCollectionStatsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapGeneralStatsResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getCollectionStatistics

Get statistics about a collection

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getCollectionStatistics({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetCollectionStatistics } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetCollectionStatistics.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetCollectionStatistics(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetCollectionStatisticsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapCollectionStatisticsResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getSellers

Get historical statistics about Collection sellers

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getSellers({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetSellers } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetSellers.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetSellers(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetSellersRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapStatsGraphResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getGmv

Get historical statistics about Collection gross merchandise value

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getGmv({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetGmv } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetGmv.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetGmv(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetGmvRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapStatsGraphResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getFloorPrice

Get historical statistics about Collection's NFT floor price

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getFloorPrice({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetFloorPrice } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetFloorPrice.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetFloorPrice(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetFloorPriceRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapStatsGraphResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getBuyers

Get historical statistics about Collection buyers

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getBuyers({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetBuyers } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetBuyers.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetBuyers(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetBuyersRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapStatsGraphResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*

getListed

Get historical statistics of collection listed count

Example Usage

import { RaribleProtocolMcp } from "@rarible/protocol-mcp";

const raribleProtocolMcp = new RaribleProtocolMcp({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const result = await raribleProtocolMcp.nftDataAndHistoricalStatistics.getListed({
    collection: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { nftDataAndHistoricalStatisticsGetListed } from "@rarible/protocol-mcp/funcs/nftDataAndHistoricalStatisticsGetListed.js";

// Use `RaribleProtocolMcpCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raribleProtocolMcp = new RaribleProtocolMcpCore({
  apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});

async function run() {
  const res = await nftDataAndHistoricalStatisticsGetListed(raribleProtocolMcp, {
    collection: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.GetListedRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.OlapStatsGraphResponse>

Errors

Error Type Status Code Content Type
errors.OlapError 400, 404 application/json
errors.OlapError 500 application/json
errors.APIError 4XX, 5XX */*