Get Bitcoin wallet transaction history
curl --request GET \
--url https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"addressType": "evm",
"cursor": "<string>",
"page": 1,
"pageSize": 123,
"result": [
{
"chainId": "bitcoin",
"block": {
"number": 123,
"timestamp": "<string>",
"hash": "<string>"
},
"transaction": {
"hash": "<string>",
"index": 123,
"status": "<string>",
"direction": "incoming",
"category": "<string>",
"summary": "<string>",
"methodLabel": "<string>",
"possibleSpam": true,
"initiatedBy": {
"address": "<string>",
"addressLabel": "<string>",
"entity": {
"id": "<string>",
"name": "<string>",
"logo": "<string>"
}
},
"from": {
"address": "<string>",
"addressLabel": "<string>",
"entity": {
"id": "<string>",
"name": "<string>",
"logo": "<string>"
}
},
"to": {
"address": "<string>",
"addressLabel": "<string>",
"entity": {
"id": "<string>",
"name": "<string>",
"logo": "<string>"
}
},
"fee": {
"amount": "<string>",
"amountRaw": "<string>"
},
"confirmations": 123,
"nativeTransfers": {
"items": [
{
"fromAddress": "<string>",
"toAddress": "<string>",
"amount": "<string>",
"direction": "incoming",
"isInternal": true
}
],
"hasMore": true
},
"tokenTransfers": {
"items": [
{
"fromAddress": "<string>",
"toAddress": "<string>",
"value": "<string>",
"direction": "incoming",
"tokenAddress": "<string>",
"tokenSymbol": "<string>",
"tokenName": "<string>",
"tokenDecimals": 123,
"tokenLogo": "<string>"
}
],
"hasMore": true
},
"nftTransfers": {
"items": [
{
"fromAddress": "<string>",
"toAddress": "<string>",
"tokenAddress": "<string>",
"tokenId": "<string>",
"amount": "<string>",
"direction": "incoming",
"tokenType": "<string>"
}
],
"hasMore": true
}
},
"raw": {
"bitcoin": {
"version": 123,
"size": 123,
"vsize": 123,
"coinbase": true,
"rbf": true,
"inputCount": 123,
"outputCount": 123,
"vin": [
{
"txid": "<string>",
"vout": 123,
"sequence": 123,
"addresses": [
"<string>"
],
"value": "<string>",
"isOwn": true
}
],
"vout": [
{
"n": 123,
"addresses": [
"<string>"
],
"value": "<string>",
"hex": "<string>",
"spent": true,
"isOwn": true
}
]
}
},
"meta": {}
}
],
"meta": {
"syncedAt": {
"bitcoin": "latest"
},
"unsupportedChains": [
"<string>"
],
"failedChains": [
"<string>"
],
"missingTransactions": null
}
}Wallet API
Wallet History
Get Bitcoin transaction history for a wallet. The wallet identifier accepts either a Bitcoin address or an xpub - when an xpub is supplied, history is aggregated across all derived addresses server-side.
Supported chain family: Bitcoin (native BTC transfers).
GET
/
v1
/
wallets
/
{walletAddressOrPublicKey}
/
history
Get Bitcoin wallet transaction history
curl --request GET \
--url https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moralis.com/v1/wallets/{walletAddressOrPublicKey}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"addressType": "evm",
"cursor": "<string>",
"page": 1,
"pageSize": 123,
"result": [
{
"chainId": "bitcoin",
"block": {
"number": 123,
"timestamp": "<string>",
"hash": "<string>"
},
"transaction": {
"hash": "<string>",
"index": 123,
"status": "<string>",
"direction": "incoming",
"category": "<string>",
"summary": "<string>",
"methodLabel": "<string>",
"possibleSpam": true,
"initiatedBy": {
"address": "<string>",
"addressLabel": "<string>",
"entity": {
"id": "<string>",
"name": "<string>",
"logo": "<string>"
}
},
"from": {
"address": "<string>",
"addressLabel": "<string>",
"entity": {
"id": "<string>",
"name": "<string>",
"logo": "<string>"
}
},
"to": {
"address": "<string>",
"addressLabel": "<string>",
"entity": {
"id": "<string>",
"name": "<string>",
"logo": "<string>"
}
},
"fee": {
"amount": "<string>",
"amountRaw": "<string>"
},
"confirmations": 123,
"nativeTransfers": {
"items": [
{
"fromAddress": "<string>",
"toAddress": "<string>",
"amount": "<string>",
"direction": "incoming",
"isInternal": true
}
],
"hasMore": true
},
"tokenTransfers": {
"items": [
{
"fromAddress": "<string>",
"toAddress": "<string>",
"value": "<string>",
"direction": "incoming",
"tokenAddress": "<string>",
"tokenSymbol": "<string>",
"tokenName": "<string>",
"tokenDecimals": 123,
"tokenLogo": "<string>"
}
],
"hasMore": true
},
"nftTransfers": {
"items": [
{
"fromAddress": "<string>",
"toAddress": "<string>",
"tokenAddress": "<string>",
"tokenId": "<string>",
"amount": "<string>",
"direction": "incoming",
"tokenType": "<string>"
}
],
"hasMore": true
}
},
"raw": {
"bitcoin": {
"version": 123,
"size": 123,
"vsize": 123,
"coinbase": true,
"rbf": true,
"inputCount": 123,
"outputCount": 123,
"vin": [
{
"txid": "<string>",
"vout": 123,
"sequence": 123,
"addresses": [
"<string>"
],
"value": "<string>",
"isOwn": true
}
],
"vout": [
{
"n": 123,
"addresses": [
"<string>"
],
"value": "<string>",
"hex": "<string>",
"spent": true,
"isOwn": true
}
]
}
},
"meta": {}
}
],
"meta": {
"syncedAt": {
"bitcoin": "latest"
},
"unsupportedChains": [
"<string>"
],
"failedChains": [
"<string>"
],
"missingTransactions": null
}
}The
walletAddressOrPublicKey path parameter accepts either a Bitcoin address or an xpub — when an xpub is supplied, history is aggregated across all derived addresses server-side.Address auto-detection: for a Bitcoin address or xpub, the
chains parameter is optional — Moralis detects the chain family from the address format. Passing chains=bitcoin explicitly still works.Path Parameters
Query Parameters
Response
200 - application/json

