# Get fungible token actions

Get fungible token actions

```
GET /ft-token-actions
```

## Query params

| Property                | Description                                   |
| ----------------------- | --------------------------------------------- |
| `contract_package_hash` | Filter token actions by contract package hash |
| `owner_hash`            | Filter token actions by owner hash            |
| `account_hash`          | Deprecated alias for `owner_hash`             |
| `from_block_height`     | From block height range                       |
| `to_block_height`       | To block height range                         |

## Sorting

| Property    | Description                              |
| ----------- | ---------------------------------------- |
| `timestamp` | Sort fungible token actions by timestamp |

Default sorting is `timestamp DESC`

## Optional properties

| Property                        | Type                                                                                  | Description                                                                          |
| ------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `contract_package`              | [`ContractPackage`](https://docs.cspr.cloud/rest-api/contract-package)                | Fungible contract package                                                            |
| `deploy`                        | [`Deploy`](https://docs.cspr.cloud/rest-api/deploy)                                   | Deploy in which the token action occurred                                            |
| `from_public_key`               | `string(68)`                                                                          | Action source public key if it's an account                                          |
| `to_public_key`                 | `string(68)`                                                                          | Action target public key if it's an account                                          |
| `to_account_info`               | [`AccountInfo`](https://docs.cspr.cloud/rest-api/account-info)                        | Action source account info if it's an account                                        |
| `to_centralized_account_info`   | [`CentralizedAccountInfo`](https://docs.cspr.cloud/rest-api/centralized-account-info) | Action target centralized account info if it's an account                            |
| `from_account_info`             | [`AccountInfo`](https://docs.cspr.cloud/rest-api/account-info)                        | Action target account info if it's an account                                        |
| `from_centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/rest-api/centralized-account-info) | Action target centralized account info if it's an account                            |
| `rate`                          | `float32`                                                                             | CSPR rate for specified currency that was relevant at the moment of deploy creation. |
| `from_cspr_name`                | `string`                                                                              | Primary CSPR.name of the source account, if it is an account                         |
| `to_cspr_name`                  | `string`                                                                              | Primary CSPR.name of the destination account, if it is an account                    |

## Response

[`PaginatedResponse`](https://docs.cspr.cloud/documentation/overview/pagination)[`<FTTokenAction>`](https://docs.cspr.cloud/rest-api/fungible-token-action)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/ft-token-actions?owner_hash=B6C26649540C59DECBC53274A67336D0588F6AD2AE0863A8A636DDDCC75689F0' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "data": [
    {
      "amount": "24928248069",
      "contract_package_hash": "0885c63f5f25ec5b6f3b57338fae5849aea5f1a2c96fc61411f2bfc5e432de5a",
      "deploy_hash": "0005f1e53afa9799a66a389a90caab84ab3cbd000ab7741e55e09f80c75002b6",
      "block_height": 1475677,
      "from_hash": null,
      "from_type": 1,
      "ft_action_type_id": 1,
      "timestamp": "2023-02-09T19:16:21Z",
      "to_hash": "b6c26649540c59decbc53274a67336d0588f6ad2ae0863a8a636dddcc75689f0",
      "to_type": 1,
      "transform_idx": 92
    },
    {
      "amount": "24928248069",
      "contract_package_hash": "0885c63f5f25ec5b6f3b57338fae5849aea5f1a2c96fc61411f2bfc5e432de5a",
      "deploy_hash": "0005f1e53afa9799a66a389a90caab84ab3cbd000ab7741e55e09f80c75002b6",
      "block_height": 1475677,
      "from_hash": "b6c26649540c59decbc53274a67336d0588f6ad2ae0863a8a636dddcc75689f0",
      "from_type": 1,
      "ft_action_type_id": 2,
      "timestamp": "2023-02-09T19:16:21Z",
      "to_hash": "a5a9a804a383f3b0e131c85d471542af2c6d4ec57bab39182ba93dd7bd86f46c",
      "to_type": 1,
      "transform_idx": 104
    },
    ...
    {
      "amount": "22894649700",
      "contract_package_hash": "0885c63f5f25ec5b6f3b57338fae5849aea5f1a2c96fc61411f2bfc5e432de5a",
      "deploy_hash": "00194e8c2076ae84447a8ccabf39ad1eb1a090ab4e592989fd497961fb0b7293",
      "block_height": 1461592,
      "from_hash": "b6c26649540c59decbc53274a67336d0588f6ad2ae0863a8a636dddcc75689f0",
      "from_type": 1,
      "ft_action_type_id": 4,
      "timestamp": "2023-02-04T10:52:19Z",
      "to_hash": null,
      "to_type": 1,
      "transform_idx": 147
    }
  ],
  "item_count": 97704,
  "page_count": 9771
}
```
