Query market activities by wallet and collection

POST /open/v1/{network_id}/market_activities/query

Query market activities, filter by wallet and collection.

Path parameters

  • network_id integer Required

    Chain ID.

    Value is 137.

application/json

Body

  • wallet string Required

    Address of the wallet

  • contract string Required

    Address of the NFT collection

  • types array[integer]

    Activity event type. 0: List, 1: Sales, 2: Cancelled, 3: Expired

    Values are 0, 1, 2, or 3. Default value is [0, 1, 2, 3].

  • only_dew boolean

    Only return activities from dew marketplace.

    Default value is true.

  • limit integer

    Default value is 20.

  • offset integer

    Default value is 0.

Responses

  • 200 application/json

    Successful

    Hide response attributes Show response attributes object
    • code integer Required

      0: success, others: error

    • data object
      Hide data attributes Show data attributes object
      • code integer Required

        0: success, others: error

      • data array[object]
        Hide data attributes Show data attributes object
        • source integer Required

          Market source. -2: Dew, 0: OpenSea, 4: Tofu, 5: Element, 6: MagicEden, 7: OnePlanet, 8: Mooar

          Values are -2, 1, 4, 5, 6, 7, or 8.

        • price string
        • currency string
        • price_usd number
        • id integer Required

          Unique id of each order

        • network_id integer Required

          Chain ID.

        • type integer Required

          Activity event type. 0: List, 1: Sales, 2: Cancelled, 3: Expired

          Values are 0, 1, 2, or 3.

        • order_id integer | null

          Unique id of each order. Only available for type 1, 2, 3

        • nft object | null
          Hide nft attributes Show nft attributes object | null
          • owner string | null
          • contract string
          • token_id string
          • name string | null
          • rank integer | null
          • status integer | null
        • contract object | null
          Hide contract attributes Show contract attributes object | null
          • contract string Required
          • name string Required
          • symbol string Required
          • icon_url string Required
          • slug string | null
          • verified boolean Required
          • show_rarity boolean
        • from_address string | null

          from address.

        • to_address string | null

          to address.

        • tx string | null

          Transaction hash of the event. Could be null for off-chain event, including listing and expiring on Dew. For other marketplaces please refer to their API documents.

        • event_time integer

          Timestamp of the event, in seconds since Unix epoch.

      • limit integer Required

        Limit of the items.

      • offset integer Required

        Offset of the items.

      • total integer Required

        Total number of items.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer Required

      0: success, others: error

    • error string | null Required
    • errors array[object] | null
POST /open/v1/{network_id}/market_activities/query
curl \
 -X POST https://api.dewapi.com/open/v1/137/market_activities/query \
 -H "X-API-Key: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"wallet":"0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434","contract":"0xa131b877B12B0Ae8BB7da7229b8a1095881497A6","types":[0,1,2,3],"only_dew":true,"limit":20,"offset":0}'
Request example
{
  "wallet": "0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434",
  "contract": "0xa131b877B12B0Ae8BB7da7229b8a1095881497A6",
  "types": [
    0,
    1,
    2,
    3
  ],
  "only_dew": true,
  "limit": 20,
  "offset": 0
}
Response examples (200)
{
  "code": 0,
  "data": {
    "code": 0,
    "data": [
      {
        "source": 1,
        "price": "49000000000000000",
        "currency": "0x0000000000000000000000000000000000000000",
        "price_usd": "0.1",
        "id": 1,
        "network_id": 137,
        "type": 1,
        "order_id": 1,
        "nft": {
          "owner": "0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434",
          "contract": "0xa131b877B12B0Ae8BB7da7229b8a1095881497A6",
          "token_id": "1",
          "name": "BAYC #1",
          "rank": 1,
          "status": 0
        },
        "contract": {
          "contract": "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e",
          "name": "Doodle",
          "symbol": "DOODLE",
          "icon_url": "nfts/qt5xtfvkajlhva1.jpg",
          "slug": "doodles-official",
          "verified": true,
          "show_rarity": false
        },
        "from_address": "0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434",
        "to_address": "0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434",
        "tx": "0xe236ac5d1e4021031258ff21b5637ecef0506de9a909d0d4d05f99704de699d0",
        "event_time": 1654983000
      }
    ],
    "limit": 20,
    "offset": 0,
    "total": 0
  }
}
Response examples (400)
{
  "code": 3000,
  "error": "this is an error message",
  "errors": [
    {
      "field": [
        "error message"
      ]
    }
  ]
}