New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

invisible-marketmaker

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

invisible-marketmaker

The market maker code for invisible Exchange.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

marketmaker

The market maker code for invisible Exchange.

Description

This is the market maker code to create and run your own mm strategies on Invisible L2. There are two main components that you need to know about:

  • The first is the main Exchange logic that is responsible for storing and keep track of your state and building and sending orders. The functions that you need to know about are descibed here: Orders
  • And the second is the environment where you can create your custom marketmaker strategies or customize the default one.

Examples

Define the configurations in the config.json

{
  "privKey": "0x44444444444444444444444444444444444444444444444444444444445",
  "SERVER_URL": "localhost",
  "EXPIRATION_TIME": 10,
  "config": {
    "symbol": "BTC",
    "market_id": 21,
    "name": "bitcoin",
    "slippageRate": 1e-4,
    "maxSize": 10,
    "minSize": 0.00003,
    "minSpread": 0.0005,
    "active": true,
    "maxLeverage": 2
  }
}

The TradingEnv defines the environment logic to define your strategies. You can find the run function in PerpMmEnvTemplate.js file to define your strategy or use the default one.

 async run() {
    // TODO: ===================================================
    // TODO: INSERT MARKET MAKER LOGIC HERE
    // TODO: ===================================================


 }

and run it with runEnvExample.js.

FAQs

Package last updated on 30 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts