# `FireblocksSdk.Api.ExchangeAccount`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.4/lib/fireblocks_sdk/api/exchange_account.ex#L1)

# `add_account`

Add an exchange account to the workspace.

```
FireblocksSdk.Api.ExchangeAccount.add_account([
  exchangeType: :binance,
  name: "My Binance Account",
  key: "api-key-here"
])
```

Options:
* `:exchangeType` - Required. The type of exchange account to add

* `:name` (`t:String.t/0`) - Required. Display name of the exchange account

* `:creds` (`t:String.t/0`) - Encrypted credentials

* `:key` (`t:String.t/0`) - API key of the exchange

* `:mainAccountId` (`t:String.t/0`) - Optional main account ID of the exchange

# `convert`

Convert assets on an exchange account.

```
FireblocksSdk.Api.ExchangeAccount.convert([
  exchangeId: "binance-account-id",
  amount: "100",
  srcAsset: "USDT",
  destAsset: "BTC"
])
```

Options:
* `:exchangeId` (`t:String.t/0`) - Required. The ID of the exchange account to convert assets on

* `:amount` (`t:String.t/0`) - Required. The amount to convert

* `:srcAsset` (`t:String.t/0`) - Required. The source asset to convert from

* `:destAsset` (`t:String.t/0`) - Required. The destination asset to convert to

# `get_account`

Find a specific exchange account by its ID.

- `exchange_id`: The ID of the exchange account to retrieve

# `get_account_asset`

Get a specific asset on an exchange account.

- `exchange_account_id`: The ID of the exchange account
- `asset_id`: The asset ID (e.g. `"BTC"`, `"ETH"`)

# `get_accounts`

List all exchange accounts (paginated).

Options:
* `:before` (`t:String.t/0`) - Fetch results before this cursor

* `:after` (`t:String.t/0`) - Fetch results after this cursor

* `:limit` (`t:non_neg_integer/0`) - Maximum number of results to return The default value is `3`.

# `get_credentials_public_key`

Get the public key used to encrypt exchange account credentials.

Returns the RSA public key that should be used to encrypt exchange API
credentials before submitting them via `add_account/2`.

# `transfer`

Transfer funds between trading accounts on the same exchange account.

```
FireblocksSdk.Api.ExchangeAccount.transfer([
  exchangeId: "binance-account-id",
  asset: "BTC",
  amount: "0.5",
  sourceType: :spot,
  destType: :futures
])
```

Options:
* `:exchangeId` (`t:String.t/0`) - Required. The ID of the exchange account to transfer from

* `:asset` (`t:String.t/0`) - Required. The asset to transfer

* `:amount` (`t:String.t/0`) - Required. The amount to transfer

* `:sourceType` - Required. The source trading account type. One of `:coin_futures`, `:coin_margined_swap`, `:exchange`, `:funding`, `:fundable`, `:futures`, `:futures_cross`, `:margin`, `:margin_cross`, `:options`, `:spot`, `:usdt_margined_swap_cross`, `:usdt_futures`, `:unified`

* `:destType` - Required. The destination trading account type. One of `:coin_futures`, `:coin_margined_swap`, `:exchange`, `:funding`, `:fundable`, `:futures`, `:futures_cross`, `:margin`, `:margin_cross`, `:options`, `:spot`, `:usdt_margined_swap_cross`, `:usdt_futures`, `:unified`

---

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