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
  • Response
  • Response Sample
  1. REFERENCE
  2. API Reference
  3. Subscription

Socket Subscription Connection

Description

  • Description: websocket connection

  • Path: wss://api.blockin.ai/ws/subscribe/ws/history

  • Encoding: UTF-8

Request Header

Parameter
Type
Required
Description

Content-Type

String

Y

application/json

AccessKey

String

Y

AccessKey

callbackRetry

Boolean

N

Default false,true: retry the push . Retry every 30s , with a maximum of 3 times

Response

Parameter
Type
Required
Description

batch_no

String

Y

The unique identifier of the response after successfully creating the subscription address list

address

String

Y

Address you want to query

send_no

String

Y

Unique ID sent

sent_time

String

Y

send time

data

Object

Y

history data

resend

Boolean

Y

Default false, true means retry when the missed push is not received

Response Sample

{
    "batch_no": 20230518062650763000484207221544,
    "address":"0x2ed8165b98d35077360d155a26fb8516cdc735ce",
    "send_no":"82023061416381703901729771924776",
    "sent_time": "1686204669",
    "resend": "false",
    "data": {
        "cate_dict": {
            "Contract Interaction": {
                "id": "Contract Interaction",
                "name": "Contract Interaction"
            }
        },
        "cex_dict": {},
        "history_list": [
            {
                "cate_id": "Contract Interaction",
                "cex_id": null,
                "chain_name": "Ethereum",
                "is_scam": false,
                "other_address": null,
                "tx": "0xf60bab3e68a58d241a367d151e4a118ed015a8487286466b52b1766442a8c7fd",
                "project_name": "blur",
                "receives": [],
                "sends": [
                    {
                        "amount": -1,
                        "to_address": "0x000000000000ad05ccc4f10045630fb830b95127",
                        "token_address": "152b9e765ec2e18663228305568b0be8"
                    }
                ],
                "time_at": "1683701483",
                "token_approve": [],
                "tx_list": {
                    "gas_fee": 0.012941762072399106,
                    "from_address": "0xcbb0fe555f61d23427740984325b4583a4a34c82",
                    "name": "Contract Interaction",
                    "params": [],
                    "status": 1,
                    "to_address": "0x000000000000ad05ccc4f10045630fb830b95127",
                    "usd_gas_fee": null,
                    "value": null
                }
            },
            {
                "cate_id": "Contract Interaction",
                "cex_id": null,
                "chain_name": "Ethereum",
                "is_scam": false,
                "other_address": null,
                "id": "0x61227bdfa42376f42312e5819c52910e678fb63084173ec355cf7ec35f61fc19",
                "project_id": "blur",
                "receives": [
                    {
                        "amount": 1,
                        "from_address": "0xcbb0fe555f61d23427740984325b4583a4a34c82",
                        "price": null,
                        "token_address": "858aae37f9d94ab5e216e0eca24fc8b7"
                    },
                    {
                        "amount": 1,
                        "from_address": "0xcbb0fe555f61d23427740984325b4583a4a34c82",
                        "price": null,
                        "token_address": "6c07c239b942278966a3496094127f03"
                    },
                    {
                        "amount": 1,
                        "from_address": "0xcbb0fe555f61d23427740984325b4583a4a34c82",
                        "price": null,
                        "token_address": "021846b44fe74fb10bf2306930c0c8f8"
                    }
                ],
                "sends": [
                    {
                        "amount": -30.09,
                        "to_address": "0x000000000000ad05ccc4f10045630fb830b95127",
                        "token_address": "0x0000000000a39bb272e79075ade125fd351887ac"
                    }
                ],
                "time_at": "1683701051",
                "token_approve": [],
                "tx": {
                    "gas_fee": 0.045704511571239504,
                    "from_address": "0xcbb0fe555f61d23427740984325b4583a4a34c82",
                    "name": "Contract Interaction",
                    "params": [],
                    "status": 1,
                    "to_address": "0x000000000000ad05ccc4f10045630fb830b95127",
                    "usd_gas_fee": null,
                    "value": null
                }
            }
        ],
        "is_big_address": false,
        "project_dict": {
            "blur": {
                "chain_name": "Ethereum",
                "id": "blur",
                "logo_url": "/image/protocol/blur.png",
                "name": "Blur",
                "site_url": "https://blur.io"
            }
        },
        "token_dict": {
            "021846b44fe74fb10bf2306930c0c8f8": {
                "attributes": null,
                "chain_name": "Ethereum",
                "collection": {
                    "chain_name": "Ethereum",
                    "description": null,
                    "id": "ETH:0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                    "is_core": true,
                    "is_scam": false,
                    "is_verified": true,
                    "logo_url": "https://cloudflare-ipfs.com/ipfs/QmVcxdJgL9T5AAtApT2D8hw4bjQorCGybMPzyMitcsY5T3",
                    "name": " "
                },
                "collection_id": "ETH:0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                "content": "https://cloudflare-ipfs.com/ipfs/QmVcxdJgL9T5AAtApT2D8hw4bjQorCGybMPzyMitcsY5T3",
                "content_type": "image_url",
                "contract_address": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                "description": null,
                "detail_url": "https://cloudflare-ipfs.com/ipfs/QmVcxdJgL9T5AAtApT2D8hw4bjQorCGybMPzyMitcsY5T3",
                "id": "021846b44fe74fb10bf2306930c0c8f8",
                "inner_id": "289",
                "name": " ",
                "pay_token": null,
                "symbol": " ",
                "thumbnail_url": "https://cloudflare-ipfs.com/ipfs/QmVcxdJgL9T5AAtApT2D8hw4bjQorCGybMPzyMitcsY5T3",
                "total_supply": 1,
                "usd_price": null
            },
            "152b9e765ec2e18663228305568b0be8": {
                "attributes": null,
                "chain_name": "Ethereum",
                "collection": {
                    "chain_name": "Ethereum",
                    "description": null,
                    "id": "ETH:0xed5af388653567af2f388e6224dc7c4b3241c544",
                    "is_core": true,
                    "is_scam": false,
                    "is_verified": true,
                    "logo_url": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/5265.png",
                    "name": "Azuki #5265"
                },
                "collection_id": "ETH:0xed5af388653567af2f388e6224dc7c4b3241c544",
                "content": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/5265.png",
                "content_type": "image_url",
                "contract_address": "0xed5af388653567af2f388e6224dc7c4b3241c544",
                "description": null,
                "detail_url": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/5265.png",
                "id": "152b9e765ec2e18663228305568b0be8",
                "inner_id": "5265",
                "name": "Azuki #5265",
                "pay_token": null,
                "symbol": "Azuki #5265",
                "thumbnail_url": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/5265.png",
                "total_supply": -1,
                "usd_price": null
            },
            "6c07c239b942278966a3496094127f03": {
                "attributes": null,
                "chain_name": "Ethereum",
                "collection": {
                    "chain_name": "Ethereum",
                    "description": null,
                    "id": "ETH:0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                    "is_core": true,
                    "is_scam": false,
                    "is_verified": true,
                    "logo_url": "",
                    "name": "MutantApeYachtClub"
                },
                "collection_id": "ETH:0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                "content": "",
                "content_type": "image_url",
                "contract_address": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                "description": null,
                "detail_url": "",
                "id": "6c07c239b942278966a3496094127f03",
                "inner_id": "10726",
                "name": "MutantApeYachtClub",
                "pay_token": null,
                "symbol": "MutantApeYachtClub",
                "thumbnail_url": "",
                "total_supply": 1,
                "usd_price": null
            },
            "858aae37f9d94ab5e216e0eca24fc8b7": {
                "attributes": null,
                "chain_name": "Ethereum",
                "collection": {
                    "chain_name": "Ethereum",
                    "description": null,
                    "id": "ETH:0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                    "is_core": true,
                    "is_scam": false,
                    "is_verified": true,
                    "logo_url": "",
                    "name": "MutantApeYachtClub"
                },
                "collection_id": "ETH:0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                "content": "",
                "content_type": "image_url",
                "contract_address": "0x60e4d786628fea6478f785a6d7e704777c86a7c6",
                "description": null,
                "detail_url": "",
                "id": "858aae37f9d94ab5e216e0eca24fc8b7",
                "inner_id": "9761",
                "name": "MutantApeYachtClub",
                "pay_token": null,
                "symbol": "MutantApeYachtClub",
                "thumbnail_url": "",
                "total_supply": 1,
                "usd_price": null
            },
            "0x0000000000a39bb272e79075ade125fd351887ac": {
                "chain_name": "Ethereum",
                "decimal": 18,
                "display_symbol": null,
                "id": "0x0000000000a39bb272e79075ade125fd351887ac",
                "is_core": true,
                "is_verified": true,
                "is_wallet": true,
                "logo_url": "/image/token/0x0000000000a39bb272e79075ade125fd351887ac.png",
                "name": null,
                "optimized_symbol": "ETH",
                "price": null,
                "protocol_name": null,
                "symbol": null,
                "time_at": null
            }
        }
    },
}

Data

PreviousHistory subscription queryNextSubscription notify

Last updated 1 year ago

Consistent with the response data from this

😈
🐙
/v2/user/history_list