Skip to main content

Market Keys

MarketKey and RangeKey identify the internal position quantities stored in a PredictManager.

Use MarketKey for binary positions keyed by oracle ID, expiry, strike, and direction. Use RangeKey for vertical ranges keyed by oracle ID, expiry, lower strike, and higher strike.

Binary position keys

Click to open
Create MarketKey values

Use up(), down(), or new() to create keys for binary positions.

Click to open
Read MarketKey fields

Range keys

Click to open
Create RangeKey values

Use new() to create a vertical range key. It aborts if lower_strike is not less than higher_strike.

Click to open
Read RangeKey fields

Structs

Click to open
MarketKey
Click to open
RangeKey