diff --git a/.changeset/slimy-berries-fry.md b/.changeset/slimy-berries-fry.md new file mode 100644 index 0000000000..1e8b7f803a --- /dev/null +++ b/.changeset/slimy-berries-fry.md @@ -0,0 +1,7 @@ +--- +'@moralisweb3/common-evm-utils': patch +'@moralisweb3/evm-api': patch +'moralis': patch +--- + +Added a new method to the EVM API: `getNFTTradesByToken`. diff --git a/packages/common/evmUtils/generator.config.json b/packages/common/evmUtils/generator.config.json index c13a21e687..b263253572 100644 --- a/packages/common/evmUtils/generator.config.json +++ b/packages/common/evmUtils/generator.config.json @@ -131,7 +131,8 @@ "getDefiPositionsSummary", "getWalletProfitabilitySummary", "getWalletProfitability", - "getTopProfitableWalletPerToken" + "getTopProfitableWalletPerToken", + "getNFTTradesByToken" ] } } diff --git a/packages/common/evmUtils/src/generated/client/abstractClient.ts b/packages/common/evmUtils/src/generated/client/abstractClient.ts index adb2aa0304..25d68e844a 100644 --- a/packages/common/evmUtils/src/generated/client/abstractClient.ts +++ b/packages/common/evmUtils/src/generated/client/abstractClient.ts @@ -1,5 +1,6 @@ import { GetNFTTradesOperation, GetNFTTradesOperationRequest, GetNFTTradesOperationRequestJSON } from '../operations/GetNFTTradesOperation'; import { EvmTradeCollection, EvmTradeCollectionJSON } from '../types/EvmTradeCollection'; +import { GetNFTTradesByTokenOperation, GetNFTTradesByTokenOperationRequest, GetNFTTradesByTokenOperationRequestJSON } from '../operations/GetNFTTradesByTokenOperation'; import { GetNFTContractSalePricesOperation, GetNFTContractSalePricesOperationRequest, GetNFTContractSalePricesOperationRequestJSON } from '../operations/GetNFTContractSalePricesOperation'; import { EvmSoldPrice, EvmSoldPriceJSON } from '../types/EvmSoldPrice'; import { GetNFTSalePricesOperation, GetNFTSalePricesOperationRequest, GetNFTSalePricesOperationRequestJSON } from '../operations/GetNFTSalePricesOperation'; @@ -214,6 +215,33 @@ export abstract class AbstractClient { EvmTradeCollection, EvmTradeCollectionJSON >(GetNFTTradesOperation), + /** + * @description Get trades of NFTs for a given contract and token ID. + * @param request Request with parameters. + * @param {Object} request.address The address of the NFT contract + * @param {String} request.tokenId The token ID of the NFT contract + * @param {Object} [request.chain] The chain to query (optional) + * @param {Number} [request.fromBlock] The minimum block number from which to get the transfers + * * Provide the param 'from_block' or 'from_date' + * * If 'from_date' and 'from_block' are provided, 'from_block' will be used. (optional) + * @param {Number} [request.toBlock] The block number to get the trades from (optional) + * @param {Date} [request.fromDate] The start date from which to get the transfers (format in seconds or datestring accepted by momentjs) + * * Provide the param 'from_block' or 'from_date' + * * If 'from_date' and 'from_block' are provided, 'from_block' will be used. (optional) + * @param {Date} [request.toDate] The end date from which to get the transfers (format in seconds or datestring accepted by momentjs) + * * Provide the param 'to_block' or 'to_date' + * * If 'to_date' and 'to_block' are provided, 'to_block' will be used. (optional) + * @param {String} [request.cursor] The cursor returned in the previous response (used for getting the next page). (optional) + * @param {Number} [request.limit] The desired page size of the result. (optional) + * @param {Boolean} [request.nftMetadata] Include the NFT Metadata of the NFT Token (optional) + * @returns {Object} Response for the request. + */ + getNFTTradesByToken: this.createEndpoint< + GetNFTTradesByTokenOperationRequest, + GetNFTTradesByTokenOperationRequestJSON, + EvmTradeCollection, + EvmTradeCollectionJSON + >(GetNFTTradesByTokenOperation), /** * @description Get the sold price for an NFT contract for the last x days (only trades paid in ETH). * @param request Request with parameters. diff --git a/packages/common/evmUtils/src/generated/operations/GetNFTTradesByTokenOperation.ts b/packages/common/evmUtils/src/generated/operations/GetNFTTradesByTokenOperation.ts new file mode 100644 index 0000000000..44ad42a036 --- /dev/null +++ b/packages/common/evmUtils/src/generated/operations/GetNFTTradesByTokenOperation.ts @@ -0,0 +1,119 @@ +import { EvmChain, EvmChainInput, EvmChainJSON, EvmAddress, EvmAddressInput, EvmAddressJSON } from '../../dataTypes'; +import { EvmTradeCollection, EvmTradeCollectionJSON } from '../types/EvmTradeCollection'; + +// request parameters: +// - chain ($ref: #/components/schemas/nftTradesChainList) +// - from_block ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/1/schema) +// - to_block ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/2/schema) +// - from_date ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/3/schema) +// - to_date ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/4/schema) +// - cursor ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/5/schema) +// - limit ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/6/schema) +// - nft_metadata ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/7/schema) +// - address ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/8/schema) +// - token_id ($ref: #/paths/~1nft~1{address}~1{token_id}~1trades/get/parameters/9/schema) + +export interface GetNFTTradesByTokenOperationRequest { + /** + * @description The chain to query + */ + readonly chain?: EvmChainInput | EvmChain; + /** + * @description The minimum block number from which to get the transfers + * * Provide the param 'from_block' or 'from_date' + * * If 'from_date' and 'from_block' are provided, 'from_block' will be used. + */ + readonly fromBlock?: number; + /** + * @description The block number to get the trades from + */ + readonly toBlock?: number; + /** + * @description The start date from which to get the transfers (format in seconds or datestring accepted by momentjs) + * * Provide the param 'from_block' or 'from_date' + * * If 'from_date' and 'from_block' are provided, 'from_block' will be used. + */ + readonly fromDate?: Date; + /** + * @description The end date from which to get the transfers (format in seconds or datestring accepted by momentjs) + * * Provide the param 'to_block' or 'to_date' + * * If 'to_date' and 'to_block' are provided, 'to_block' will be used. + */ + readonly toDate?: Date; + /** + * @description The cursor returned in the previous response (used for getting the next page). + */ + readonly cursor?: string; + /** + * @description The desired page size of the result. + */ + readonly limit?: number; + /** + * @description Include the NFT Metadata of the NFT Token + */ + readonly nftMetadata?: boolean; + /** + * @description The address of the NFT contract + */ + readonly address: EvmAddressInput | EvmAddress; + /** + * @description The token ID of the NFT contract + */ + readonly tokenId: string; +} + +export interface GetNFTTradesByTokenOperationRequestJSON { + readonly chain?: EvmChainJSON; + readonly from_block?: number; + readonly to_block?: string; + readonly from_date?: string; + readonly to_date?: string; + readonly cursor?: string; + readonly limit?: number; + readonly nft_metadata?: boolean; + readonly address: EvmAddressJSON; + readonly token_id: string; +} + +export type GetNFTTradesByTokenOperationResponse = EvmTradeCollection; +export type GetNFTTradesByTokenOperationResponseJSON = EvmTradeCollectionJSON; + +export const GetNFTTradesByTokenOperation = { + operationId: "getNFTTradesByToken", + groupName: "nft", + httpMethod: "get", + routePattern: "/nft/{address}/{token_id}/trades", + parameterNames: ["chain","from_block","to_block","from_date","to_date","cursor","limit","nft_metadata","address","token_id"], + hasResponse: true, + hasBody: false, + + parseResponse(json: EvmTradeCollectionJSON): EvmTradeCollection { + return EvmTradeCollection.fromJSON(json); + }, + + serializeRequest(request: GetNFTTradesByTokenOperationRequest): GetNFTTradesByTokenOperationRequestJSON { + const chain = request.chain ? EvmChain.create(request.chain) : undefined; + const fromBlock = request.fromBlock; + const toBlock = request.toBlock; + const fromDate = request.fromDate; + const toDate = request.toDate; + const cursor = request.cursor; + const limit = request.limit; + const nftMetadata = request.nftMetadata; + const address = EvmAddress.create(request.address); + const tokenId = request.tokenId; + return { + chain: chain ? chain.toJSON() : undefined, + from_block: fromBlock, + to_block: toBlock !== undefined ? String(toBlock) : undefined, + from_date: fromDate !== undefined ? fromDate.toISOString() : undefined, + to_date: toDate !== undefined ? toDate.toISOString() : undefined, + cursor: cursor, + limit: limit, + nft_metadata: nftMetadata, + address: address.toJSON(), + token_id: tokenId, + }; + }, + +} diff --git a/packages/common/evmUtils/src/generated/operations/index.ts b/packages/common/evmUtils/src/generated/operations/index.ts index 427aafe884..f01c8213e5 100644 --- a/packages/common/evmUtils/src/generated/operations/index.ts +++ b/packages/common/evmUtils/src/generated/operations/index.ts @@ -1,4 +1,5 @@ export * from './GetNFTTradesOperation'; +export * from './GetNFTTradesByTokenOperation'; export * from './GetNFTContractSalePricesOperation'; export * from './GetNFTSalePricesOperation'; export * from './GetMultipleTokenPricesOperation'; diff --git a/packages/common/evmUtils/src/generated/operations/operations.ts b/packages/common/evmUtils/src/generated/operations/operations.ts index e635217247..fbeaf265cd 100644 --- a/packages/common/evmUtils/src/generated/operations/operations.ts +++ b/packages/common/evmUtils/src/generated/operations/operations.ts @@ -1,4 +1,5 @@ import { GetNFTTradesOperation } from './GetNFTTradesOperation'; +import { GetNFTTradesByTokenOperation } from './GetNFTTradesByTokenOperation'; import { GetNFTContractSalePricesOperation } from './GetNFTContractSalePricesOperation'; import { GetNFTSalePricesOperation } from './GetNFTSalePricesOperation'; import { GetMultipleTokenPricesOperation } from './GetMultipleTokenPricesOperation'; @@ -32,6 +33,7 @@ import { GetTopProfitableWalletPerTokenOperation } from './GetTopProfitableWalle export const operations = [ GetNFTTradesOperation, + GetNFTTradesByTokenOperation, GetNFTContractSalePricesOperation, GetNFTSalePricesOperation, GetMultipleTokenPricesOperation, diff --git a/packages/evmApi/src/generated/ClientEvmApi.ts b/packages/evmApi/src/generated/ClientEvmApi.ts index 9d2ac3bdd0..6d1abbb18a 100644 --- a/packages/evmApi/src/generated/ClientEvmApi.ts +++ b/packages/evmApi/src/generated/ClientEvmApi.ts @@ -1,6 +1,6 @@ // CAUTION: This file is automatically generated. Do not edit it manually! -import { getBlockOperation, GetBlockRequest, GetBlockResponseAdapter, getDateToBlockOperation, GetDateToBlockRequest, GetDateToBlockResponseAdapter, GetBlockStatsOperationResponseJSON, GetBlockStatsOperation, GetBlockStatsOperationRequest, GetBlockStatsOperationResponse, getContractEventsOperation, GetContractEventsRequest, GetContractEventsResponseAdapter, getContractLogsOperation, GetContractLogsRequest, GetContractLogsResponseAdapter, getContractNFTsOperation, GetContractNFTsRequest, GetContractNFTsResponseAdapter, getMultipleNFTsOperation, GetMultipleNFTsRequest, GetMultipleNFTsResponseAdapter, getNFTContractMetadataOperation, GetNFTContractMetadataRequest, GetNFTContractMetadataResponseAdapter, getNFTContractTransfersOperation, GetNFTContractTransfersRequest, GetNFTContractTransfersResponseAdapter, getNFTLowestPriceOperation, GetNFTLowestPriceRequest, GetNFTLowestPriceResponseAdapter, getNFTMetadataOperation, GetNFTMetadataRequest, GetNFTMetadataResponseAdapter, getNFTOwnersOperation, GetNFTOwnersRequest, GetNFTOwnersResponseAdapter, getNFTTokenIdOwnersOperation, GetNFTTokenIdOwnersRequest, GetNFTTokenIdOwnersResponseAdapter, getNFTTransfersByBlockOperation, GetNFTTransfersByBlockRequest, GetNFTTransfersByBlockResponseAdapter, getNFTTransfersFromToBlockOperation, GetNFTTransfersFromToBlockRequest, GetNFTTransfersFromToBlockResponseAdapter, getNFTTransfersOperation, GetNFTTransfersRequest, GetNFTTransfersResponseAdapter, getWalletNFTCollectionsOperation, GetWalletNFTCollectionsRequest, GetWalletNFTCollectionsResponseAdapter, getWalletNFTsOperation, GetWalletNFTsRequest, GetWalletNFTsResponseAdapter, getWalletNFTTransfersOperation, GetWalletNFTTransfersRequest, GetWalletNFTTransfersResponseAdapter, reSyncMetadataOperation, ReSyncMetadataRequest, ReSyncMetadataResponseAdapter, syncNFTContractOperation, SyncNFTContractRequest, SyncNFTContractResponseAdapter, GetNFTTradesOperationResponseJSON, GetNFTTradesOperation, GetNFTTradesOperationRequest, GetNFTTradesOperationResponse, GetNFTContractSalePricesOperationResponseJSON, GetNFTContractSalePricesOperation, GetNFTContractSalePricesOperationRequest, GetNFTContractSalePricesOperationResponse, GetNFTSalePricesOperationResponseJSON, GetNFTSalePricesOperation, GetNFTSalePricesOperationRequest, GetNFTSalePricesOperationResponse, GetNFTCollectionStatsOperationResponseJSON, GetNFTCollectionStatsOperation, GetNFTCollectionStatsOperationRequest, GetNFTCollectionStatsOperationResponse, GetNFTTokenStatsOperationResponseJSON, GetNFTTokenStatsOperation, GetNFTTokenStatsOperationRequest, GetNFTTokenStatsOperationResponse, getInternalTransactionsOperation, GetInternalTransactionsRequest, GetInternalTransactionsResponseAdapter, getTransactionOperation, GetTransactionRequest, GetTransactionResponseAdapter, getTransactionVerboseOperation, GetTransactionVerboseRequest, GetTransactionVerboseResponseAdapter, getWalletTransactionsOperation, GetWalletTransactionsRequest, GetWalletTransactionsResponseAdapter, getWalletTransactionsVerboseOperation, GetWalletTransactionsVerboseRequest, GetWalletTransactionsVerboseResponseAdapter, getNativeBalanceOperation, GetNativeBalanceRequest, GetNativeBalanceResponseAdapter, getNativeBalancesForAddressesOperation, GetNativeBalancesForAddressesRequest, GetNativeBalancesForAddressesResponseAdapter, getPairAddressOperation, GetPairAddressRequest, GetPairAddressResponseAdapter, getPairReservesOperation, GetPairReservesRequest, GetPairReservesResponseAdapter, GetPairPriceOperationResponseJSON, GetPairPriceOperation, GetPairPriceOperationRequest, GetPairPriceOperationResponse, getTokenAllowanceOperation, GetTokenAllowanceRequest, GetTokenAllowanceResponseAdapter, getTokenMetadataBySymbolOperation, GetTokenMetadataBySymbolRequest, GetTokenMetadataBySymbolResponseAdapter, getTokenMetadataOperation, GetTokenMetadataRequest, GetTokenMetadataResponseAdapter, getTokenPriceOperation, GetTokenPriceRequest, GetTokenPriceResponseAdapter, getTokenTransfersOperation, GetTokenTransfersRequest, GetTokenTransfersResponseAdapter, getWalletTokenBalancesOperation, GetWalletTokenBalancesRequest, GetWalletTokenBalancesResponseAdapter, getWalletTokenTransfersOperation, GetWalletTokenTransfersRequest, GetWalletTokenTransfersResponseAdapter, GetMultipleTokenPricesOperationResponseJSON, GetMultipleTokenPricesOperation, GetMultipleTokenPricesOperationRequest, GetMultipleTokenPricesOperationBody, GetMultipleTokenPricesOperationResponse, GetTokenOwnersOperationResponseJSON, GetTokenOwnersOperation, GetTokenOwnersOperationRequest, GetTokenOwnersOperationResponse, GetTokenStatsOperationResponseJSON, GetTokenStatsOperation, GetTokenStatsOperationRequest, GetTokenStatsOperationResponse, GetTopProfitableWalletPerTokenOperationResponseJSON, GetTopProfitableWalletPerTokenOperation, GetTopProfitableWalletPerTokenOperationRequest, GetTopProfitableWalletPerTokenOperationResponse, resolveAddressOperation, ResolveAddressRequest, ResolveAddressResponseAdapter, resolveDomainOperation, ResolveDomainRequest, ResolveDomainResponseAdapter, resolveENSDomainOperation, ResolveENSDomainRequest, ResolveENSDomainResponseAdapter, ResolveAddressToDomainOperationResponseJSON, ResolveAddressToDomainOperation, ResolveAddressToDomainOperationRequest, ResolveAddressToDomainOperationResponse, runContractFunctionOperation, RunContractFunctionRequest, RunContractFunctionResponseAdapter, Web3ApiVersionOperationResponseJSON, Web3ApiVersionOperation, Web3ApiVersionOperationResponse, EndpointWeightsOperationResponseJSON, EndpointWeightsOperation, EndpointWeightsOperationResponse, ReviewContractsOperationResponseJSON, ReviewContractsOperation, ReviewContractsOperationRequest, ReviewContractsOperationBody, ReviewContractsOperationResponse, uploadFolderOperation, UploadFolderRequest, UploadFolderResponseAdapter, GetWalletHistoryOperationResponseJSON, GetWalletHistoryOperation, GetWalletHistoryOperationRequest, GetWalletHistoryOperationResponse, GetWalletTokenBalancesPriceOperationResponseJSON, GetWalletTokenBalancesPriceOperation, GetWalletTokenBalancesPriceOperationRequest, GetWalletTokenBalancesPriceOperationResponse, GetWalletNetWorthOperationResponseJSON, GetWalletNetWorthOperation, GetWalletNetWorthOperationRequest, GetWalletNetWorthOperationResponse, GetDefiSummaryOperationResponseJSON, GetDefiSummaryOperation, GetDefiSummaryOperationRequest, GetDefiSummaryOperationResponse, GetDefiPositionsByProtocolOperationResponseJSON, GetDefiPositionsByProtocolOperation, GetDefiPositionsByProtocolOperationRequest, GetDefiPositionsByProtocolOperationResponse, GetDefiPositionsSummaryOperationResponseJSON, GetDefiPositionsSummaryOperation, GetDefiPositionsSummaryOperationRequest, GetDefiPositionsSummaryOperationResponse, GetWalletActiveChainsOperationResponseJSON, GetWalletActiveChainsOperation, GetWalletActiveChainsOperationRequest, GetWalletActiveChainsOperationResponse, GetWalletStatsOperationResponseJSON, GetWalletStatsOperation, GetWalletStatsOperationRequest, GetWalletStatsOperationResponse, GetWalletProfitabilitySummaryOperationResponseJSON, GetWalletProfitabilitySummaryOperation, GetWalletProfitabilitySummaryOperationRequest, GetWalletProfitabilitySummaryOperationResponse, GetWalletProfitabilityOperationResponseJSON, GetWalletProfitabilityOperation, GetWalletProfitabilityOperationRequest, GetWalletProfitabilityOperationResponse, GetTopERC20TokensByMarketCapOperationResponseJSON, GetTopERC20TokensByMarketCapOperation, GetTopERC20TokensByMarketCapOperationResponse, GetTopERC20TokensByPriceMoversOperationResponseJSON, GetTopERC20TokensByPriceMoversOperation, GetTopERC20TokensByPriceMoversOperationResponse, GetTopNFTCollectionsByMarketCapOperationResponseJSON, GetTopNFTCollectionsByMarketCapOperation, GetTopNFTCollectionsByMarketCapOperationResponse, GetHottestNFTCollectionsByTradingVolumeOperationResponseJSON, GetHottestNFTCollectionsByTradingVolumeOperation, GetHottestNFTCollectionsByTradingVolumeOperationResponse, GetTopCryptoCurrenciesByMarketCapOperationResponseJSON, GetTopCryptoCurrenciesByMarketCapOperation, GetTopCryptoCurrenciesByMarketCapOperationResponse, GetTopCryptoCurrenciesByTradingVolumeOperationResponseJSON, GetTopCryptoCurrenciesByTradingVolumeOperation, GetTopCryptoCurrenciesByTradingVolumeOperationResponse } from '@moralisweb3/common-evm-utils'; +import { getBlockOperation, GetBlockRequest, GetBlockResponseAdapter, getDateToBlockOperation, GetDateToBlockRequest, GetDateToBlockResponseAdapter, GetBlockStatsOperationResponseJSON, GetBlockStatsOperation, GetBlockStatsOperationRequest, GetBlockStatsOperationResponse, getContractEventsOperation, GetContractEventsRequest, GetContractEventsResponseAdapter, getContractLogsOperation, GetContractLogsRequest, GetContractLogsResponseAdapter, getContractNFTsOperation, GetContractNFTsRequest, GetContractNFTsResponseAdapter, getMultipleNFTsOperation, GetMultipleNFTsRequest, GetMultipleNFTsResponseAdapter, getNFTContractMetadataOperation, GetNFTContractMetadataRequest, GetNFTContractMetadataResponseAdapter, getNFTContractTransfersOperation, GetNFTContractTransfersRequest, GetNFTContractTransfersResponseAdapter, getNFTLowestPriceOperation, GetNFTLowestPriceRequest, GetNFTLowestPriceResponseAdapter, getNFTMetadataOperation, GetNFTMetadataRequest, GetNFTMetadataResponseAdapter, getNFTOwnersOperation, GetNFTOwnersRequest, GetNFTOwnersResponseAdapter, getNFTTokenIdOwnersOperation, GetNFTTokenIdOwnersRequest, GetNFTTokenIdOwnersResponseAdapter, getNFTTransfersByBlockOperation, GetNFTTransfersByBlockRequest, GetNFTTransfersByBlockResponseAdapter, getNFTTransfersFromToBlockOperation, GetNFTTransfersFromToBlockRequest, GetNFTTransfersFromToBlockResponseAdapter, getNFTTransfersOperation, GetNFTTransfersRequest, GetNFTTransfersResponseAdapter, getWalletNFTCollectionsOperation, GetWalletNFTCollectionsRequest, GetWalletNFTCollectionsResponseAdapter, getWalletNFTsOperation, GetWalletNFTsRequest, GetWalletNFTsResponseAdapter, getWalletNFTTransfersOperation, GetWalletNFTTransfersRequest, GetWalletNFTTransfersResponseAdapter, reSyncMetadataOperation, ReSyncMetadataRequest, ReSyncMetadataResponseAdapter, syncNFTContractOperation, SyncNFTContractRequest, SyncNFTContractResponseAdapter, GetNFTTradesOperationResponseJSON, GetNFTTradesOperation, GetNFTTradesOperationRequest, GetNFTTradesOperationResponse, GetNFTTradesByTokenOperationResponseJSON, GetNFTTradesByTokenOperation, GetNFTTradesByTokenOperationRequest, GetNFTTradesByTokenOperationResponse, GetNFTContractSalePricesOperationResponseJSON, GetNFTContractSalePricesOperation, GetNFTContractSalePricesOperationRequest, GetNFTContractSalePricesOperationResponse, GetNFTSalePricesOperationResponseJSON, GetNFTSalePricesOperation, GetNFTSalePricesOperationRequest, GetNFTSalePricesOperationResponse, GetNFTCollectionStatsOperationResponseJSON, GetNFTCollectionStatsOperation, GetNFTCollectionStatsOperationRequest, GetNFTCollectionStatsOperationResponse, GetNFTTokenStatsOperationResponseJSON, GetNFTTokenStatsOperation, GetNFTTokenStatsOperationRequest, GetNFTTokenStatsOperationResponse, getInternalTransactionsOperation, GetInternalTransactionsRequest, GetInternalTransactionsResponseAdapter, getTransactionOperation, GetTransactionRequest, GetTransactionResponseAdapter, getTransactionVerboseOperation, GetTransactionVerboseRequest, GetTransactionVerboseResponseAdapter, getWalletTransactionsOperation, GetWalletTransactionsRequest, GetWalletTransactionsResponseAdapter, getWalletTransactionsVerboseOperation, GetWalletTransactionsVerboseRequest, GetWalletTransactionsVerboseResponseAdapter, getNativeBalanceOperation, GetNativeBalanceRequest, GetNativeBalanceResponseAdapter, getNativeBalancesForAddressesOperation, GetNativeBalancesForAddressesRequest, GetNativeBalancesForAddressesResponseAdapter, getPairAddressOperation, GetPairAddressRequest, GetPairAddressResponseAdapter, getPairReservesOperation, GetPairReservesRequest, GetPairReservesResponseAdapter, GetPairPriceOperationResponseJSON, GetPairPriceOperation, GetPairPriceOperationRequest, GetPairPriceOperationResponse, getTokenAllowanceOperation, GetTokenAllowanceRequest, GetTokenAllowanceResponseAdapter, getTokenMetadataBySymbolOperation, GetTokenMetadataBySymbolRequest, GetTokenMetadataBySymbolResponseAdapter, getTokenMetadataOperation, GetTokenMetadataRequest, GetTokenMetadataResponseAdapter, getTokenPriceOperation, GetTokenPriceRequest, GetTokenPriceResponseAdapter, getTokenTransfersOperation, GetTokenTransfersRequest, GetTokenTransfersResponseAdapter, getWalletTokenBalancesOperation, GetWalletTokenBalancesRequest, GetWalletTokenBalancesResponseAdapter, getWalletTokenTransfersOperation, GetWalletTokenTransfersRequest, GetWalletTokenTransfersResponseAdapter, GetMultipleTokenPricesOperationResponseJSON, GetMultipleTokenPricesOperation, GetMultipleTokenPricesOperationRequest, GetMultipleTokenPricesOperationBody, GetMultipleTokenPricesOperationResponse, GetTokenOwnersOperationResponseJSON, GetTokenOwnersOperation, GetTokenOwnersOperationRequest, GetTokenOwnersOperationResponse, GetTokenStatsOperationResponseJSON, GetTokenStatsOperation, GetTokenStatsOperationRequest, GetTokenStatsOperationResponse, GetTopProfitableWalletPerTokenOperationResponseJSON, GetTopProfitableWalletPerTokenOperation, GetTopProfitableWalletPerTokenOperationRequest, GetTopProfitableWalletPerTokenOperationResponse, resolveAddressOperation, ResolveAddressRequest, ResolveAddressResponseAdapter, resolveDomainOperation, ResolveDomainRequest, ResolveDomainResponseAdapter, resolveENSDomainOperation, ResolveENSDomainRequest, ResolveENSDomainResponseAdapter, ResolveAddressToDomainOperationResponseJSON, ResolveAddressToDomainOperation, ResolveAddressToDomainOperationRequest, ResolveAddressToDomainOperationResponse, runContractFunctionOperation, RunContractFunctionRequest, RunContractFunctionResponseAdapter, Web3ApiVersionOperationResponseJSON, Web3ApiVersionOperation, Web3ApiVersionOperationResponse, EndpointWeightsOperationResponseJSON, EndpointWeightsOperation, EndpointWeightsOperationResponse, ReviewContractsOperationResponseJSON, ReviewContractsOperation, ReviewContractsOperationRequest, ReviewContractsOperationBody, ReviewContractsOperationResponse, uploadFolderOperation, UploadFolderRequest, UploadFolderResponseAdapter, GetWalletHistoryOperationResponseJSON, GetWalletHistoryOperation, GetWalletHistoryOperationRequest, GetWalletHistoryOperationResponse, GetWalletTokenBalancesPriceOperationResponseJSON, GetWalletTokenBalancesPriceOperation, GetWalletTokenBalancesPriceOperationRequest, GetWalletTokenBalancesPriceOperationResponse, GetWalletNetWorthOperationResponseJSON, GetWalletNetWorthOperation, GetWalletNetWorthOperationRequest, GetWalletNetWorthOperationResponse, GetDefiSummaryOperationResponseJSON, GetDefiSummaryOperation, GetDefiSummaryOperationRequest, GetDefiSummaryOperationResponse, GetDefiPositionsByProtocolOperationResponseJSON, GetDefiPositionsByProtocolOperation, GetDefiPositionsByProtocolOperationRequest, GetDefiPositionsByProtocolOperationResponse, GetDefiPositionsSummaryOperationResponseJSON, GetDefiPositionsSummaryOperation, GetDefiPositionsSummaryOperationRequest, GetDefiPositionsSummaryOperationResponse, GetWalletActiveChainsOperationResponseJSON, GetWalletActiveChainsOperation, GetWalletActiveChainsOperationRequest, GetWalletActiveChainsOperationResponse, GetWalletStatsOperationResponseJSON, GetWalletStatsOperation, GetWalletStatsOperationRequest, GetWalletStatsOperationResponse, GetWalletProfitabilitySummaryOperationResponseJSON, GetWalletProfitabilitySummaryOperation, GetWalletProfitabilitySummaryOperationRequest, GetWalletProfitabilitySummaryOperationResponse, GetWalletProfitabilityOperationResponseJSON, GetWalletProfitabilityOperation, GetWalletProfitabilityOperationRequest, GetWalletProfitabilityOperationResponse, GetTopERC20TokensByMarketCapOperationResponseJSON, GetTopERC20TokensByMarketCapOperation, GetTopERC20TokensByMarketCapOperationResponse, GetTopERC20TokensByPriceMoversOperationResponseJSON, GetTopERC20TokensByPriceMoversOperation, GetTopERC20TokensByPriceMoversOperationResponse, GetTopNFTCollectionsByMarketCapOperationResponseJSON, GetTopNFTCollectionsByMarketCapOperation, GetTopNFTCollectionsByMarketCapOperationResponse, GetHottestNFTCollectionsByTradingVolumeOperationResponseJSON, GetHottestNFTCollectionsByTradingVolumeOperation, GetHottestNFTCollectionsByTradingVolumeOperationResponse, GetTopCryptoCurrenciesByMarketCapOperationResponseJSON, GetTopCryptoCurrenciesByMarketCapOperation, GetTopCryptoCurrenciesByMarketCapOperationResponse, GetTopCryptoCurrenciesByTradingVolumeOperationResponseJSON, GetTopCryptoCurrenciesByTradingVolumeOperation, GetTopCryptoCurrenciesByTradingVolumeOperationResponse } from '@moralisweb3/common-evm-utils'; import { NullableOperationResolver, OperationResolver, OperationV3Resolver, PaginatedOperationResolver, PaginatedResponseV3Adapter, PaginatedOperationV3Resolver } from '@moralisweb3/api-utils'; import { ApiModule, ResponseAdapter } from '@moralisweb3/common-core'; export abstract class ClientEvmApi extends ApiModule { @@ -80,6 +80,9 @@ export abstract class ClientEvmApi extends ApiModule { getNFTTrades: (request: GetNFTTradesOperationRequest): Promise> => { return new PaginatedOperationV3Resolver(GetNFTTradesOperation, this.baseUrl, this.core).fetch(request, null); }, + getNFTTradesByToken: (request: GetNFTTradesByTokenOperationRequest): Promise> => { + return new PaginatedOperationV3Resolver(GetNFTTradesByTokenOperation, this.baseUrl, this.core).fetch(request, null); + }, getNFTContractSalePrices: (request: GetNFTContractSalePricesOperationRequest): Promise> => { return new OperationV3Resolver(GetNFTContractSalePricesOperation, this.baseUrl, this.core).fetch(request, null); },