Queries for Listings

listing

Returns a single listing.

listing(id) {
  /* Listing fields */
}

Arguments

id Int! -- required

The ID of the Listing to return.

Response

Listing.* Listing

Any requested field from the Listing object.

Example

Request

query {
  listing(id: 5438052) {
    id
    created_at
    curr_price
    asset {
      ex_asset_id
      game {
        name
      }
    }
    expires_at
    marketplace {
      name
    }
    seller {
      address
    }
    token {
      symbol
    }
  }
}

Response

{
  "data": {
    "listing": {
      "id": 5438052,
      "created_at": "2023-04-15 22:49:09+0000",
      "curr_price": "250000000000000000",
      "asset": {
        "ex_asset_id": "17012",
        "game": {
          "name": "Wolf Game"
        }
      },
      "expires_at": "2023-04-17 04:46:19+0000",
      "marketplace": {
        "name": "SeaPort"
      },
      "seller": {
        "address": "0x9436c5494a1ef3e148435de822f4ae12a103dc2c"
      },
      "token": {
        "symbol": "ETH"
      }
    }
  }
}

listings

Returns all available listings filtered by parameters. Only returns current, active listings.

listings(filter, limit, cursor) {
  /* Listing fields */
}

Arguments

cursor String

The cursor or "page" of the result set to return. This value can be retrieved from the previous listings request if there are more results beyond the limit requested.

The ListingsFilter object by which to filter the returned listings.

limit Int

The number of listings to return per result set. Defaults to 20. Max: 20.

Response

ListingsResult.* [ListingsResult!]

A ListingResult object that contains a list of Listing objects (and their requested fields) and pagination cursors.

Example

Request

query {
  listings(filter: { collection_id: 9, view: 1 }, limit: 3) {
    listings {
      id
      created_at
      curr_price
      asset {
        ex_asset_id
        game {
          name
        }
      }
      expires_at
      marketplace {
        name
      }
      seller {
        address
      }
      token {
        symbol
      }
    }
    cursor_next
    cursor_prev
  }
}
query {
  listings(filter: { collection_id: 9, view: 1 }, limit: 3, cursor: "eyJ0aW1lc3RhbXAiOiIyMDIzLTA0LTE2VDAwOjMzOjM5LjkzNloiLCJzb3J0Q29sdW1uIjoiY29udl9hbW91bnQiLCJzb3J0VmFsdWUiOjAuMDQyLCJpZCI6NTQyMTc2OX0=") {
    listings {
      id
      created_at
      curr_price
      asset {
        ex_asset_id
        game {
          name
        }
      }
      expires_at
      marketplace {
        name
      }
      seller {
        address
      }
      token {
        symbol
      }
    }
    cursor_next
    cursor_prev
  }
}

Response

{
  "data": {
    "listings": {
      "listings": [
        {
          "id": 5424407,
          "created_at": "2023-04-09 16:47:07+0000",
          "curr_price": "40000000000000000",
          "asset": {
            "ex_asset_id": "9778",
            "game": {
              "name": "Arcade"
            }
          },
          "expires_at": "2023-05-09 16:41:41+0000",
          "marketplace": {
            "name": "SeaPort"
          },
          "seller": {
            "address": "0xc19a655dd07aae03bab984e8ac255733b20b284d"
          },
          "token": {
            "symbol": "ETH"
          }
        },
        {
          "id": 5433331,
          "created_at": "2023-04-14 09:38:09+0000",
          "curr_price": "40000000000000000",
          "asset": {
            "ex_asset_id": "9941",
            "game": {
              "name": "Arcade"
            }
          },
          "expires_at": "2023-05-14 09:34:53+0000",
          "marketplace": {
            "name": "SeaPort"
          },
          "seller": {
            "address": "0xc2cee0ea5fcdc574b56d70dc08aa48c456ce3449"
          },
          "token": {
            "symbol": "ETH"
          }
        },
        {
          "id": 5421769,
          "created_at": "2023-04-07 23:01:20+0000",
          "curr_price": "42000000000000000",
          "asset": {
            "ex_asset_id": "9806",
            "game": {
              "name": "Arcade"
            }
          },
          "expires_at": "2023-05-07 05:56:00+0000",
          "marketplace": {
            "name": "SeaPort"
          },
          "seller": {
            "address": "0x7bf14d493520f20fad2e326dec83509d1116c6b6"
          },
          "token": {
            "symbol": "ETH"
          }
        }
      ],
      "cursor_next": "eyJ0aW1lc3RhbXAiOiIyMDIzLTA0LTE2VDAwOjMzOjM5LjkzNloiLCJzb3J0Q29sdW1uIjoiY29udl9hbW91bnQiLCJzb3J0VmFsdWUiOjAuMDQyLCJpZCI6NTQyMTc2OX0=",
      "cursor_prev": null
    }
  }
}
{
  "data": {
    "listings": {
      "listings": [
        {
          "id": 5421886,
          "created_at": "2023-04-07 23:11:00+0000",
          "curr_price": "42000000000000000",
          "asset": {
            "ex_asset_id": "5386",
            "game": {
              "name": "Arcade"
            }
          },
          "expires_at": "2023-05-07 05:55:18+0000",
          "marketplace": {
            "name": "SeaPort"
          },
          "seller": {
            "address": "0x7bf14d493520f20fad2e326dec83509d1116c6b6"
          },
          "token": {
            "symbol": "ETH"
          }
        },
        {
          "id": 5380258,
          "created_at": "2023-03-26 09:46:32+0000",
          "curr_price": "44000000000000000",
          "asset": {
            "ex_asset_id": "6558",
            "game": {
              "name": "Arcade"
            }
          },
          "expires_at": "2023-04-26 09:44:34+0000",
          "marketplace": {
            "name": "SeaPort"
          },
          "seller": {
            "address": "0xd6823ff599190f11bf2f3659d97119df20278165"
          },
          "token": {
            "symbol": "ETH"
          }
        },
        {
          "id": 5436701,
          "created_at": "2023-04-15 11:53:06+0000",
          "curr_price": "47700000000000000",
          "asset": {
            "ex_asset_id": "7380",
            "game": {
              "name": "Arcade"
            }
          },
          "expires_at": "2023-04-17 12:49:37+0000",
          "marketplace": {
            "name": "SeaPort"
          },
          "seller": {
            "address": "0xaae9c6a04af5d651a96d30ab2dcaa9b180d81925"
          },
          "token": {
            "symbol": "ETH"
          }
        }
      ],
      "cursor_next": "eyJ0aW1lc3RhbXAiOiIyMDIzLTA0LTE2VDAwOjMzOjM5LjkzNloiLCJzb3J0Q29sdW1uIjoiY29udl9hbW91bnQiLCJzb3J0VmFsdWUiOjAuMDQ3NywiaWQiOjU0MzY3MDF9",
      "cursor_prev": "eyJ0aW1lc3RhbXAiOiIyMDIzLTA0LTE2VDAwOjMzOjM5LjkzNloiLCJzb3J0Q29sdW1uIjoiY29udl9hbW91bnQiLCJzb3J0VmFsdWUiOjAuMDQyLCJpZCI6NTQyMTc2OX0="
    }
  }
}