# Bir cüzdanın geçmişi nasıl alınır

## Cüzdanın geçmişi nedir?

Bir cüzdanın geçmişi, bir kripto cüzdanıyla ilişkili olan hem alacak hem de borç işlemlerini içeren tüm işlemlerin eksiksiz kaydını ifade eder.

## Moralis ile nasıl yapılır

Moralis, kullanabileceğiniz bir Wallet API’ye sahiptir ve hatta cüzdan geçmişi kullanım senaryosu için bir kod örneği de sunarlar:

* [Cüzdan geçmişini al](https://docs.moralis.io/web3-data-api/evm/reference/wallet-api/get-wallet-history)

Kod örneklerini uyarlamak için, Ethereum’a yapılan referansı Chiliz Chain kimliğiyle değiştirin, `0x15b38`:

```typescript
import Moralis from 'moralis';

try {
  await Moralis.start({
    apiKey: "YOUR_API_KEY"
  });

  const response = await Moralis.EvmApi.wallets.getWalletHistory({
    "chain": "0x15b38", // Bu, Chiliz Chain Mainnet içindir.
                        // Spicy Testnet için "0x15b32" kullanın.
    "order": "DESC",
    "address": "0xYourWalletAddress"
  });

  console.log(response.raw);
} catch (e) {
  console.error(e);
}
```

## Tatum ile nasıl yapılır

Tatum, kullanabileceğiniz kapsamlı bir Data API’ye sahiptir ve hatta cüzdan geçmişi kullanım senaryosu için bir kod örneği de sunarlar:

* [Bir cüzdanın tüm işlemlerini al](https://docs.tatum.io/docs/get-all-transactions-on-the-wallet)

Kod örneklerini uyarlamak için, Ethereum’a yapılan referansı Chiliz Chain ile değiştirin:

```typescript
// yarn add @tatumio/tatum
import {TatumSDK, Network, Chiliz, ResponseDto, AddressTransaction} from '@tatumio/tatum'

const tatum = await TatumSDK.init<Chiliz>({network: Network.CHILIZ})

const txs: ResponseDto<AddressTransaction[]> = await tatum.address.getTransactions({
  address: '0xYourWalletAddress', // adresinizle değiştirin
})

console.log(txs.data)
```

## thirdweb ile nasıl yapılır

thirdweb'ün dokümantasyon sitesinde ilham alabileceğimiz birkaç kısa kod örneği vardır.

Ne yazık ki, işlemlere özel fonksiyonlara sahip görünmüyorlar, bu yüzden şuna güveneceğiz: [Chiliz Scan API](https://scan.chiliz.com/api-docs).

```typescript
const { ThirdwebSDK } = require("@thirdweb-dev/sdk");
const axios = require("axios");

const sdk = new ThirdwebSDK("https://rpc.chiliz.com");
const walletAddress = "0xYourWalletAddress";

// ChilizScan API URL’si ve API anahtarınız (gerekli)
const CHILIZ_SCAN_API_URL = "https://api.chilizscan.com/api";
const API_KEY = "YourChilizScanAPIKey"; // İsteğe bağlı, eğer API kimlik doğrulama gerektiriyorsa

async function getTransactionHistory() {
  try {
    const response = await axios.get(`${CHILIZ_SCAN_API_URL}?module=account&action=txlist&address=${walletAddress}&apikey=${API_KEY}`);
    const transactions = response.data.result;

    console.log(`Cüzdan ${walletAddress} için işlem geçmişi:`, transactions);
  } catch (error) {
    console.error("İşlem geçmişi alınırken hata oluştu:", error);
  }
}

getTransactionHistory();
```

## Nodit ile nasıl yapılır

Nodit aşağıdaki kod örneğini sağlar [dokümanlarında](https://developer.nodit.io/reference/chiliz-gettransactionsbyaccount):

```typescript
const url = 'https://web3.nodit.io/v1/chiliz/mainnet/blockchain/getTransactionsByAccount';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    'X-API-KEY': 'nodit-demo'
  },
  body: JSON.stringify({
    accountAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
    relation: 'both',
    fromDate: '2025-01-01T00:00:00+00:00',
    toDate: '2025-01-31T00:00:00+00:00',
    withCount: false,
    withLogs: false,
    withDecode: false
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chiliz.com/tr-ai/develop/basics/how-tos/how-to-get-the-history-of-a-wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
