👀
DeFi Analytics
BlockVision's Multi-Chain & Multi-Type API can support users to scan all DeFi assets and transactions on the chain.
The current blockchain industry lacks an API tool to fully support users to scan all DeFi assets on the chain and hold NFTs until BlockVision is launched. BlockVision supports retrieval of fungible, non-fungible, and semi-fungible tokens.
BlockVision’s unique API enables developers to analyze FT and NFT data across multiple chains in real-time, query user portfolios and participating DeFi protocols, from past to present.
Not only that, BlockVision is also the first to integrate many mainstream DApps of DeFi, so that developers can directly obtain and query the relevant data of these DApps through BlockVision.

Account Positions

BlockVision's erc20_accountPositions interface allows users to view all ERC20 contract addresses and corresponding token balances held by a wallet. Similarly, the nft_accountPositions interface supports viewing NFT data held by an account and the SFT balances. These three types of position sizes make up the account's portfolio.
In addition to supporting scanning of current positions, users can also view historical positions of any address by specifying the blockNumber.
JavaScript
Python
Golang
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"id": 1,
4
"jsonrpc": "2.0",
5
"method": "erc20_accountPositions",
6
"params": {
7
"accountAddress": "0x6E2EE712C203be8950Bc33AC9B4065CC90B1155C",
8
"blockNumber": 0,
9
"pageSize": 50,
10
"pageIndex": 1
11
}
12
});
13
14
var config = {
15
method: 'post',
16
url: 'https://apis.blockvision.org/v1/<api key>',
17
headers: {
18
'Content-Type': 'application/json'
19
},
20
data : data
21
};
22
23
axios(config)
24
.then(function (response) {
25
console.log(JSON.stringify(response.data));
26
})
27
.catch(function (error) {
28
console.log(error);
29
});
30
Copied!
1
import requests
2
import json
3
4
url = "https://apis.blockvision.org/v1/<api key>"
5
6
payload = json.dumps({
7
"id": 1,
8
"jsonrpc": "2.0",
9
"method": "erc20_accountPositions",
10
"params": {
11
"accountAddress": "0x6E2EE712C203be8950Bc33AC9B4065CC90B1155C",
12
"blockNumber": 0,
13
"pageSize": 50,
14
"pageIndex": 1
15
}
16
})
17
headers = {
18
'Content-Type': 'application/json'
19
}
20
21
response = requests.request("POST", url, headers=headers, data=payload)
22
23
print(response.text)
24
Copied!
1
package main
2
3
import (
4
"fmt"
5
"strings"
6
"net/http"
7
"io/ioutil"
8
)
9
10
func main() {
11
12
url := "https://apis.blockvision.org/v1/<api key>"
13
method := "POST"
14
15
payload := strings.NewReader(`{
16
"id": 1,
17
"jsonrpc": "2.0",
18
"method": "erc20_accountPositions",
19
"params": {
20
"accountAddress":"0x6E2EE712C203be8950Bc33AC9B4065CC90B1155C",
21
"blockNumber": 0,
22
"pageSize": 50,
23
"pageIndex": 1
24
}
25
}`)
26
27
client := &http.Client {
28
}
29
req, err := http.NewRequest(method, url, payload)
30
31
if err != nil {
32
fmt.Println(err)
33
return
34
}
35
req.Header.Add("Content-Type", "application/json")
36
37
res, err := client.Do(req)
38
if err != nil {
39
fmt.Println(err)
40
return
41
}
42
defer res.Body.Close()
43
44
body, err := ioutil.ReadAll(res.Body)
45
if err != nil {
46
fmt.Println(err)
47
return
48
}
49
fmt.Println(string(body))
50
}
Copied!

Transactions

