How to use the command line interface

Create Quote

Note: This page describes how to use the 'mtcli' command line executable. This binary is currently available for Linux only

To use mtcli from the command line, you must have a synced Microtick node and you need to set the MTROOT environment variable to the same directory your synced node is using, for example:

$ export MTROOT=$HOME/testnet

Usage

$ mtcli tx microtick create-quote <market_id> [duration] [backing] [spot] [premium]

Description

Creates a quote on the given market id. Note that if the market does not exist, it will be created automatically.

Duration

5minute, 15minute, 1hour, 4hour or 12hour

Backing

Token amount to transfer into the quote. Example 10fox

Spot

Spot price for the quote. Example: 176spot

Premium

Requested premium for the quote. Example: 1premium

Quote Invariants

There are restrictions involved when choosing backing, spot and premium for a quote. These are called the "2x Invariants" and are as follows:

  • Spot 2x limitation.  A quote cannot be placed that will become a free call or put on the resulting order book. This protects the party placing the quote as well as limits the spot to be within 2x of the quoted premium of the resultant consensus.
  • Premium 2x limitation.  A quote cannot be placed with a premium of more than 2x the current market consensus premium for that time duration.  The market consensus premium is defined as backing / (leverage * weight) for the order book the quote is placed on. This means a quote must be competitive given the current consensus premium.
  • Time 2x limitation.  A quote must be updated within 2x the time duration or anyone may cancel it and collect the backing for the quote.  This ensures stagnant quotes will always be removed from the marketplace.