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: 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 accessIt will return a list of trades fetched
Request Example:
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: 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.
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
anddecimals
.
Example:
You need to change <maker-name>
and <maker-key>
in this command accordingly.
The output will look like:
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:
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.
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
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.
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.
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
Test your trades on the new chain. You can run trades through the Hashflow UI to ensure trades on the new chain process successfully.
Success! You're on a new chain 🥳.
Last updated