BlockVision's erc20_transfer enables users to analyze Token's transaction trajectory, and nft_transfer enables users to analyze NFT transactions with different parameters, including fromAddress, toAddress, fromBlockNumber, toBlockNumber, and contractAddress to achieve different purposes.
Not only that, but using trace_transaction you can also trace FT & NFT historical transaction records.
JavaScript
Python
Golang
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"id": 1,
4
"jsonrpc": "2.0",
5
"method": "nft_transfers",
6
"params": {
7
"blockNumber": 0,
8
"accountAddress": "",
9
"fromAddress": "",
10
"toAddress": "",
11
"contractAddress": "0x356613282dBFBdf8c9732e65Dac24cBd3e518f97",
12
"pageSize": 10,
13
"pageIndex": 1
14
}
15
});
16
17
var config = {
18
method: 'post',
19
url: 'https://apis.blockvision.org/v1/<api key>',
20
headers: {
21
'Content-Type': 'application/json'
22
},
23
data : data
24
};
25
26
axios(config)
27
.then(function (response) {
28
console.log(JSON.stringify(response.data));
29
})
30
.catch(function (error) {
31
console.log(error);
32
});
33
Copied!
1
import requests
2
import json
3
4
url = "https://apis.blockvision.org/v1/<api key>"
5
6
payload = json.dumps({
7
"id": 1,
8
"jsonrpc": "2.0",
9
"method": "nft_transfers",
10
"params": {
11
"blockNumber": 0,
12
"accountAddress": "",
13
"fromAddress": "",
14
"toAddress": "",
15
"contractAddress": "0x356613282dBFBdf8c9732e65Dac24cBd3e518f97",
16
"pageSize": 10,
17
"pageIndex": 1
18
}
19
})
20
headers = {
21
'Content-Type': 'application/json'
22
}
23
24
response = requests.request("POST", url, headers=headers, data=payload)
25
26
print(response.text)
27
Copied!
1
package main
2
3
import (
4
"fmt"
5
"strings"
6
"net/http"
7
"io/ioutil"
8
)
9
10
func main() {
11
12
url := "https://apis.blockvision.org/v1/<api key>"
13
method := "POST"
14
15
payload := strings.NewReader(`{
16
"id": 1,
17
"jsonrpc": "2.0",
18
"method": "nft_transfers",
19
"params": {
20
"blockNumber": 0,
21
"accountAddress": "",
22
"fromAddress": "",
23
"toAddress": "",
24
"contractAddress": "0x356613282dBFBdf8c9732e65Dac24cBd3e518f97",
25
"pageSize": 10,
26
"pageIndex": 1
27
}
28
}`)
29
30
client := &http.Client {
31
}
32
req, err := http.NewRequest(method, url, payload)
33
34
if err != nil {
35
fmt.Println(err)
36
return
37
}
38
req.Header.Add("Content-Type", "application/json")
39
40
res, err := client.Do(req)
41
if err != nil {
42
fmt.Println(err)
43
return
44
}
45
defer res.Body.Close()
46
47
body, err := ioutil.ReadAll(res.Body)
48
if err != nil {
49
fmt.Println(err)
50
return
51
}
52
fmt.Println(string(body))
53
}
Copied!

Approvals

By using BlockVision's erc20_approvals and nft_approvals interfaces, users can immediately scan and analyze the potential risk points of the current authorization contract of the wallet address, identify potential risks as early as possible and improve the security index of the address.
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"id": 1,
4
"jsonrpc": "2.0",
5
"method": "erc20_approvals",
6
"params": {
7
"fromBlockNumber": 0,
8
"toBlockNumber": 0,
9
"accountAddress": "0x93B918CA73172BbDE2492E21399A003e97EADDC4",
10
"contractAddress": "0xe49Cb97091b5bDe1E8B7043e3D5717E64fDE825e",
11
"pageSize": 10,
12
"pageIndex": 1
13
}
14
});
15
16
var config = {
17
method: 'post',
18
url: 'https://apis.blockvision.org/v1/<api key>',
19
headers: {
20
'Content-Type': 'application/json'
21
},
22
data : data
23
};
24
25
axios(config)
26
.then(function (response) {
27
console.log(JSON.stringify(response.data));
28
})
29
.catch(function (error) {
30
console.log(error);
31
});
32
Copied!

Mainstream DApps

BlockVision is integrating mainstream DeFi protocol DApps on the Ethereum chain at the fastest speed, including but not limited to Uniswap V2, Uniswap V3, Aave V2, etc., to help developers quickly index the core data of DApps, saving time and work quantity.
In addition to these already provided, BlockVision also plans to integrate more mainstream DeFi protocols of different public chains for developers to use.