Query Data With Postman

If you're familiar with Postman, query data from OCAP service is just a cake.

Use https://ocap.arcblock.io/api/btc as API endpoint, select POST as request method, and set content-type header to application/graphql:

Query with Postman

Then put the following query as the post body, and hit SEND:

{
  transactionsByAddress(receiver: "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", paging: {size: 10}) {
    data {
      historyPrice
      priceInUsd
      time
      blockHeight
      hash
      total
      inputs {
        data {
          script
          scriptType
        }
      }
      outputs {
        data {
          script
          scriptType
          index
        }
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

As shown in the following screenshot:

Query with Postman

Then you will get the same results as show in query data with playground.

About API Endpoint

Note that the API endpoint is different for various chains:

Last Updated: 11/30/2018, 10:39:27 AM