# 3) Add and edit transactions

## **I) Add a transaction manually**

> *Double-click or press the “F” key to display the video in full screen.*

{% embed url="<https://www.loom.com/share/05b5b13454a246c984c2a9a3fa0e4cf8?sid=fdcc5c8f-3131-4cfd-a6cf-22cfc2778fe3>" %}
Add a "Buy" type transaction
{% endembed %}

* Click the “Add transaction” button to open the corresponding pop-up window.

<figure><img src="/files/ycDlNjANBdR37FPzkCjG" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/rtewcBOXfqmw7MBjPjuD" alt="“Add Transaction” window"><figcaption><p>“Add Transaction” window</p></figcaption></figure>

### Buy

* **Transaction type**
  * Click the button “Buy” (already selected by default).

* **Cryptocurrency**
  * Select the cryptocurrency you want to trade.&#x20;
  * You can type the name of the cryptocurrency or its symbol in the search bar.

> *Double-click or press the “F” key to display the video in full screen.*

{% embed url="<https://www.loom.com/share/e5df740aba304101a5499d6892e1920a?sid=7d6f3c11-50b5-4522-a575-3df58068f0be>" %}
Select the cryptocurrency of your choice.
{% endembed %}

* **Quantity and Price**
  * Then, enter the number of tokens purchased, and the purchase price (per token).
  * You can choose the currency in which you made this transaction.
    * Even if you buy your cryptocurrencies in dollars ($), you can still view your dashboard in euros (€) only, using the currency selector (see [2) Exploring the dashboard](/documentation/en/2-exploring-the-dashboard.md)).&#x20;

* **Capital and checkbox**
  * The invested capital is automatically calculated by multiplying the “Quantity” and “Price” fields.
  * If the “Include in deposits” checkbox is selected, this capital will be added to your Deposits at the bottom left of your dashboard (see [2) Exploring the dashboard](/documentation/en/2-exploring-the-dashboard.md)).&#x20;

* **Exchange (optional)**
  * Indicate the exchange or wallet where the transaction took place.
  * You can use the search bar to find the desired value more easily.
  * If your exchange or wallet is not in the list, you can add it.
  * Specifying the exchange allows you to fill in the corresponding distribution graph.

* **Date (optional)**
  * Specify the date in MM/DD/YYYY format.
  * Click the calendar icon to navigate more easily.

* **Transaction fees (optional)**
  * Once specified, transaction fees have a negative impact on Profitability.

* **Comment (optional)**
  * You can add personal notes for each transaction.
  * These comments will appear in the Transactions section of your dashboard, when you hover over the name of the cryptocurrency on the relevant line.

<figure><img src="/files/se4yvkoE2YgKvdm5wbG6" alt=""><figcaption><p>Comments on transactions</p></figcaption></figure>

* **Confirm**
  * Once you have completed the fields, click the “Confirm” button.
  * Congratulations, you have entered your first transaction! 🎉
  * The transaction appears at the bottom right of your dashboard.
  * If this is your first transaction with this cryptocurrency, it will also be added to your portfolio.

<figure><img src="/files/E4qa6LSWOpVJXCvIB3vh" alt=""><figcaption><p>Here, Solana has been added to transactions and to the portfolio.</p></figcaption></figure>

This means that every transaction you add manually contributes to building your portfolio.

### Sell

* The logic is exactly the same as for “Buy,” except that you must select “Sell” in the first step.
* This time, the quantity refers to the number of tokens sold, and the price corresponds to the average sale price per token.
* The sold capital is added to Withdrawals if you have checked the “Include in withdrawals” box.

### Swap

{% hint style="info" %}
A “swap” (or exchange contract) refers to a conversion between two cryptocurrencies.

* Since the value of your portfolio remains unchanged, a swap has no impact on your profitability, nor on the amount of your deposits and withdrawals.
* For this reason, the “Include in deposits and withdrawals” box is unchecked by default.
  {% endhint %}

{% hint style="info" %}
When should you perform a swap?

* A swap can be considered as two merged transactions:
  * Sale of crypto #1 for an amount X.
  * Purchase of crypto #2 for the same amount X.
* For example, if you prefer to convert your Bitcoins into stablecoins rather than euros in order to avoid taxation, you are performing a swap.
  * Thus, rather than selling your crypto assets and converting them back into fiat money (euros, dollars, etc.), you secure your profits by transferring them into a stablecoin (e.g., USDC).
    {% endhint %}

**Transaction type**

* In the first line, click the “Swap” button.

The first part of the interface is slightly different than for “Buy” and “Sell.” It consists of two selectors (Crypto 1 & 2) and four fields:

* Quantity 1 & 2
* Price 1 & 2

<figure><img src="/files/3oJXDyJILmK34xGOUYYu" alt="Swap overview"><figcaption><p>Swap overview</p></figcaption></figure>

**Transaction direction**

* (From) Crypto 1: the one held in your wallet, which you are converting.
* (To) Crypto 2: the one you get after the swap.
  * An icon between the two cryptocurrencies allows you to reverse the direction of the transaction.

**Locked mode**

