Create history subscription V2
Description
Description: Create history subscription
Path: https://api.blockin.ai/v2/subscribe/history/wallet/add
Encoding: UTF-8
Method: HTTPS POST
Request Headed
Content-Type
String
Y
application/json
AccessKey
String
Y
AccessKey
Request Parameters
subscriber
String
Y
Subscriber
address_list
List
N
The list of the address that user subscribed
Address_list Content
type
String
Y
Type: USER , TOKEN
address
String
Y
Address
alias
String
N
Alias of address
chain_names
String
N
If it's not filled in means all chains. Multiple chains are separated by commas. eg: eth, bsc, arb.
value
String
N
Value type tier
1:v<=1000u,
2:1000u<v<=10000u,
3: 10000u<v<100000u,
4:100000u<v<=1000000u
5:v>1000000u
type = TOKEN is required
token_list
List
N
Token is configurable when type is "USER"
protocol_list
List
N
List of protocol
start_dnd
String
N
Do not disturb time start (eg:20:00:00)
end_dnd
String
N
Do not disturb time end (eg: 08:00:00)
Token_list Content
chain_name
String
Y
Chain name
token
String
Y
Token address
Protocol_list Content
chain_name
String
Y
Chain name
Response
success
Boolean
Y
Success Boolean
data
Object
N
Response data
error_code
String
N
Error code
error_msg
String
N
Error message
Request and Response Sample
curl -H "Content-Type:application/json" -H "AccessKey:1bdb01c947c54919b64d1fc6794atest" -X POST "https://api.blockin.ai/v2/subscribe/history/wallet/add" -d'{Request json}'
//Add several addresses
Request json
{
"subscriber": "0xdd3db40e569a28244790a9f58b59efc4efbbe937",
"address_list": [
{
"type":"USER",
"address":"0x0c14c154558ad0eb2f305bfa365426f6774894f4",
"alias":"nnn",
"start_dnd":"20:00:00",
"end_dnd":"08:00:00",
"chain_names":"ETH,BSC",
"value":"1",
"token_list":[
{
"chain_name":"ETH",
"token":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}, {
"chain_name":"ETH",
"token":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
}
],
"protocol_list":[
{
"chain_name":"ETH",
"protocol":"uniswap2"
}, {
"chain_name":"ETH",
"protocol":"sushiswap"
}
]
},
{
"type":"TOKEN",
"address":"0xe9e7cea3dedca5984780bafc599bd69add087d56",
"alias":"ttt",
"start_dnd":"20:00:00",
"end_dnd":"08:00:00",
"chain_names":"ETH,BSC",
"value":"2",
"protocol_list":[
{
"chain_name":"ETH",
"protocol":"uniswap2"
}, {
"chain_name":"ETH",
"protocol":"sushiswap"
}
]
}
]
}
Return json
{
"success": true,
"data": {
},
"error_code": null,
"error_msg": null
}
Last updated