Constructs a new PerpMarketTask.
Optionalproperties: IPerpMarketTaskProperties to set
OptionaldriftMarket address for a drift perpetual market. A full list can be found here: https://github.com/drift-labs/protocol-v1/blob/master/sdk/src/constants/markets.ts
OptionalmangoMarket address for a mango perpetual market. A full list can be found here: https://github.com/blockworks-foundation/mango-client-v3/blob/main/src/ids.json
OptionalMarketPerpMarketTask MarketAddress.
OptionalzetaMarket address for a zeta perpetual market.
OptionalzoMarket address for a 01 protocol perpetual market.
Converts this PerpMarketTask to JSON.
JSON object
StaticcreateCreates a new PerpMarketTask instance using the specified properties.
Optionalproperties: IPerpMarketTaskProperties to set
PerpMarketTask instance
StaticdecodeDecodes a PerpMarketTask message from the specified reader or buffer.
Reader or buffer to decode from
Optionallength: numberMessage length if known beforehand
PerpMarketTask
StaticdecodeDecodes a PerpMarketTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
PerpMarketTask
StaticencodeEncodes the specified PerpMarketTask message. Does not implicitly verify messages.
PerpMarketTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticencodeEncodes the specified PerpMarketTask message, length delimited. Does not implicitly verify messages.
PerpMarketTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticfromCreates a PerpMarketTask message from a plain object. Also converts values to their respective internal types.
Plain object
PerpMarketTask
StaticgetGets the default type url for PerpMarketTask
OptionaltypeUrlPrefix: stringyour custom typeUrlPrefix(default "type.googleapis.com")
The default type url
StatictoCreates a plain object from a PerpMarketTask message. Also converts values to other types if specified.
PerpMarketTask
Optionaloptions: IConversionOptionsConversion options
Plain object
StaticverifyVerifies a PerpMarketTask message.
Plain object to verify
null if valid, otherwise the reason why it is not
Fetch the current price of a perpetual market.