> For the complete documentation index, see [llms.txt](https://docs.nusa.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nusa.io/bahasa-indonesia/informasi/api-references/get-api-swaps_24h.md).

# GET /api/swaps\_24h

Returns a list of swap transactions that occurred in the last 24 hours.

## Response

Swap transactions will be returned in an array, and if there's any error message, it will be returned in the `error` field. Swap transaction fields are defined as follows:

| Field              | Description                                                                                                                                                                                                                                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tx_hash`          | The hash of the transaction.                                                                                                                                                                                                                                                                |
| `block_number`     | The block number of the transaction.                                                                                                                                                                                                                                                        |
| `sell_token`       | Token metadata and amount information for the sell token. Example: `"sell_token": { "name": "Binance-Peg BUSD Token", "symbol": "BUSD", "decimals": "18", "address": "0xe9e7cea3dedca5984780bafc599bd69add087d56", "amount": "2737788670260000000000", "amount_decimal": "2737.78867026" }` |
| `buy_token`        | Token metadata and amount information for the buy token. Example: `"buy_token": { "name": "USD Coin", "symbol": "USDC", "decimals": "18", "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d", "amount": "2723815229824314987154", "amount_decimal": "2723.81522982" }`                 |
| `trade_volume_usd` | Trade volume information in USD.                                                                                                                                                                                                                                                            |

## Example <a href="#example" id="example"></a>

Request: GET

```
https://api.nusa.finance/api/swaps_24h
```

Response

```
[
    {
        "tx_hash": "0xd1928c2b4c60829c0a5ff4052cc347eadfd7ff4b1b4bdbf431e4761e0ec437c9",
        "block_number": "25401459",
        "sell_token": {
            "name": "Binance Coin",
            "symbol": "BNB",
            "decimals": "18",
            "address": "",
            "amount": "15000000000000000",
            "amount_decimal": "0.01500000"
        },
        "buy_token": {
            "name": "Nusa Token",
            "symbol": "NUSA",
            "decimals": "18",
            "address": "0xe11f1d5eee6be945bee3fa20dbf46febbc9f4a19",
            "amount": "304083805794535307",
            "amount_decimal": "0.30408380"
        },
        "trade_volume_usd": "4.84991"
    },
    {
        "tx_hash": "0xd9a67e0669ca7ec1a5178fbb16cb521f26e6a24e49c18f4ca37bff87cb8e1090",
        "block_number": "25401543",
        "sell_token": {
            "name": "Nusa Token",
            "symbol": "NUSA",
            "decimals": "18",
            "address": "0xe11f1d5eee6be945bee3fa20dbf46febbc9f4a19",
            "amount": "11057000000000000000",
            "amount_decimal": "11.05700000"
        },
        "buy_token": {
            "name": "Binance-Peg BSC-USD",
            "symbol": "USDT",
            "decimals": "18",
            "address": "0x55d398326f99059ff775485246999027b3197955",
            "amount": "179343024773602851740",
            "amount_decimal": "179.34302477"
        },
        "trade_volume_usd": "179.37279"
    },
    {
        "tx_hash": "0x0fe544ddfd86051d421c15bb396ab15a6d9c040a72f9cacbdfab824501b0dd76",
        "block_number": "25421535",
        "sell_token": {
            "name": "Nusa Token",
            "symbol": "NUSA",
            "decimals": "18",
            "address": "0xe11f1d5eee6be945bee3fa20dbf46febbc9f4a19",
            "amount": "5500000000000000000",
            "amount_decimal": "5.50000000"
        },
        "buy_token": {
            "name": "Stream",
            "symbol": "STRM",
            "decimals": "18",
            "address": "0xc598275452fa319d75ee5f176fd3b8384925b425",
            "amount": "6328532538322772899771",
            "amount_decimal": "6328.53253832"
        },
        "trade_volume_usd": "82.51267"
    },
    {
        "tx_hash": "0xdd62623b7d6033f975dfd554c025e6d4dcbc8caa52d1cb6744857bf6ddcb14a1",
        "block_number": "25421586",
        "sell_token": {
            "name": "Nusa Token",
            "symbol": "NUSA",
            "decimals": "18",
            "address": "0xe11f1d5eee6be945bee3fa20dbf46febbc9f4a19",
            "amount": "5000000000000000000",
            "amount_decimal": "5.00000000"
        },
        "buy_token": {
            "name": "Duckie Land Multi Metaverse",
            "symbol": "MMETA",
            "decimals": "18",
            "address": "0x7a9c8d33963aecca9a821802adfaf5bd9392351f",
            "amount": "2836651085097341326350",
            "amount_decimal": "2836.65108509"
        },
        "trade_volume_usd": "80.57587"
    },
    ...
]
```
