Blockin.ai OpenAPI
  • Welcome
  • 🥳GETTING STARTED
    • 🗝️Creating an Account
    • 👀Product Overview
  • 😈REFERENCE
    • 🐙API Reference
      • Chain
        • Query available chain list
      • Protocol
        • Query available protocol
        • Query available protocol list
        • Query all available protocol list
        • Query available tagInfo list
        • Query available protocol detail
        • Query available protocol detail list
        • Query all available protocol detail list
        • Query liquidity change list by chain name and pool address
        • Query swap list by chain name and pool address
      • User
        • Query used chain by user address
        • Query chain balance by chain name and user address
        • Query protocol portfolio list by chain name and user address
        • Query protocol portfolios on all chains by user address
        • Query protocol portfolio by chain name, protocol name and user address
        • Query protocol portfolios on all chains by protocol name and user address
        • Query protocol top holders by chain name and protocol name
        • Query simple protocol list by chain name and user address
        • Query simple protocol list on all chains by user address
        • Query token list by chain name and user address
        • Query token list on all chains by user address
        • Query token top holders by chain name and token address
        • Query collections by chain name and user address
        • Query collections on all chains by user address
        • Query collections on Bitcoin by user address
        • Query items by chain name, collection address and user address
        • Query inscriptions on Bitcoin by user address
        • Query items transfer list by chain name and user address
        • Query history list by chain name and user address
        • Query all history list by user address
        • Query User history - Advanced edition
        • Query total balance on all supported chains by user address
        • Query token authorized list by chain name and user address
        • Query nft authorized list by chain name and user address
        • Query 24-hour net assets curve by chain name and user address
        • Query 24-hour net assets curve on all supported chains by user address
        • Query 24-hour protocol portfolios curve by chain name and user address
        • Query 24-hour protocol portfolios curve on all supported chains by user address
        • Query 24-hour wallet curve by chain name and user address
        • Query 24-hour wallet curve on all supported chains by user address
      • Token
        • Query token info
        • Query token info list
        • Query token market info list
        • Subscribe to token kline data
        • Unsubscribe token kline
        • Query pool list by chain name and token address
        • Query liquidity change list by chain name and token address
        • Query swap list by chain name and token address
        • Query real-time exchange rate
        • Query real-time token price
        • Query LP_token info
        • Query symbol's price from foreign exchange
      • NFT
        • Query collection metadata by chain name and collection address
        • Query collection trade list by chain name and collection address
        • Query item info list by chain name and collection address
        • Query item metadata by chain name, collection address and item id
        • Refresh collection metadata
        • Query inscriptions metadata on Bitcoin by inscriptions id
      • Mirror
        • Query historical token list
        • Query historical protocol portfolios
        • Query historical assets
        • Query historical token list on all supported chains
        • Query historical protocol portfolios on all supported chains
        • Query historical assets on all supported chains
        • Query historical LP_token info
      • Subscription
        • Create history subscription
        • Update history subscription
        • Delete history subscription
        • History subscription query
        • Socket Subscription Connection
        • Subscription notify
        • Alter history subscription
        • History subscription- Query Batch_no List
        • Create history subscription V2
        • Delete history subscription V2
        • Query history subscription wallet V2
        • Query history subscription detail V2
        • History subscription Message query V2
        • Socket Subscription Connection V2
    • 📜Enumeration
    • 🎭Error Code
      • Pre exec error code
    • 🍪Related Features
      • Usage
    • ⌨️Change Log
    • 😎Terms of Service
Powered by GitBook
On this page
  • Description
  • Request Header
  • Request Parameters
  • Response
  • Public Response
  • Response Content
  • Request Example
  • Successful Response Example
  • Failed Response Sample
  1. REFERENCE
  2. API Reference
  3. NFT

Query collection trade list by chain name and collection address

Description

  • Method: HTTPS GET

  • Encoding: UTF-8

  • Path: https://api.blockin.ai/v2/nft/trade_list

  • Description: Query collection trade list by chain name and collection address

Request Header

Parameter
Required
Type
Description

Content-Type

Y

String

application/json

AccessKey

Y

String

1bdb01c947c54919b64d1fc6794atest

Request Parameters

