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
  • Data Content
  • Record Content
  • Alias_list Content
  • Request and Response Sample
  1. REFERENCE
  2. API Reference
  3. Subscription

History subscription Message query V2

Description

  • Description: Query history subscription detail

  • Path: https://api.blockin.ai/v2/subscribe/history/wallet/data

  • Encoding: UTF-8

  • Method: HTTPS POST

Request Header

Paremeter
Type
Required
Description

Content-Type

String

Y

application/json

AccessKey

String

Y

AccessKey

Request Parameters

Parameter
Type
Required
Description

subscriber

String

N

Subscriber

address

String

N

Address

start_timestamp

Long

Y

The query start time stamp is 1699598727000. The data within a maximum of 3 days can be queried

end_timestamp

Long

N

Query the end timestamp

page

Integer

N

The default number of pages is 1

page_size

Integer

N

The default number of queries per page is 10. The maximum number is 50

Response

Parameter
Type
Required
Description

success

Boolean

Y

Success Boolean

data

Object

N

Response data

error_code

String

N

Error code

error_msg

String

N

Error message

Data Content

Parameter
Type
Required
Description

total

Long

Y

total number

total_pages

Long

Y

Total page number

page

Long

Y

Current page number

page_size

Long

Y

Current page size

records

List

Y

Record detail

Record Content

Parameter
Type
Required
Description

subscriber

String

N

Subscriber

type

String

Y

Type: USER , TOKEN

address

String

Y

Address you want to query

send_no

String

Y

Unique ID sent

sent_time

String

Y

Send time

alias_list

List

N

The list of alias

data

Object

N

History data

Alias_list Content

Paremeter
Type
Required
Description

subscriber

String

N

Subscriber

alias

String

Y

The alias of the address

Request and Response Sample

curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X POST "https://api.blockin.ai/v2/subscribe/history/wallet/data" -d'{Request json}'

//query several addresses
Request json
{
   "subscriber": "0xdd3db40e569a28244790a9f58b59efc4efbbe937",
   "start_timestamp":1699599738,
   "page":1,
   "page_size":10
  }

Return json
{
    "success": true,
    "data": {
        "total": 4,
        "page": 1,
        "records": [
            {
                "subscriber": "444172c4d51f4b60a5caf20d22440959w",
                "send_no": "82023111015021789401681636347121",
                "address": "0xf89d7b9c864f589bbf53a82105107622b35eaa40",
                "sent_time": "1699599738",
                 "alias_list": [
                 {
                    "subscriber": "444172c4d51f4b60a5caf20d22440959w",
                    "alias": "AAAA"
                 }],                
                "data": {
                    "abi_list": [
                        {
                            "function_id": "executeFFsYo",
                            "function_name": "ExecuteFFsYo",
                            "function_param": "address,bytes",
                            "method_id": "0x78e111f6"
                        },
                        {
                            "function_id": "executeFFsYo",
                            "function_name": "ExecuteFFsYo",
                            "function_param": null,
                            "method_id": "0x78e111f6"
                        }
                    ],
                    "cex_list": null,
                    "chain_list": [
                        {
                            "chain_id": "1",
                            "chain_name": "Ethereum",
                            "is_evm": null,
                            "logo_url": "https://www.blockin.ai/image/chain/ethereum.png",
                            "native_token": "ETH",
                            "scan_logo_url": "https://www.blockin.ai/image/scan/ethereum.png",
                            "scan_tx_url": "https://www.etherscan.io/tx/"
                        }
                    ],
                    "collection_list": null,
                    "nft_item_list": null,
                    "protocol_list": [],
                    "token_list": [
                        {
                            "chain_name": "Ethereum",
                            "decimal": 18,
                            "logo_url": "https://www.blockin.ai/image/ethereum/token/eth.png",
                            "name": "ETH",
                            "symbol": "ETH",
                            "token_address": "ETH"
                        },
                        {
                            "chain_name": "Ethereum",
                            "decimal": 6,
                            "logo_url": "https://www.blockin.ai/image/ethereum/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.png",
                            "name": "USD Coin",
                            "symbol": "USDC",
                            "token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
                        },
                        {
                            "chain_name": "Ethereum",
                            "decimal": 18,
                            "logo_url": "https://www.blockin.ai/image/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png",
                            "name": "Wrapped Ether",
                            "symbol": "WETH",
                            "token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                        }
                    ],
                    "transaction_details": [
                        {
                            "amount": 2.067968E-12,
                            "block_height": 18973744,
                            "block_restructure": 0,
                            "block_time": 1704855803,
                            "cex_id": null,
                            "chain_name": "Ethereum",
                            "contract_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                            "explain_action": "Swap",
                            "from_address": "0xbf2d5d8ebf05947245b3d7f38b2776a6a49710dd",
                            "function_name": "ExecuteFFsYo",
                            "gas_price": 31661069308,
                            "gas_used": 122825,
                            "internal_txns": null,
                            "is_scam": false,
                            "method_id": "0x78e111f6",
                            "nonce": 81681,
                            "price": 2346.4142790824703,
                            "protocol_name": null,
                            "receipt_status": 1,
                            "to_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                            "token_address": "ETH",
                            "transaction_fee": 0.003888770837755100,
                            "transaction_index": 0,
                            "transaction_type": 2,
                            "transfer_logs": [
                                {
                                    "amount": 131.422744543485791934,
                                    "direction": 0,
                                    "from_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
                                    "price": 2346.4142790824703,
                                    "to_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                                    "token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                                    "type": "token",
                                    "usd_value": 308372.2043930428717968852618925346,
                                    "value": "131422744543485791934"
                                },
                                {
                                    "amount": 308811.190231000000000000,
                                    "direction": 1,
                                    "from_address": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
                                    "price": 0.9996584931474636,
                                    "to_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
                                    "token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                                    "type": "token",
                                    "usd_value": 308705.7290933961917147480916,
                                    "value": "308811190231"
                                }
                            ],
                            "tx": "0xd4f36beb512d8ec9c0f3a0ee81dce4849578620ed19184c72bcb29d48ce45e35",
                            "usd_value": 4.852309643885618E-9,
                            "value": 2067968
                        }
                    ]
                }
            }
        ],
        "total_pages": 4,
        "page_size": 1
    },
    "error_code": null,
    "error_msg": null
}


PreviousQuery history subscription detail V2NextSocket Subscription Connection V2

Last updated 1 year ago

😈
🐙