# Exchanges

This section describes how to integrate the 1Money Network into an exchange.&#x20;

## Connect to the 1Money Network&#x20;

Make sure you are connected to the 1Money Network's [Rest API Endpoints and Websockets](/integrations/network-access.md).&#x20;

## Deposits

{% hint style="warning" %}
Note that the 1Money Network has checkpoints instead of blocks. You can think of a checkpoint as similar to the concept of a block in traditional blockchains. A checkpoint in the 1Money Network represents a specific point in time that captures the current state of each account, including newly distributed transaction fees credited to validators’ accounts. &#x20;

Learn more about checkpoints in the [system components section](/core-concepts/system-components.md).&#x20;
{% endhint %}

Exchanges should follow these steps for deposits:&#x20;

1. **Track the latest checkpoint and transaction data**
   * Use the [get checkpoint by latest number API](/integrations/rest-apis/checkpoints/get-checkpoint-by-number.md) to get the latest checkpoint number&#x20;
   * Compare the network's checkpoint number to your local checkpoint number and make sure they match
   * If they match, then use the [get checkpoint by number API](/integrations/rest-apis/checkpoints/get-checkpoint-by-number.md) to pull all the transaction data from that checkpoint &#x20;
     * Input the checkpoint number and set full=true. For example: <https://api.testnet.1money.network/v1/checkpoints/by_number?number=1000&full=true>
2. **Confirm customer deposit**&#x20;
   * Match your customer's address with the data structure in the transaction data queried in part 1 (above)&#x20;
   * Once the customer deposit is confirmed, credit the balance to your local database
   * As a check, exchanges can use the [get account balance API](broken://pages/8nPLuFVcftw3S5Vc0Jal) to ensure the customer deposits are correct compared to their local database&#x20;

## Withdrawals

To initiate a withdrawal, an exchange should:&#x20;

1. Prepare the transaction with a private key signature&#x20;
   * Use the[ submit payment API](/integrations/rest-apis/transactions/submit-payment.md) to prepare the transaction&#x20;
2. Send signed transaction to the network&#x20;

In special instances where a transaction is not approved by 2/3 of the validators, an exchange can cancel a transaction using the [submit cancellation API](broken://pages/CKlej1sznaNwkUBuKWCV).&#x20;

## How to check on the status of your transaction

Follow these steps to check on the status of your transaction:

1. Once you submitted a transaction, you will automatically get a hash as a return&#x20;
2. Use [Get Transaction Receipt by Hash](/integrations/rest-apis/transactions/get-transaction-receipt-by-hash.md) to check the transaction status

Note that transactions on the network are finalized instantly, so there is no need wait for a checkpoint to be generated.

## Additional Resources

* [**Transaction types**](/integrations/data-dictionary/transaction-types.md) — all possible transaction types, including relevant documentation


---

# 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://developer.1moneynetwork.com/exchanges.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.