* Locked mode (default):
  * Fill in one of the 4 fields.
  * The other 3 are automatically filled in, based on the current conversion rate between the 2 cryptocurrencies.
  * The two “Capital” fields are automatically generated and are always equal.
* Unlocked mode:
  * You can freely enter values in the four fields, without them affecting each other.
  * This mode is particularly useful if you want to include transactions made a few days earlier, where the conversion rate between the two cryptocurrencies has since changed.

{% hint style="danger" %}

* In unlocked mode, make sure that the values in the “Capital” fields are equivalent (at least, with a difference of less than 1%).
* Otherwise, this transaction will cause a discrepancy in the calculation of metrics.
  {% endhint %}

{% hint style="success" %}

* If this constraint is a problem to you, you can break down a swap into two transactions:
  * “Sell” transaction of Crypto #1 for an amount X.
  * “Buy” transaction of Crypto #2 for the same amount X.
* In this case, make sure to uncheck the “Include in deposits/withdrawals” box in both transactions, so that it doesn't impact your profitability.
  {% endhint %}

**Confirm**

* Once you have completed the fields, click the “Confirm” button.
* The transaction will appear at the bottom right of your dashboard.
* It will show the two cryptocurrencies involved in the swap, as well as the ratio between the two cryptocurrencies.

<figure><img src="/files/gMBfCfVsYHgEW6iTmsZy" alt="Swap transaction"><figcaption><p>Swap transaction</p></figcaption></figure>

### How do I indicate a transfer?

When you transfer crypto from one platform to another (or to a Ledger-type hardware wallet), create the following:

* A “Sell” transaction of the crypto from Exchange #1.
* Then a “Buy” transaction of the same crypto to Exchange #2.
  * If you wish, add the transaction fees...
  * ...or indicate the new (slightly lower) amount of tokens , corresponding to the transfer fee.
* The associated cryptocurrency will now be linked to Exchange #2.

{% hint style="success" %}
If you do not want to create new transactions, you can also proceed as follows:

* Edit your transactions linked to the relevant cryptocurrency and replace Exchange #1 with Exchange #2 (see [#iii-edit-transactions](#iii-edit-transactions "mention")).
  * You can also add comments explaining the reasons for the transfer, as well as the date on which the transfer occured.
    {% endhint %}

### What if I have a lot of transactions to integrate?

The initial setup of Crypto Excel can be tedious if you want to integrate dozens or hundreds of transactions.

Here's how to set up your dashboard as quickly as possible:

* Still using the manual method, here's a tip: **enter a&#x20;*****single*****&#x20;transaction for each cryptocurrency held in your portfolio**.
  * In the purchase price, enter the average purchase price (for all your transactions involving this cryptocurrency).
  * This will speed up the import of your user data, without impacting your profitability.
    * Example: if you hold 25 cryptocurrencies and have made 130 transactions, you will only have to enter 25 transactions.
