Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ex-master/core

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ex-master/core

## Usage

  • 0.1.25
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-92.86%
Maintainers
1
Weekly downloads
 
Created
Source

Ex-Master Core

Usage

let exchange = new Exchange(client, dashboard);

async function update(): Promise<void> {
  // Tick to update created orders.
  await exchange.tick();

  // Calculate new orders to be placed.
  let descriptors = ...;

  // Update orders by new descriptors.
  await exchange.update(descriptors);
}

Order update procedure

Active (assumed) orders are stored locally.

  • Sort order descriptors based on their priority
  • Cancel order with the same label and update calculated money/stock.
  • Check money/stock:
    • If the the remaining money/stock is sufficient for the updated order, create the new order.
    • Else if there are active orders with lower priority, cancel the order with closest lower priority and do this step again.
    • Else throw an error or print a warning message.

Priority

Order priority
Cancel order priority

FAQs

Package last updated on 16 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc