-
Notifications
You must be signed in to change notification settings - Fork 11
[AUTOMATED] Update files from 0xsequence/indexer #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
// GetMarketplaceOrders queries marketplace orders with filtering and pagination. | ||
// | ||
// Retrieves buy orders (offers) and sell orders (listings) from a specific marketplace | ||
// and collection with comprehensive filtering options. | ||
// | ||
// Parameters: | ||
// marketplaceContractAddress: Target marketplace contract (required) | ||
// collectionAddress: NFT collection contract (required) | ||
// filter: MarketplaceOrderFilter with options: | ||
// - isListing: true=listings, false=offers, omit=both | ||
// - userAddresses: Include specific users | ||
// - currencyAddresses: Filter by currencies (empty=all) | ||
// - tokenIds: Filter by specific tokens (empty=all) | ||
// - excludeUserAddresses: Exclude specific users | ||
// - blockNumberGt: Orders greater than block number | ||
// - createdAtAfter: Orders after timestamp | ||
// - orderStatuses: Filter by status (OPEN, CLOSED, CANCELLED) | ||
// - returnExpired: Include expired orders | ||
// page: Pagination control (optional) | ||
// | ||
// Returns: Updated pagination info and array of matching orders | ||
GetMarketplaceOrders(ctx context.Context, marketplaceContractAddress string, collectionAddress string, filter *MarketplaceOrderFilter, page *Page) (*Page, []*MarketplaceOrder, error) | ||
// GetMarketplaceTopOrders finds the most competitive orders for specific tokens. | ||
// | ||
// Optimized for price discovery, returns the best available orders for each token. | ||
// Useful for displaying current market prices and finding trading opportunities. | ||
// | ||
// Parameters: | ||
// marketplaceContractAddress: Target marketplace contract (required) | ||
// collectionAddress: NFT collection contract (required) | ||
// filter: MarketplaceTopOrdersFilter with options: | ||
// - currencyAddresses: Consider specific currencies (empty=all) | ||
// - tokenIds: Target token IDs (required, non-empty) | ||
// - isListing: true=listings/sell orders, false=offers/buy orders | ||
// - priceSort: ASC=lowest first, DESC=highest first | ||
// - excludeUser: Hide orders from specific user | ||
// | ||
// Returns: Array of top-priced active orders, sorted by priceSort preference | ||
GetMarketplaceTopOrders(ctx context.Context, marketplaceContractAddress string, collectionAddress string, filter *MarketplaceTopOrdersFilter) ([]*MarketplaceOrder, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@david-littlefarmer here's the new Marketplace orderbook endpoints.
Related PR: https://github.com/0xsequence/indexer/pull/386 - indexer marketplace pipeline
// These parameters are depracated, please don't use them: | ||
// - filters | ||
// - beforeExpiryTimestamp | ||
// - blockNumberAfter | ||
// - createdAtAfter | ||
// and in OrderbookOrderFilter these fields are depracated: | ||
// - userAddress | ||
// - excludeUserAddress | ||
// | ||
// Use 'filter' and these fields instead | ||
// - userAddresses | ||
// - excludeUserAddress' | ||
GetOrderbookOrders(ctx context.Context, page *Page, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, filter *OrderbookOrderFilter, orderStatuses []OrderStatus, filters []*OrderbookOrderFilter, beforeExpiryTimestamp int64, blockNumberAfter int64, createdAtAfter int64) (*Page, []*OrderbookOrder, error) | ||
GetTopOrders(ctx context.Context, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, tokenIDs []string, isListing bool, priceSort SortOrder, excludeUser *string) ([]*OrderbookOrder, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecated endpoints. cc @david-littlefarmer
Triggered by https://github.com/0xsequence/indexer/commit/9f3b69e7c34d0dbda79cab7d7796c398d5647036