# `CCXT.Transaction`
[🔗](https://github.com/ZenHive/ccxt_client/blob/main/lib/ccxt/transaction.ex#L1)

Unified deposit/withdrawal transaction data.

Represents a deposit or withdrawal on an exchange.

## Fields

  * `id` - Exchange transaction ID
  * `txid` - Blockchain transaction hash
  * `timestamp` - Transaction time in milliseconds
  * `datetime` - ISO 8601 datetime string
  * `address` - Destination address
  * `address_from` - Source address
  * `address_to` - Destination address
  * `tag` - Destination tag/memo
  * `tag_from` - Source tag/memo
  * `tag_to` - Destination tag/memo
  * `type` - "deposit" or "withdrawal"
  * `amount` - Transaction amount
  * `currency` - Currency code (e.g., "BTC")
  * `status` - "pending", "ok", "failed", "canceled"
  * `updated` - Last update timestamp in milliseconds
  * `fee` - Transaction fee
  * `network` - Blockchain network
  * `comment` - Transaction comment/note
  * `internal` - Whether this is an internal transfer
  * `info` - Raw exchange response

# `t`

```elixir
@type t() :: %CCXT.Transaction{
  address: String.t() | nil,
  address_from: String.t() | nil,
  address_to: String.t() | nil,
  amount: number() | nil,
  comment: String.t() | nil,
  currency: String.t() | nil,
  datetime: String.t() | nil,
  fee: CCXT.Fee.t() | nil,
  id: String.t() | nil,
  info: map() | nil,
  internal: boolean() | nil,
  network: String.t() | nil,
  status: String.t() | nil,
  tag: String.t() | nil,
  tag_from: String.t() | nil,
  tag_to: String.t() | nil,
  timestamp: integer() | nil,
  txid: String.t() | nil,
  type: String.t() | nil,
  updated: integer() | nil
}
```

# `deposit?`

```elixir
@spec deposit?(t()) :: boolean()
```

Returns true if this is a deposit.

# `pending?`

```elixir
@spec pending?(t()) :: boolean()
```

Returns true if the transaction is pending.

# `schema`

```elixir
@spec schema() :: map()
```

JSON Schema for the Transaction unified type.

# `withdrawal?`

```elixir
@spec withdrawal?(t()) :: boolean()
```

Returns true if this is a withdrawal.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
