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 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).
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
}
}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.chains parameter is optional — Moralis detects the chain family from the address format. Passing chains=bitcoin explicitly still works.Authorizations
Path Parameters
A Bitcoin address or an xpub. When an xpub is supplied, the API derives all addresses server-side.
Query Parameters
Chains to query. For the Bitcoin API, pass bitcoin.
bitcoin The limit per page
1 <= x <= 100The cursor to the next page
The order of items
ASC, DESC The start date from which to get the wallet history (format in seconds or string accepted by momentjs)
- Provide the param 'fromBlock' or 'fromDate'
- If 'fromDate' and 'fromBlock' are provided, 'fromBlock' will be used.
The end date from which to get the wallet history (format in seconds or string accepted by momentjs)
- Provide the param 'toBlock' or 'toDate'
- If 'toDate' and 'toBlock' are provided, 'toBlock' will be used.
The minimum block number from which to get the wallet history
- Provide the param 'fromBlock' or 'fromDate'
- If 'fromDate' and 'fromBlock' are provided, 'fromBlock' will be used.
The block number to get the wallet history until
When true, returns full raw chain-specific data including logs, input data, and vin/vout arrays. Array fields are capped at 100 items with a hasMore flag.
Response
The queried wallet address
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
The wallet address type
bitcoin "evm"
Opaque cursor token for pagination (null when no more pages)
Current page number (1-indexed)
1
Number of items in this page
Array of wallet history items
Show child attributes
Show child attributes
Response metadata with sync status and diagnostics
Show child attributes
Show child attributes

