0

I am working on a university project, and I noticed that paid crypto APIs like Whale Alert or Whale Trace return information about transaction types (like exchange), sender and receiver wallets (like private/okex.com/...):

  {
     "hash":"fecb0051e9e69c7e8202fae3866a5193579696c1093049e7e336e5a15d0a9248",
     "from":{
        "address":"bc1qw0c0mrjjw73azm65utnhwvcpsdnpg0cdljg0eg",
        "name":"Wallet",
        "type":"wallet"
     },
     "to":{
        "address":"bc1quq29mutxkgxmjfdr7ayj3zd9ad0ld5mrhh89l2",
        "name":"OKEx",
        "type":"exchange",
        "url":"okex.com"
     },
     "time":"2020-01-24T19:44:03Z",
     "asset":"BTC",
     "size":2763.80593244,
     "USD_size":23417202.542436957
  }

My question is how can I get this information without using these specific APIs? I am new to crypto but I would like to build my own API on the top of Bitcoin (where of course I can't see this information).

0

I am not sure what API's you are looking for information on. The most common are the bitcoin core API's https://developer.bitcoin.org/reference/rpc/ you have to have a full node running on your machine, but if you just developing you can run core in the testnet or regtest mode so you don't have to download everything

you can download core from here. from there you can decode transaction

bitcoind -testnet -daemon
---wait until that synchs --
bitcoin-cli -testnet gettransaction <transactionid>

you can also use curl to directly access the rpc api if you want other examples. https://bitcoin.org/en/download

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.