0.0.15 • Published 4 months ago

@hashflow/market-maker v0.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

maker-js

Typescript library which exposes the hashflow market maker APIs

HashflowMaker

All necessary functions are exposed through the HashflowMaker object. This API object takes the following arguments to its constructor:

  1. name: Your market maker's name. This must match the name that used when requesting the Hashflow team to add your market maker to the allowlist.
  2. authKey: Your authentication key. These are unique keys generated by the Hashflow team during the vetting phase. If you haven't gone through this process, you can contact us on Discord.
  3. engine: An instance of MakerEngine which defines the configuration, pricing strategy, and callback to handle trade confirmation. See next section.
  4. secp256k1Signer: A function which takes a UInt8Array, signs it with your key, and returns a signature and recid.
  5. environment (optional): Allows specifying 'staging' for connecting to the non-production API. By default, this is set to 'production'.
  6. makerIndex (optional): Allows specifying an index for your maker.
  7. levelsUpdateRatePerSecond (optional) The rate at which to update price levels.
  8. logger (optiona) A WinstonLogger for log messages.
  9. apiUrl (optional) The Websocket API URL to connect to.

Once the HashflowMaker has been constructed, it will connect to the API, publish price levels, and respond to RFQs.

MakerEngine

You must provide a MakerEngine instance operate the maker. See the jsDoc in the MakerEngine interface definition and the tests in HashflowMaker.test.ts for details on how to build your MakerEngine.

Quote Hashing

We also expose quote hashing functionality directly, so you can use that within your own API client. The function getQuoteHash, given an RFQ and an unsigned Quote, will return the hash which must be signed with SECP256K1 to create the quote signature.

0.0.15

4 months ago

0.0.14

5 months ago

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

7 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

8 months ago

0.0.1

8 months ago