* Add your transactions automatically (see the next section [#ii-add-transactions-automatically-via-an-api-connection-to-an-exchange](#ii-add-transactions-automatically-via-an-api-connection-to-an-exchange "mention")).

***

## **II)** Add transactions automatically via an API connection to an exchange

Our application provides connections to the following exchanges:

* Binance
* Coinbase
* Bybit
* Kraken
* Gate.io
* Kucoin
* Bitfinex

{% hint style="info" %}
For any other platforms not available in the list, please refer to the section [#i-add-a-transaction-manually](#i-add-a-transaction-manually "mention").
{% endhint %}

### First connection

To connect to an exchange, follow the steps below:

* Click the “API Connection” button to display the “My Wallets” pop-up window.
* Select the exchange of your choice.
* A dedicated page will provide you with instructions on how to generate an API key from the relevant platform.
* Once this is done, copy and paste the fields into the page and click “Confirm” to finalize the connection.

{% hint style="info" %}
The keys are configured for read-only access. In other words, they do not have write permission and therefore cannot trigger a transfer of funds. In addition, once the key has been generated, you can revoke its access at any time.
{% endhint %}

{% hint style="info" %}
The API key (public) remains visible from the exchange, but the secret key (private) is only visible **once**, when it is created. Be sure to keep it in a safe place, because if you forget it, you will have to generate a new API key.
{% endhint %}

{% hint style="warning" %}

* If you receive an error message stating “**The keys are incorrect**”:
  * Double-check the instructions and make sure you have entered the information in the right place. To avoid copying errors, use the copy and paste functions.
  * If you receive this error message on Brave, please try again on Google Chrome.
    {% endhint %}

* A **confirmation message** appears to indicate that the import is in progress. Depending on the number of transactions to process, this may take up to a minute.

<figure><img src="/files/oyefRudvlZwgrbxBDB1E" alt="Synchronization in progress"><figcaption><p>Synchronization in progress</p></figcaption></figure>

* Once the API connection is established, your **transactions** and **cryptocurrencies** will automatically appear in your dashboard.

{% hint style="danger" %}
After connecting an exchange platform, **do not manually add transactions** from that exchange. This would result in **duplicated operations**.
{% endhint %}

{% hint style="warning" %}
**Scope of API connections**

* API connections only retrieve assets from the following accounts:
  * **Trading** (Spot)
  * **Futures**
  * **Convert**
* Therefore, cryptocurrencies held in these accounts will **not be detected**:
  * **Lending**
  * **Staking**
  * **Earn**
    {% endhint %}

**Portfolio tracking**

* You can view the total amount held for each connected exchange from the “My Wallets” pop-up window.

<figure><img src="/files/LYadrMO1Q9mNJxbuEDXg" alt="Amount held in each synchronized exchange"><figcaption><p>Amount held in each synchronized exchange</p></figcaption></figure>

* You may delete an exchange connection at any time.
  * This action will erase **all imported transactions**, as well as the **associated balances** in the Portfolio section.

### Additional information and transaction types

Unlike transactions that are added  manually , synchronization with exchanges is done in two stages:

* First with balances (quantities of each cryptocurrency currently held)
* Then with transactions.

If some transactions are not detected, Crypto Excel automatically generates fake transactions to match the balances between the Portfolio and the Transactions.

* These transactions are recognizable by the label “Fill.”
* They may encompass several real transactions.
* They have no associated date.
* The button is the same color as the transaction type: “Buy,” “Sell,” or “Swap.”
* They are editable (see next section [#iii-editing-transactions](#iii-editing-transactions "mention")).
* Once modified, they revert to the original label “Buy,” “Sell,” or “Swap.”

<figure><img src="/files/Bgi9ieD99OJhDD3c1pUt" alt="Fake transactions"><figcaption><p>Fake transactions</p></figcaption></figure>

{% hint style="info" %}
If certain information is missing when you first log in, we apologize, but this is not our fault: by definition, an API is an interface that connects to the platform and allows data to be exchanged. The API therefore only returns the information that the exchange is willing to share with us.

There are several reasons why partial information may be reported:

* transactions made several years ago
* server migration
* MiCA regulations
* etc.

Fortunately, once an exchange is connected, all new transactions are reported without error.
{% endhint %}

* Finally, if Crypto Excel detects incoming or outgoing movements from the exchange, it creates a movement transaction.
  * Labeled “Entry” for any movement sent to the platform.
  * Labeled “Exit” for any outgoing movement.

<figure><img src="/files/ZryyqhvfPk7V7f69Pd6R" alt="Movement transactions"><figcaption><p>Movement transactions</p></figcaption></figure>

{% hint style="info" %}

* These transactions only show the quantity of tokens transferred.
* The price and capital fields remain empty, as these transactions have no associated monetary value.
* They have no impact on profitability, which is logical given the nature of this transaction. Therefore, the “Include in deposits/withdrawals” box is unchecked by default.
  {% endhint %}

{% hint style="warning" %}

* It is not recommended to edit these transactions.
* If you do not want them to appear on your dashboard, simply delete them (see [#iii-editing-transactions](#iii-editing-transactions "mention")).
  {% endhint %}

***

## **III)** Editing transactions

At any given time, you can edit a transaction by clicking the button at the beginning of the relevant line.

> *Double-click or press the “F” key to display the video in full screen.*

{% embed url="<https://www.loom.com/share/7379d4f6cc514c469712ffe65865e10c?sid=f186eae2-440f-46c2-b00c-cbedae3570d7>" %}
Edit an existing transaction
{% endembed %}

### Edit a transaction

* In the “Edit transaction” pop-up window, edit the fields you want to change.
* Then click the “Edit” button to confirm the changes.

### Delete a transaction

* Click the “Delete” button.
* The transaction will be immediately deleted from the list.

{% hint style="info" %}

* If this transaction comes from an API connection, it will remain deleted and will not be added back during the next update.
* If you deleted this transaction by mistake, do one of the following:
  * Re-enter this transaction manually.
  * Delete the API connection to completely reset the connection to this exchange, before reconnecting again.
    {% endhint %}

### Editing a cryptocurrency that has changed its name

* Sometimes a cryptocurrency changes its name following a hard fork or rebranding.&#x20;
* In such cases, the API retains the old name ‘A’, while a new cryptocurrency “B” is created.&#x20;
* The disadvantage is that the price will **no longer be updated** for cryptocurrency “A”.

Here are two methods for updating your dashboard.

{% hint style="warning" %}
In both cases, pay attention to the **conversion rate** between the two cryptocurrencies.
{% endhint %}

* **Method 1**:&#x20;
  * Modify all your old transactions containing cryptocurrency “A” and replace it with the new “B”.

{% hint style="info" %}
You can also add a **comment** specifying the conversion date and the ratio applied.
{% endhint %}

* **Method 2**:
  * Create a “Swap” transaction on the corresponding date to convert your cryptocurrency “A” to “B”.

{% hint style="success" %}

* This method is particularly useful if you prefer to avoid modifying a large number of transactions.
* It better reflects reality and **preserves the history of your transactions**.
  {% endhint %}

***

Please feel free to ask questions if you need to. We will continue to expand this documentation based on your feedback.


---

# 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://cryptoexcel.gitbook.io/documentation/en/3-add-and-edit-transactions.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.
