Solana Coinpath APIs

Bitquery’s APIs provide one stop solution for all your search for data related to specific address on various different blockchain networks. In this article we’ll take a look at how we can investigate an address on the Solana blockchain network using Bitquery’s APIs.

Bitquery’s Coinpath API is a set of blockchain money tracing APIs which uses heuristics and machine learning to determine the clusters, transactions, account balance, etc. The easiest way to get started with the Coinpath API is to use Bitquery Explorer. Our Explorer is the showcase of our APIs, you can simply search any address or transaction and see what data we show there and click on “Open GraphQL API ” button to see the API behind the data.

Inbound and Outbound transfers

Let’s start by taking a quick look at the inbound and outbound transfer count for the address “JBjjW3sHsui7jmq1HDftMxqkG83aW6LuDxGuQHQhaomo”.

1

The above graph shows the month wise count of inbound transfers for the address “JBjjW3sHsui7jmq1HDftMxqkG83aW6LuDxGuQHQhaomo”. As we can observe, the highest number of inbound transactions have taken place in November 2021.

2

Here the bar graphs show the outbound transfers taking place from the address “JBjjW3sHsui7jmq1HDftMxqkG83aW6LuDxGuQHQhaomo”, and we can observe that the count of outbound transfers is close to 16 million for the month of November

You can get the above data using the following query!

Inflow and Outflow of tokens

Now we’ll try to analyse the inflow and outflow for the address “12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT” and gather some useful data.

Inflow

Under the inflow tab you can find all the latest inbound transfers along with their timestamp, sender, block number, currency, signature etc.

3

Using our GraphQL IDE, you can get the results easily.

{
  solana(network: solana) {
    transfers(
      options: {limit: 10, offset: 0}
      date: {since: "2021-10", till: "2022-03"}
      receiverAddress: {is: "12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT"}
    ) {
      block {
        height
        timestamp {
          time
        }
      }
      transaction {
        signature
      }
      sender {
        address
      }
      currency {
        symbol
        address
      }
      amount
      transferType
    }
  }
}

4

The link for the same is given below.

You can even use the various widgets offered by Bitquery to get graphical representations of the data obtained as a result of the above query.

5

Here we have obtained a bar graph comparing the amount of different transfer types.

6

We have represented the same information in the form of a pie chart here.

Outflow

Just like the inflow tab, the outflow tab gives all the latest outbound transfers along with their timestamp, sender, block number, currency, signature etc.

Using Bitquery’s GraphQL IDE, you can obtain the results very conveniently.

{
  solana(network: solana) {
    transfers(
      options: {limit: 10, offset: 0}
      date: {since: "2021-10", till: "2022-03"}
      senderAddress: {is: "12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT"}
    ) {
      block {
        height
        timestamp {
          time
        }
      }
      transaction {
        signature
      }
      receiver {
        address
      }
      currency {
        symbol
        address
      }
      amount
      transferType
    }
  }
}

7

You can use the following link to generate the query given above.

Here again we can use Bitquery’s different widgets to get graphical representation of the data that we fetch using Bitquery’s GraphQL IDE.

8

The above Bar Graph gives the amount transferred in different transactions with their signature.

9

Here we have a pie chart showing the total share of different transfer types made using the address “12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT”.

Money flow

You can obtain a very comprehensive pictorial representation of the inbound and outbound transfers for a particular address using Bitquery’s Coinpath APIs. Bitquery offers the Graph and the Sankey representation for the depiction of flow of token.

Graph representation

10

The inbound and outbound transfer are depicted using suitable arrowhead to make the representations more comprehendible for the users.

Sankey representation

11

Here the vertical line represents the address that we’re investigating, and the three incoming strips represents the addresses from where the inflow of tokens is taking place. The width of the strips varies according to the amount sent by them.

You can use our GraphQL IDE to fetch the above data using the following query

{
  solana(network: solana) {
    inbound: coinpath(
      initialAddress: {is: "12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT"}
      depth: {lteq: 1}
      options: {direction: inbound, asc: "depth", desc: "amount", limitBy: {each: "depth", limit: 10}}
      date: {since: "2021-10", till: "2022-03"}
    ) {
      sender {
        address
        annotation
      }
      receiver {
        address
        annotation
      }
      amount
      currency {
        symbol
      }
      depth
      count
    }
    outbound: coinpath(
      initialAddress: {is: "12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT"}
      depth: {lteq: 1}
      options: {asc: "depth", desc: "amount", limitBy: {each: "depth", limit: 10}}
      date: {since: "2021-10", till: "2022-03"}
    ) {
      sender {
        address
        annotation
      }
      receiver {
        address
        annotation
      }
      amount
      currency {
        symbol
      }
      depth
      count
    }
  }
}

You can get the above query here:

Here again, you can represent all the above data in pictorial forms using Bitquery’s Bar widget, Pie widget etc.

12

The above bar graph shows the amount of different currencies exchanged using the address "12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT"

13

Here we have a representation of the different amounts received by the address “12ashmTiFStQ8RGUpi1BTCinJakVyDKWjRL6SWhnbxbT” from different sender. We can observe that the sender with the address “5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1” has sent the highest amount.

Conclusion

With Bitquery’s Coinpath and Transfer API, investigating Solana addresses and fetching the desired data becomes very convenient. Bitquery’s APIs support various blockchains like Ethereum, Binance smart chain, Avalanche, Tron, Polygon Matic etc too. You can easily fetch the transfers taking place on various blockchain networks, the inflow and outflow of tokens and the overall money flow for a given address.

Our Other DEX APIs are comprehensive and available for a number of blockchain networks are of great help in case you want to build DEX related tools or fetch data related to the DEXs. Check out our APIs today!!

If you have questions, you can also contact us.

Also Read

About Bitquery

Bitquery is a set of software tools that parse, index, access, search, and use information across blockchain networks in a unified way. We are crossing the ‘chain-chasm’ by delivering set of products that can work across blockchains. Our products include:

Coinpath APIs provide blockchain money flow analysis for more than 24 blockchains. With Coinpath’s APIs, you can monitor blockchain transactions, investigate crypto crimes such as bitcoin money laundering, and create crypto forensics tools. You can refer to this article to get started with Coinpath

Digital Assets API provides index information related to all major cryptocurrencies, coins, and tokens.

DEX API provides real-time deposits and transactions, trades, and other related data on different DEX protocols like Uniswap, SushiSawap, Kyber Network, Airswap, Matching Network, etc.

If you have any questions about our products, ask them on our Telegram channel or email us at hello@bitquery.io . Also, subscribe to our newsletter and stay updated about the latest in the cryptocurrency world.