How To Guides

A variety of how-tos for common market making needs

1. Getting the list of trades

We provide a REST API that can return pagniated trades from a particular range for a particular pool

  • The API Endpoint is:

  • You need to provide your marketMaker, networkId , pool, startTs (optional), endTs (optional) , skip (optional) , limit (optional) and authentication key to access

  • It will return a list of trades fetched

Request Example:

curl "<networkId>&pool=<poolAddress>&" \
"startTs=1659550186&endTs=1659700186&marketMaker=<MakerName>" \
-H "authorization:<maker-key>"

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.

  • The API Endpoint is:

  • You will need to provide below example field in body to post the restriction together with authentication key to access the endpoint.

    "marketMakerName": 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:

  • You need to provide your maker name and key to access.

  • It will return those fields: chainType, chainID, token (address), name and decimals.


curl "<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 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 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 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 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 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 🥳.

Last updated