Get account transaction with transfers

Retrieves transaction details for a specific transaction including STX transfers for each transaction.

GET
/extended/v1/address/{principal}/{tx_id}/with_transfers

Path Parameters

principalSTX Address & Smart Contract ID
tx_idstring

Transaction ID

Response Body

Transaction with STX transfers for a given address

TypeScript Definitions

Use the response body type in TypeScript.

txTokenTransferTransaction & SmartContractTransaction & ContractCallTransaction & PoisonMicroblockTransaction & CoinbaseTransaction & TenureChangeTransaction
stx_sentstring

Total sent from the given address, including the tx fee, in micro-STX as an integer string.

stx_receivedstring

Total received by the given address in micro-STX as an integer string.

stx_transfersarray<object>
ft_transfers?array<object>
nft_transfers?array<object>

Default Response

TypeScript Definitions

Use the response body type in TypeScript.

errorstring
message?string
[key: string]any
curl -X GET "https://api.hiro.so//extended/v1/address/SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP/0x34d79c7cfc2fe525438736733e501a4bf0308a5556e3e080d1e2c0858aad7448/with_transfers"
fetch("https://api.hiro.so//extended/v1/address/SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP/0x34d79c7cfc2fe525438736733e501a4bf0308a5556e3e080d1e2c0858aad7448/with_transfers")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://api.hiro.so//extended/v1/address/SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP/0x34d79c7cfc2fe525438736733e501a4bf0308a5556e3e080d1e2c0858aad7448/with_transfers"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.hiro.so//extended/v1/address/SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP/0x34d79c7cfc2fe525438736733e501a4bf0308a5556e3e080d1e2c0858aad7448/with_transfers"

response = requests.request("GET", url)

print(response.text)
{
  "tx": {
    "tx_id": "string",
    "nonce": 0,
    "fee_rate": "string",
    "sender_address": "string",
    "sponsor_nonce": 0,
    "sponsored": true,
    "sponsor_address": "string",
    "post_condition_mode": "allow",
    "post_conditions": [
      {
        "principal": {
          "type_id": "principal_origin"
        },
        "condition_code": "sent_equal_to",
        "amount": "string",
        "type": "stx"
      }
    ],
    "anchor_mode": "on_chain_only",
    "block_hash": "string",
    "block_height": 0,
    "block_time": 0,
    "block_time_iso": "string",
    "burn_block_time": 0,
    "burn_block_height": 0,
    "burn_block_time_iso": "string",
    "parent_burn_block_time": 0,
    "parent_burn_block_time_iso": "string",
    "canonical": true,
    "tx_index": 0,
    "tx_status": "success",
    "tx_result": {
      "hex": "string",
      "repr": "string"
    },
    "event_count": 0,
    "parent_block_hash": "string",
    "is_unanchored": true,
    "microblock_hash": "string",
    "microblock_sequence": 0,
    "microblock_canonical": true,
    "execution_cost_read_count": 0,
    "execution_cost_read_length": 0,
    "execution_cost_runtime": 0,
    "execution_cost_write_count": 0,
    "execution_cost_write_length": 0,
    "vm_error": "string",
    "events": [
      {
        "event_index": 0,
        "event_type": "smart_contract_log",
        "tx_id": "string",
        "contract_log": {
          "contract_id": "string",
          "topic": "string",
          "value": {
            "hex": "string",
            "repr": "string"
          }
        }
      }
    ],
    "tx_type": "token_transfer",
    "token_transfer": {
      "recipient_address": "string",
      "amount": "string",
      "memo": "string"
    }
  },
  "stx_sent": "string",
  "stx_received": "string",
  "stx_transfers": [
    {
      "amount": "string",
      "sender": "string",
      "recipient": "string"
    }
  ],
  "ft_transfers": [
    {
      "amount": "string",
      "asset_identifier": "string",
      "sender": "string",
      "recipient": "string"
    }
  ],
  "nft_transfers": [
    {
      "value": {
        "hex": "string",
        "repr": "string"
      },
      "asset_identifier": "string",
      "sender": "string",
      "recipient": "string"
    }
  ]
}
{
  "error": "string",
  "message": "string"
}