# How To Guides

### 1. Getting the list of trades

We provide a `REST` API that can return pagniated trades from a particular range for a particular pool&#x20;

* The API Endpoint is: <https://api.hashflow.com/maker/v3/trades>
* You need to provide your `marketMaker`, `networkId` , `pool`, `startTs (optional)`, `endTs (optional)` , `skip (optional)` , `limit (optional)` and authentication key to access&#x20;
* It will return a list of trades fetched

Request Example:

<pre class="language-bash"><code class="lang-bash"><strong>curl "https://api.hashflow.com/maker/v3/pool/getTrades?networkId=&#x3C;networkId>&#x26;pool=&#x3C;poolAddress>&#x26;" \
</strong><strong>"startTs=1659550186&#x26;endTs=1659700186&#x26;marketMaker=&#x3C;MakerName>" \
</strong><strong>-H "authorization:&#x3C;maker-key>"
</strong></code></pre>

### 2. Post Trade Restriction

We provide a `REST` API that allow market makers to post a restriction without having to respond to a quote with it.&#x20;

* The API Endpoint is: <https://api.hashflow.com/maker/v3/restriction>
* You will need to provide below example field in body to post the restriction together with authentication key to access the endpoint.&#x20;

```json
{
    "marketMaker": string,
    "trader": string,
    "reason": "rate_limit",
    "expiryTimestampMs": number, //optional
    "chain": {
        "chainType": string, //evm|solana 
        "chainId": number
    } // optional
}
```

* It will return with a success response

### 3. Getting the list of supported tokens

We provide a `REST` API that can return a list of supported tokens:

* The API endpoint is: <https://api.hashflow.com/maker/v3/tokens>
* You need to provide your maker name and key to access.
* It will return those fields: `chainType`, `chainID`, `token` (address), `name` and `decimals`.

Example:

```bash
curl "https://api.hashflow.com/maker/v3/tokens?marketMaker=<maker-name>" \
-H "authorization:<maker-key>"
```

You need to change `<maker-name>` and `<maker-key>` in this command accordingly.

The output will look like:

```
{
  "status": "success",
  "tokens": [
    {
      "chainType": "evm",
      "chainId": 1,
      "token": "0x0000000000000000000000000000000000000000",
      "name": "ETH",
      "decimals": 18
    },
    {
      "chainType": "evm",
      "chainId": 42,
      "token": "0x0000000000000000000000000000000000000000",
      "name": "ETH",
      "decimals": 18
    },
    ...
}
```

### Supporting other chains

You've finished [setting up](https://docs.hashflow.com/hashflow/market-making/broken-reference) your market maker on Ethereum but want to expand to market making on other chains? Simply follow these steps:

1. **Contact the hashflow team** (via Telegram/Discord) and tell us which chains you'd like to support. We'll then add them to your market making config which controls the market makers we request for trades on each chain.
2. **Create a new pool**. You will need to [create a pool](https://docs.hashflow.com/hashflow/market-making/broken-reference) for the new chain. The steps are identical to the pool you created before. If you're using an EOA:
   * You can re-use the EOA but will need a new pool
   * You'll also need to add allowances for the new pool to your EOA
3. **Support 'priceLevels'** **for the new chain**. Extend your [priceLevels logic](https://docs.hashflow.com/hashflow/market-making/broken-reference) to also publish the pairs that you will be market making on the new chains. We need this to route trades your way.
4. **Support 'RFQ' for the new chain**. Extend your [market making logic](https://docs.hashflow.com/hashflow/market-making/broken-reference) to respond with quotes for RFQs on the new chain. In your quotes, include the new pool you created.
5. **Support 'signQuote' for the new chain**. Extend your [signature logic](https://docs.hashflow.com/hashflow/market-making/broken-reference) to work for the new chain. The only difference here is that you need to sign with the applicable pool/EOA
6. **Test your trades on the new chain**. You can run trades through the Hashflow UI to ensure trades on the new chain process successfully.
7. **Success!** You're on a new chain 🥳.
