Skip to main content

Class: GeometricKandelLib

Title

Management of a single Kandel instance.

Constructors​

constructor​

β€’ new GeometricKandelLib(params): GeometricKandelLib

Creates a KandelLib object to perform static calls toward a KandelLib.

Parameters​

NameTypeDescription
paramsObjectThe parameters used to create an instance.
params.addressstringThe address of the KandelLib instance.
params.signerSignerThe signer used to interact with the KandelLib instance.
params.marketKeyResolvedForCalculationThe key data about the market.
params.kandelLibInstance?GeometricKandelA KandelLib instance to inject. If not provided, a new one will be created.

Returns​

GeometricKandelLib

A new KandelLib.

Defined in​

@mangrovedao/mangrove.js/src/kandel/geometricKandel/geometricKandelLib.ts:22

Properties​

kandelLib​

β€’ kandelLib: GeometricKandel

Defined in​

@mangrovedao/mangrove.js/src/kandel/geometricKandel/geometricKandelLib.ts:11


market​

β€’ market: KeyResolvedForCalculation

Defined in​

@mangrovedao/mangrove.js/src/kandel/geometricKandel/geometricKandelLib.ts:12

Methods​

createPartialGeometricDistribution​

β–Έ createPartialGeometricDistribution(params): Promise<OfferDistribution>

Parameters​

NameType
paramsObject
params.fromnumber
params.tonumber
params.baseQuoteTickIndex0number
params.baseQuoteTickOffsetnumber
params.firstAskIndexnumber
params.bidGivesundefined | BigSource
params.askGivesundefined | BigSource
params.pricePointsnumber
params.stepSizenumber

Returns​

Promise<OfferDistribution>

Defined in​

@mangrovedao/mangrove.js/src/kandel/geometricKandel/geometricKandelLib.ts:35


createFullGeometricDistribution​

β–Έ createFullGeometricDistribution(params): Promise<GeometricKandelDistribution>

Parameters​

NameType
paramsObject
params.baseQuoteTickIndex0number
params.baseQuoteTickOffsetnumber
params.firstAskIndexnumber
params.bidGivesundefined | BigSource
params.askGivesundefined | BigSource
params.pricePointsnumber
params.stepSizenumber

Returns​

Promise<GeometricKandelDistribution>

Defined in​

@mangrovedao/mangrove.js/src/kandel/geometricKandel/geometricKandelLib.ts:84