(collectionStatistics)
- getGlobalCollectionStatistics - Get global (period-independent) statistics by collection ID
- getGlobalCollectionStatisticsByIds - Get global (period-independent) statistics by collection IDs
- getPeriodCollectionStatistics - Get period-based statistics by collection ID
- getPeriodCollectionStatisticsByIds - Get period-based statistics by collection IDs
- getOwners - Get distribution of the number of owned items by owner
- getBidsByPrice - Get distribution of the number of bids by price
Global collection statistics by ID
import { RaribleProtocolMcp } from "@rarible/protocol-mcp";
const raribleProtocolMcp = new RaribleProtocolMcp({
apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});
async function run() {
const result = await raribleProtocolMcp.collectionStatistics.getGlobalCollectionStatistics({
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
});
// Handle the result
console.log(result);
}
run();The standalone function version of this method:
import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { collectionStatisticsGetGlobalCollectionStatistics } from "@rarible/protocol-mcp/funcs/collectionStatisticsGetGlobalCollectionStatistics.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 collectionStatisticsGetGlobalCollectionStatistics(raribleProtocolMcp, {
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetGlobalCollectionStatisticsRequest | ✔️ | 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. |
Promise<models.OlapGlobalCollectionStatisticsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.OlapError | 400 | application/json |
| errors.OlapError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Global collection statistics by IDs
import { RaribleProtocolMcp } from "@rarible/protocol-mcp";
const raribleProtocolMcp = new RaribleProtocolMcp({
apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});
async function run() {
const result = await raribleProtocolMcp.collectionStatistics.getGlobalCollectionStatisticsByIds([
"ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
]);
// Handle the result
console.log(result);
}
run();The standalone function version of this method:
import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { collectionStatisticsGetGlobalCollectionStatisticsByIds } from "@rarible/protocol-mcp/funcs/collectionStatisticsGetGlobalCollectionStatisticsByIds.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 collectionStatisticsGetGlobalCollectionStatisticsByIds(raribleProtocolMcp, [
"ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
]);
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
string[] | ✔️ | 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. |
Promise<models.OlapGlobalCollectionStatisticsResponse[]>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.OlapError | 400 | application/json |
| errors.OlapError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Period-based collection statistics by ID
import { RaribleProtocolMcp } from "@rarible/protocol-mcp";
const raribleProtocolMcp = new RaribleProtocolMcp({
apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});
async function run() {
const result = await raribleProtocolMcp.collectionStatistics.getPeriodCollectionStatistics({
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
period: "D1",
});
// Handle the result
console.log(result);
}
run();The standalone function version of this method:
import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { collectionStatisticsGetPeriodCollectionStatistics } from "@rarible/protocol-mcp/funcs/collectionStatisticsGetPeriodCollectionStatistics.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 collectionStatisticsGetPeriodCollectionStatistics(raribleProtocolMcp, {
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
period: "D1",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetPeriodCollectionStatisticsRequest | ✔️ | 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. |
Promise<models.OlapPeriodCollectionStatisticsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.OlapError | 400 | application/json |
| errors.OlapError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Period-based collection statistics by IDs
import { RaribleProtocolMcp } from "@rarible/protocol-mcp";
const raribleProtocolMcp = new RaribleProtocolMcp({
apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});
async function run() {
const result = await raribleProtocolMcp.collectionStatistics.getPeriodCollectionStatisticsByIds({
collectionIds: [
"<value 1>",
"<value 2>",
],
period: "MIN30",
});
// Handle the result
console.log(result);
}
run();The standalone function version of this method:
import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { collectionStatisticsGetPeriodCollectionStatisticsByIds } from "@rarible/protocol-mcp/funcs/collectionStatisticsGetPeriodCollectionStatisticsByIds.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 collectionStatisticsGetPeriodCollectionStatisticsByIds(raribleProtocolMcp, {
collectionIds: [
"<value 1>",
"<value 2>",
],
period: "MIN30",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.OlapPeriodCollectionsByIdsStatisticsRequest | ✔️ | 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. |
Promise<models.OlapPeriodCollectionStatisticsResponse[]>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.OlapError | 400 | application/json |
| errors.OlapError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Returns list of owners of items in the collection along with the number of owned items
import { RaribleProtocolMcp } from "@rarible/protocol-mcp";
const raribleProtocolMcp = new RaribleProtocolMcp({
apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});
async function run() {
const result = await raribleProtocolMcp.collectionStatistics.getOwners({
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
});
// Handle the result
console.log(result);
}
run();The standalone function version of this method:
import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { collectionStatisticsGetOwners } from "@rarible/protocol-mcp/funcs/collectionStatisticsGetOwners.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 collectionStatisticsGetOwners(raribleProtocolMcp, {
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetOwnersRequest | ✔️ | 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. |
Promise<models.OlapOwnerStatistics>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.OlapError | 400, 404 | application/json |
| errors.OlapError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Returns list of bid prices with number of bids and bidders
import { RaribleProtocolMcp } from "@rarible/protocol-mcp";
const raribleProtocolMcp = new RaribleProtocolMcp({
apiKeyAuth: process.env["RARIBLE_API_KEY"] ?? "",
});
async function run() {
const result = await raribleProtocolMcp.collectionStatistics.getBidsByPrice({
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
});
// Handle the result
console.log(result);
}
run();The standalone function version of this method:
import { RaribleProtocolMcpCore } from "@rarible/protocol-mcp/core.js";
import { collectionStatisticsGetBidsByPrice } from "@rarible/protocol-mcp/funcs/collectionStatisticsGetBidsByPrice.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 collectionStatisticsGetBidsByPrice(raribleProtocolMcp, {
id: "ETHEREUM:0xb66a603f4cfe17e3d27b87a8bfcad319856518b8",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetBidsByPriceRequest | ✔️ | 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. |
Promise<models.OlapBidsByPriceStatistics>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.OlapError | 400, 404 | application/json |
| errors.OlapError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |