Socket Subscription Connection V2

Description

  • Description: websocket connection

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

  • Encoding: UTF-8

Request Header

Paremeter
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

mergePush

Boolean

N

Whether multiple subscribers merge the same data push, Default : false

Response

Parameter
Type
Required
Description

subscriber

String

Y

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

Y

The list of alias

data

Object

Y

History data

resend

Boolean

Y

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

Response Sample

{
                "subscriber": "444172c4d51f4b60a5caf20d22440959w",
                "send_no": "82023111015021789401681636347121",
                "address": "0xf89d7b9c864f589bbf53a82105107622b35eaa40",
                "sent_time": "1699599738",
                "resend":false,
                 "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
                        }
                    ]
                }
            }

Data

Consistent with the response data from this /v2/user/history_list_pro

Last updated