Parameter
Required
Type
Description

chain_name

Y

String

address

N

String

Holder's address

direction

N

String

The direction of the trade. eg:buyer/seller/both

collection_address

Y

String

Collection's address

from_block

N

Long

The minimum block height from which to get the transfers If 'start_date' and 'from_block' are provided, 'from_block' will be used

to_block

N

Long

The maximum block height from which to get the transfers

start_date

N

String

The date from where to get the trades

end_date

N

String

Get trades up until this date If 'end_date' and 'to_block' are provided, 'to_block' will be used

marketplace

N

String

Marketplace from which to get the trades (OPENSEA/BLUR/X2Y2/LOOKSRARE/LARVALABS...)

page

Y

Integer

Page number

page_size

Y

Integer

Page size

Response

Public Response

Parameter
Required
Type
Description

success

Y

Boolean

Success Boolean

data

N

Object

Response object

error_code

N

String

Error code

error_msg

N

String

Error message

Response Content

Parameter
Required
Type
Description

list

Y

List

Paginated list

pagination

Y

Object

Page info

Pagination Content

Parameter
Required
Type
Description

current

Y

Integer

Current page number

page_size

Y

Integer

Current page size

total

Y

Integer

Total number

count_page

Y

Integer

Total page number

CollectionTrade Content

Parameter
Required
Type
Description

contract_address

Y

String

The address of the contract that traded the NFT

collection_address

Y

String

Collection's address

item_id

Y

String

Collection's item id

tx

Y

String

The transaction hash of the trade

buyer

Y

String

The buyer's wallet address

seller

Y

String

The seller's wallet address

amount

Y

String

Token's amount

payment_amount

Y

String

The amount that was sent in the transaction

payment_token

Y

String

The token that was sent in the transaction(ETH/BNB/MATIC...)

price

N

String

The Collection's item price

native_token_price

N

String

The Collection's item price of converting the payment token to the native token of the chain

block_height

Y

Long

The block height when the amount or owner changed

block_time

Y

Long

The timestamp of the block in which the trade occurred

block_hash

Y

String

The block hash

is_bind

Y

String

Determine whether it is a bound transaction(Y/N)

transaction_index

Y

Integer

The transaction index

Request Example

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X GET "https://api.blockin.ai/v2/nft/trade_list?chain_name=eth&address=0x50d2d26cfb0680f21d9396ce43c64b82e1761bc4&direction=buyer&collection_address=0x0c9153d9abb5e0489c89b38837f248816f151f42&marketplace=OPENSEA&page=1&page_size=10"

Successful Response Example

{
    "success": true,
    "data": {
        "list": [
            {
                "contract_address": "0x00000000000000adc04c56bf30ac9d3c0aaf14dc",
                "collection_address": "0x0c9153d9abb5e0489c89b38837f248816f151f42",
                "buyer": "0x50d2d26cfb0680f21d9396ce43c64b82e1761bc4",
                "seller": "0x7fc855d576c05189dde9910602e39f1c35d9984d",
                "amount": "1",
                "payment_amount": "26900000000000000",
                "payment_token": "0x0000000000000000000000000000000000000000",
                "price": "0.0269",
                "block_hash": "0xb0df2c70db88aaea82e37506eebb007308ed4942d51da380cb0577817acf5d01",
                "is_bind": "N",
                "transaction_index": 73,
                "item_id": "1270",
                "tx": "0xec071135fc810dbc4023d3e63b925524df80fd924574ded7a0e2d7826eb04488",
                "native_token_price": "0.0269",
                "block_height": 17670573,
                "block_time": 1689080939
            }
        ],
        "pagination": {
            "current": 1,
            "page_size": 10,
            "total": 1,
            "count_page": 1
        }
    },
    "error_code": null,
    "error_msg": null
}

Failed Response Sample

{
    "success": false,
    "data": null,
    "error_code": "CHAIN_NOT_SUPPORT",
    "error_msg": "The current chain is not supported temporarily"
}
PreviousQuery collection metadata by chain name and collection addressNextQuery item info list by chain name and collection address

Last updated 1 year ago

Chain's name,support single chain's name.eg:eth,Ethereum.

😈
🐙
Enumeration