Skip to main content

Marketplace

Please note: This is an introductory reference

For the most up-to-date information, refer to the API Reference.
🚧 The information provided in this section cannot be programmatically updated and may be subject to inconsistencies over time.

Marketplace Endpoints
  • Testnet: http://platform.canary.enjin.io/graphql/marketplace
  • Mainnet: http://platform.enjin.io/graphql/marketplace

This is a detailed reference guide that explains the most commonly used operations.

GetBid​

The GetBid query allows you to retrieve detailed information about a specific bid placed on a market listing. It's a valuable tool for querying bid-related data, including bid price, bidder details, and the associated market listing.

query GetBid {
GetBid(id: 1) {
id
price
height
bidder {
account {
publicKey
address
}
}
listing {
listingId
}
}
}

GetBids​

The GetBids query is used to retrieve a list of bids for one or more market listings based on specified listing IDs. Unlike the GetBid query, which retrieves details of a single bid, GetBids can return multiple bids and includes pagination information.

query GetBids {
GetBids(listingIds: ["0x101d16dc0fa25d77a92bcb6cde34e8ad1e85d96cd6a4a78eb68acc4f82d37f20"]) {
totalCount
pageInfo {
startCursor
endCursor
hasPreviousPage
hasNextPage
}
edges {
node {
id
price
height
bidder {
account {
publicKey
address
}
}
listing {
listingId
}
}
}
}
}

GetListing​

The GetListing query allows you to retrieve detailed information about a single market listing using its unique listing ID. This query provides a comprehensive overview of the listing's attributes, its state, sales history, bid history, and more.

query GetListing {
GetListing(listingId: "0x101d16dc0fa25d77a92bcb6cde34e8ad1e85d96cd6a4a78eb68acc4f82d37f20") {
listingId
makeAssetId {
collectionId
tokenId
}
takeAssetId {
collectionId
tokenId
}
amount
price
minTakeValue
feeSide
creationBlock
deposit
salt
state {
... on FixedPriceState {
amountFilled
type
}
... on AuctionState {
type
}
}
data {
... on FixedPriceData {
type
}
... on AuctionData {
type
startBlock
endBlock
}
}
seller {
account {
publicKey
address
}
}
sales {
edges {
node {
amount
price
bidder {
account {
publicKey
address
}
}
}
}
}
bids {
edges {
node {
price
bidder {
account {
publicKey
address
}
}
height
}
}
}
states {
state
height
}
}
}

GetListings​

The GetListings query is used to retrieve information about multiple market listings from the Enjin Blockchain marketplace. Unlike the GetListing query, which fetches data for a single listing, GetListings is designed to handle multiple listings at once, making it suitable for scenarios where you need to fetch details for multiple listings in a single request.

query GetListings {
GetListings(
listingIds: ["0x101d16dc0fa25d77a92bcb6cde34e8ad1e85d96cd6a4a78eb68acc4f82d37f20"]
) {
totalCount
pageInfo {
startCursor
endCursor
hasPreviousPage
hasNextPage
}
edges {
node {
listingId
makeAssetId {
collectionId
tokenId
}
takeAssetId {
collectionId
tokenId
}
amount
price
minTakeValue
feeSide
creationBlock
deposit
salt
state {
... on FixedPriceState {
amountFilled
type
}
... on AuctionState {
type
}
}
data {
... on FixedPriceData {
type
}
... on AuctionData {
type
startBlock
endBlock
}
}
seller {
account {
publicKey
address
}
}
sales {
edges {
node {
amount
price
bidder {
account {
publicKey
address
}
}
}
}
}
bids {
edges {
node {
price
bidder {
account {
publicKey
address
}
}
height
}
}
}
states {
state
height
}
}
}
}
}

GetSale​

The GetSale query is used to retrieve details about a specific sale transaction that has occurred on the Enjin Blockchain marketplace. This query requires the sale ID as input and returns information about the sale, including the sale ID, price, quantity, bidder information, and the associated market listing.

query GetSale {
GetSale(id: 1) {
id
price
amount
bidder {
account {
publicKey
address
}
}
listing {
listingId
}
}
}

GetSales​

The GetSales query is used to retrieve information about completed sale transactions that have occurred on a marketplace. This query allows you to fetch details of multiple sales associated with specific market listings.

query GetSales {
GetSales(listingIds: ["0x101d16dc0fa25d77a92bcb6cde34e8ad1e85d96cd6a4a78eb68acc4f82d37f20"]) {
totalCount
pageInfo {
startCursor
endCursor
hasPreviousPage
hasNextPage
}
edges {
node {
id
price
amount
bidder {
account {
publicKey
address
}
}
listing {
listingId
}
}
}
}
}