Skip to main content

Event

Enum Event 

Source
#[non_exhaustive]
pub enum Event<Address> {
Show 83 variants InitializePerpMarket { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, UpdateMarket { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, DeleteMarket { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, InitializeBorrowLendPool { asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, UpdateBorrowLendPool { asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, Deposit { user_address: Address, asset_id: AssetId, amount: PositiveDecimal, amount_notional: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, PlaceOrder { user_address: Address, order_id: OrderId, market_id: MarketId, price: PositiveDecimal, size: PositiveDecimal, side: Side, order_type: OrderType, source: OrderSource, execution_timestamp: UnixTimestampMicros, client_order_id: Option<ClientOrderId>, }, CancelOrder { user_address: Address, order_id: OrderId, market_id: MarketId, execution_timestamp: UnixTimestampMicros, client_order_id: Option<ClientOrderId>, }, ForceCancelOrders { user_address: Address, cancelled_orders: Vec<(MarketId, Vec<OrderId>)>, cancelled_trigger_orders: Vec<(MarketId, Vec<TriggerOrderId>)>, execution_timestamp: UnixTimestampMicros, }, CreateTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, market_id: MarketId, order_price: PositiveDecimal, trigger_price: PositiveDecimal, trigger_direction: TriggerDirection, price_condition: TriggerPriceCondition, size: Option<PositiveDecimal>, side: Side, order_type: OrderType, execution_timestamp: UnixTimestampMicros, }, ActivateTriggerOrder { trigger_order_id: TriggerOrderId, market_id: MarketId, price_condition: TriggerPriceCondition, execution_timestamp: UnixTimestampMicros, }, EditTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, size_added: Option<PositiveDecimal>, execution_timestamp: UnixTimestampMicros, }, TryExecuteTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, execution_timestamp: UnixTimestampMicros, }, SuccessfulExecuteTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, market_id: MarketId, order_price: PositiveDecimal, trigger_price: PositiveDecimal, trigger_direction: TriggerDirection, price_condition: TriggerPriceCondition, executed_size: PositiveDecimal, side: Side, order_type: OrderType, execution_timestamp: UnixTimestampMicros, }, FailureExecuteTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, reason: String, execution_timestamp: UnixTimestampMicros, }, CancelTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, RejectTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, reason: String, execution_timestamp: UnixTimestampMicros, }, ReactivateTriggerOrder { user_address: Address, trigger_order_id: TriggerOrderId, reason: String, execution_timestamp: UnixTimestampMicros, }, CreateTwapOrder { user_address: Address, twap_id: TwapId, market_id: MarketId, total_size: PositiveDecimal, total_duration_seconds: u64, side: Side, reduce_only: bool, }, SuccessfulExecuteTwapOrder { user_address: Address, twap_id: TwapId, market_id: MarketId, order_price: PositiveDecimal, executed_size: PositiveDecimal, side: Side, order_type: OrderType, execution_timestamp: UnixTimestampMicros, }, RejectTwapOrder { user_address: Address, twap_id: TwapId, reason: String, execution_timestamp: UnixTimestampMicros, }, CancelTwap { user_address: Address, twap_id: TwapId, execution_timestamp: UnixTimestampMicros, }, UpdatePremiumIndex { market_id: MarketId, premium_index: Decimal, execution_timestamp: UnixTimestampMicros, }, UpdatePremiumIndexFailed { market_id: MarketId, error: String, execution_timestamp: UnixTimestampMicros, }, UpdateFundingRate { market_id: MarketId, funding_rate: Decimal, execution_timestamp: UnixTimestampMicros, }, UpdateFundingRateFailed { market_id: MarketId, error: String, execution_timestamp: UnixTimestampMicros, }, ApplyFundingRate { user_address: Address, market_id: MarketId, funding_applied: Decimal, execution_timestamp: UnixTimestampMicros, }, ApplyFundingRateFailed { user_address: Address, error: String, execution_timestamp: UnixTimestampMicros, }, UpdateOraclePrice { asset_id: AssetId, oracle_price: PositiveDecimal, publish_timestamp: UnixTimestampMicros, execution_timestamp: UnixTimestampMicros, }, UpdateMarkPrice { market_id: MarketId, median_cex_price: PositiveDecimal, diff_ema: Decimal, publish_timestamp: UnixTimestampMicros, execution_timestamp: UnixTimestampMicros, }, UpdateOraclePriceFailed { asset_id: AssetId, error: String, execution_timestamp: UnixTimestampMicros, }, UpdateMarkPriceFailed { market_id: MarketId, error: String, execution_timestamp: UnixTimestampMicros, }, Borrow { user_address: Address, asset_id: AssetId, amount: PositiveDecimal, borrow_type: BorrowType, execution_timestamp: UnixTimestampMicros, }, RepayBorrow { user_address: Address, asset_id: AssetId, amount: PositiveDecimal, repay_type: RepayType, execution_timestamp: UnixTimestampMicros, }, UsdcUnrealizedLossBorrowRebalance { user_address: Address, cached_unrealized_loss: PositiveDecimal, internal_repayment: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, Withdraw { user_address: Address, asset_id: AssetId, amount: PositiveDecimal, amount_notional: PositiveDecimal, fee: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, Trade {
Show 16 fields user_address: Address, market_id: MarketId, price: PositiveDecimal, size: PositiveDecimal, side: Side, order_id: OrderId, is_maker: bool, is_full_fill: bool, realized_pnl: Decimal, fee: Decimal, net_fee: PositiveDecimal, trade_id: TradeId, is_liquidation: bool, client_order_id: Option<ClientOrderId>, execution_timestamp: UnixTimestampMicros, fee_asset: AssetId,
}, ForceSettlePerpPosition { user_address: Address, market_id: MarketId, price: PositiveDecimal, size: PositiveDecimal, side: Side, realized_pnl: Decimal, execution_timestamp: UnixTimestampMicros, }, CleanupUserMarketState { user_address: Address, market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, LiquidateBorrowLendLiability { liquidatee_address: Address, liquidator_address: Address, liability_asset_id: AssetId, collateral_asset_id: AssetId, liability_oracle_price: PositiveDecimal, liability_size: PositiveDecimal, collateral_size: PositiveDecimal, liquidator_reward: PositiveDecimal, protocol_reward: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, BackstopLiquidatePerpPosition { liquidatee_address: Address, liquidator_address: Address, market_id: MarketId, mark_price: PositiveDecimal, size: PositiveDecimal, side: Side, realized_pnl: Decimal, liquidator_reward: PositiveDecimal, protocol_reward: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, BackstopLiquidatePerp { liquidatee_address: Address, liquidator_address: Address, liquidator_reward: PositiveDecimal, protocol_reward: PositiveDecimal, liquidation_loss: Decimal, execution_timestamp: UnixTimestampMicros, }, AutoDeleverage { user: Address, counterparty: Address, market_id: MarketId, fill_price: PositiveDecimal, size: PositiveDecimal, user_realized_pnl: Decimal, counterparty_realized_pnl: Decimal, execution_timestamp: UnixTimestampMicros, }, UpdateReduceOnlyLimitOrder { user_address: Address, order_id: OrderId, market_id: MarketId, previous_size: PositiveDecimal, new_size: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, BootOrder { user_address: Address, order_id: OrderId, market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, AccrueInterestOnBorrowLend { asset_id: AssetId, utilization_rate: PositiveDecimal, time_elapsed: u64, borrow_rate: PositiveDecimal, prev_cumulative_borrow_rate: PositiveDecimal, new_cumulative_borrow_rate: PositiveDecimal, prev_cumulative_deposit_rate: PositiveDecimal, new_cumulative_deposit_rate: PositiveDecimal, new_debt: PositiveDecimal, protocol_reward: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, InitializeSpotMarket { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, DepositVault { vault_address: Address, user_address: Address, asset_id: AssetId, amount: PositiveDecimal, amount_notional: PositiveDecimal, shares: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, QueueWithdrawVault { vault_address: Address, user_address: Address, shares: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, ProcessWithdrawVault { vault_address: Address, user_address: Address, shares: PositiveDecimal, amount: PositiveDecimal, asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, CollectVaultFees { vault_address: Address, high_watermark: PositiveDecimal, shares_minted_to_leader: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, DepositSpotCollateral { user_address: Address, asset_id: AssetId, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, WithdrawSpotCollateral { user_address: Address, asset_id: AssetId, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, HaltPerpMarket { market_id: MarketId, settlement_price: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, HaltSpotMarket { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, UnhaltPerpMarket { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, UnhaltSpotMarket { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, HaltBorrowLendPool { asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, UnhaltBorrowLendPool { asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, AdminAddTradingCredits { user_address: Address, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, AdminRemoveTradingCredits { user_address: Address, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, UseTradingCredits { user_address: Address, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, ClaimReferralRewards { address: Address, amount_claimed: PositiveDecimal, total_rewards: PositiveDecimal, }, UpdateUserFeeTier { user_address: Address, fee_tier: FeeTier, execution_timestamp: UnixTimestampMicros, }, UpdateUserFeeDiscountBps { user_address: Address, fee_discount_bps: u16, execution_timestamp: UnixTimestampMicros, }, WithdrawSpotCollateralV2 { user_address: Address, asset_id: AssetId, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, fee: PositiveDecimal, }, DeleteAsset { asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, PendingTriggerOrders { market_id: MarketId, execution_timestamp: UnixTimestampMicros, }, DelegateUser { delegator: Address, delegate: Address, name: String, execution_timestamp: UnixTimestampMicros, }, RevokeDelegation { delegator: Address, delegate: Address, execution_timestamp: UnixTimestampMicros, }, AdminRevokeDelegation { delegator: Address, delegate: Address, execution_timestamp: UnixTimestampMicros, }, AdminDeleteDelegateConfig { delegator: Address, delegate: Address, name: String, execution_timestamp: UnixTimestampMicros, }, DepositIso { user_address: Address, market_id: MarketId, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, WithdrawIso { user_address: Address, market_id: MarketId, amount: PositiveDecimal, fee: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, TakeFromInsuranceFund { reason: TakeFromInsuranceFundReason, amount: PositiveDecimal, execution_timestamp: UnixTimestampMicros, }, DelegateUserV1 { delegator: Address, delegate: Address, name: String, expires_at: Option<UnixTimestampMicros>, flags: u32, execution_timestamp: UnixTimestampMicros, }, TradeV1 {
Show 19 fields user_address: Address, market_id: MarketId, price: PositiveDecimal, size: PositiveDecimal, side: Side, order_id: OrderId, is_maker: bool, is_full_fill: bool, realized_pnl: Decimal, fee: Decimal, net_fee: PositiveDecimal, trade_id: TradeId, client_order_id: Option<ClientOrderId>, execution_timestamp: UnixTimestampMicros, fee_asset: AssetId, fill_type: FillType, cumulative_filled_size: Option<PositiveDecimal>, cumulative_filled_cot: Option<PositiveDecimal>, remaining_size: Option<PositiveDecimal>,
}, InitializeAssetInfo { asset_id: AssetId, name: String, execution_timestamp: UnixTimestampMicros, }, InitializePerpMarketV1 { market_id: MarketId, name: String, base_asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, InitializeSpotMarketV1 { market_id: MarketId, name: String, base_asset_id: AssetId, quote_asset_id: AssetId, execution_timestamp: UnixTimestampMicros, }, CancelOrderV1 { user_address: Address, order_id: OrderId, market_id: MarketId, execution_timestamp: UnixTimestampMicros, client_order_id: Option<ClientOrderId>, reason: CancelReason, }, CancelTriggerOrderV1 { user_address: Address, trigger_order_id: TriggerOrderId, market_id: MarketId, execution_timestamp: UnixTimestampMicros, reason: CancelReason, }, CancelTwapV1 { user_address: Address, twap_id: TwapId, market_id: MarketId, execution_timestamp: UnixTimestampMicros, reason: CancelReason, },
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

InitializePerpMarket

Market initialized

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

UpdateMarket

Market updated

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

DeleteMarket

Market deleted

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

InitializeBorrowLendPool

Borrow lend initialized

Fields

§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

UpdateBorrowLendPool

Borrow lend updated

Fields

§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

Deposit

Deposit

Fields

§user_address: Address
§asset_id: AssetId
§amount_notional: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

PlaceOrder

Order placed

Fields

§user_address: Address
§order_id: OrderId
§market_id: MarketId
§side: Side
§order_type: OrderType
§execution_timestamp: UnixTimestampMicros
§client_order_id: Option<ClientOrderId>
§

CancelOrder

Order canceled

Fields

§user_address: Address
§order_id: OrderId
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§client_order_id: Option<ClientOrderId>
§

ForceCancelOrders

Force cancel orders, occurs when a user’s account is at risk

Fields

§user_address: Address
§cancelled_orders: Vec<(MarketId, Vec<OrderId>)>
§cancelled_trigger_orders: Vec<(MarketId, Vec<TriggerOrderId>)>
§execution_timestamp: UnixTimestampMicros
§

CreateTriggerOrder

Trigger order created

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§market_id: MarketId
§order_price: PositiveDecimal
§trigger_price: PositiveDecimal
§trigger_direction: TriggerDirection
§price_condition: TriggerPriceCondition
§side: Side
§order_type: OrderType
§execution_timestamp: UnixTimestampMicros
§

ActivateTriggerOrder

Trigger order activated for execution

Fields

§trigger_order_id: TriggerOrderId
§market_id: MarketId
§price_condition: TriggerPriceCondition
§execution_timestamp: UnixTimestampMicros
§

EditTriggerOrder

Edit existing trigger order active / inactive

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§execution_timestamp: UnixTimestampMicros
§

TryExecuteTriggerOrder

Active trigger order executed from queue

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§execution_timestamp: UnixTimestampMicros
§

SuccessfulExecuteTriggerOrder

Active trigger order successfully executed

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§market_id: MarketId
§order_price: PositiveDecimal
§trigger_price: PositiveDecimal
§trigger_direction: TriggerDirection
§price_condition: TriggerPriceCondition
§executed_size: PositiveDecimal
§side: Side
§order_type: OrderType
§execution_timestamp: UnixTimestampMicros
§

FailureExecuteTriggerOrder

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§reason: String
§execution_timestamp: UnixTimestampMicros
§

CancelTriggerOrder

Trigger order cancelled (active / inactive)

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

RejectTriggerOrder

Active trigger order rejected while trying to be executed

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§reason: String
§execution_timestamp: UnixTimestampMicros
§

ReactivateTriggerOrder

Trigger order being executed reactivated

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§reason: String
§execution_timestamp: UnixTimestampMicros
§

CreateTwapOrder

Twap order created

Fields

§user_address: Address
§twap_id: TwapId
§market_id: MarketId
§total_size: PositiveDecimal
§total_duration_seconds: u64
§side: Side
§reduce_only: bool
§

SuccessfulExecuteTwapOrder

Twap order successfully executed

Fields

§user_address: Address
§twap_id: TwapId
§market_id: MarketId
§order_price: PositiveDecimal
§executed_size: PositiveDecimal
§side: Side
§order_type: OrderType
§execution_timestamp: UnixTimestampMicros
§

RejectTwapOrder

Active twap order rejected while trying to be executed

Fields

§user_address: Address
§twap_id: TwapId
§reason: String
§execution_timestamp: UnixTimestampMicros
§

CancelTwap

Whole twap order cancelled

Fields

§user_address: Address
§twap_id: TwapId
§execution_timestamp: UnixTimestampMicros
§

UpdatePremiumIndex

Premium Index Updated

Fields

§market_id: MarketId
§premium_index: Decimal
§execution_timestamp: UnixTimestampMicros
§

UpdatePremiumIndexFailed

Premium Index Update Failed

Fields

§market_id: MarketId
§error: String
§execution_timestamp: UnixTimestampMicros
§

UpdateFundingRate

Funding Rate Updated

Fields

§market_id: MarketId
§funding_rate: Decimal
§execution_timestamp: UnixTimestampMicros
§

UpdateFundingRateFailed

Funding Rate Update Failed

Fields

§market_id: MarketId
§error: String
§execution_timestamp: UnixTimestampMicros
§

ApplyFundingRate

Funding Rate Applied

Fields

§user_address: Address
§market_id: MarketId
§funding_applied: Decimal
§execution_timestamp: UnixTimestampMicros
§

ApplyFundingRateFailed

Funding Rate Application Failed

Fields

§user_address: Address
§error: String
§execution_timestamp: UnixTimestampMicros
§

UpdateOraclePrice

Oracle Price Updated

Fields

§asset_id: AssetId
§oracle_price: PositiveDecimal
§publish_timestamp: UnixTimestampMicros
§execution_timestamp: UnixTimestampMicros
§

UpdateMarkPrice

Mark Price Updated

Fields

§market_id: MarketId
§median_cex_price: PositiveDecimal
§diff_ema: Decimal
§publish_timestamp: UnixTimestampMicros
§execution_timestamp: UnixTimestampMicros
§

UpdateOraclePriceFailed

Price Update Failed

Fields

§asset_id: AssetId
§error: String
§execution_timestamp: UnixTimestampMicros
§

UpdateMarkPriceFailed

Mark Price Update Failed

Fields

§market_id: MarketId
§error: String
§execution_timestamp: UnixTimestampMicros
§

Borrow

Fields

§user_address: Address
§asset_id: AssetId
§borrow_type: BorrowType
§execution_timestamp: UnixTimestampMicros
§

RepayBorrow

Fields

§user_address: Address
§asset_id: AssetId
§repay_type: RepayType
§execution_timestamp: UnixTimestampMicros
§

UsdcUnrealizedLossBorrowRebalance

Fields

§user_address: Address
§cached_unrealized_loss: PositiveDecimal
§internal_repayment: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

Withdraw

Fields

§user_address: Address
§asset_id: AssetId
§amount_notional: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

Trade

Fields

§user_address: Address
§market_id: MarketId
§side: Side
§order_id: OrderId
§is_maker: bool
§is_full_fill: bool
§realized_pnl: Decimal
§trade_id: TradeId
§is_liquidation: bool
§client_order_id: Option<ClientOrderId>
§execution_timestamp: UnixTimestampMicros
§fee_asset: AssetId
§

ForceSettlePerpPosition

Fields

§user_address: Address
§market_id: MarketId
§side: Side
§realized_pnl: Decimal
§execution_timestamp: UnixTimestampMicros
§

CleanupUserMarketState

Fields

§user_address: Address
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

LiquidateBorrowLendLiability

Fields

§liquidatee_address: Address
§liquidator_address: Address
§liability_asset_id: AssetId
§collateral_asset_id: AssetId
§liability_oracle_price: PositiveDecimal
§liability_size: PositiveDecimal
§collateral_size: PositiveDecimal
§liquidator_reward: PositiveDecimal
§protocol_reward: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

BackstopLiquidatePerpPosition

Fields

§liquidatee_address: Address
§liquidator_address: Address
§market_id: MarketId
§mark_price: PositiveDecimal
§side: Side
§realized_pnl: Decimal
§liquidator_reward: PositiveDecimal
§protocol_reward: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

BackstopLiquidatePerp

Fields

§liquidatee_address: Address
§liquidator_address: Address
§liquidator_reward: PositiveDecimal
§protocol_reward: PositiveDecimal
§liquidation_loss: Decimal
§execution_timestamp: UnixTimestampMicros
§

AutoDeleverage

Fields

§user: Address
§counterparty: Address
§market_id: MarketId
§fill_price: PositiveDecimal
§user_realized_pnl: Decimal
§counterparty_realized_pnl: Decimal
§execution_timestamp: UnixTimestampMicros
§

UpdateReduceOnlyLimitOrder

Fields

§user_address: Address
§order_id: OrderId
§market_id: MarketId
§previous_size: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

BootOrder

Fields

§user_address: Address
§order_id: OrderId
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

AccrueInterestOnBorrowLend

Fields

§asset_id: AssetId
§utilization_rate: PositiveDecimal
§time_elapsed: u64
§borrow_rate: PositiveDecimal
§prev_cumulative_borrow_rate: PositiveDecimal
§new_cumulative_borrow_rate: PositiveDecimal
§prev_cumulative_deposit_rate: PositiveDecimal
§new_cumulative_deposit_rate: PositiveDecimal
§protocol_reward: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

InitializeSpotMarket

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

DepositVault

Deposit

Fields

§vault_address: Address
§user_address: Address
§asset_id: AssetId
§amount_notional: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

QueueWithdrawVault

Withdraw

Fields

§vault_address: Address
§user_address: Address
§execution_timestamp: UnixTimestampMicros
§

ProcessWithdrawVault

Withdraw

Fields

§vault_address: Address
§user_address: Address
§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

CollectVaultFees

Fields

§vault_address: Address
§high_watermark: PositiveDecimal
§shares_minted_to_leader: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

DepositSpotCollateral

Fields

§user_address: Address
§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

WithdrawSpotCollateral

Fields

§user_address: Address
§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

HaltPerpMarket

Fields

§market_id: MarketId
§settlement_price: PositiveDecimal
§execution_timestamp: UnixTimestampMicros
§

HaltSpotMarket

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

UnhaltPerpMarket

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

UnhaltSpotMarket

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

HaltBorrowLendPool

Fields

§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

UnhaltBorrowLendPool

Fields

§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

AdminAddTradingCredits

Fields

§user_address: Address
§execution_timestamp: UnixTimestampMicros
§

AdminRemoveTradingCredits

Fields

§user_address: Address
§execution_timestamp: UnixTimestampMicros
§

UseTradingCredits

Fields

§user_address: Address
§execution_timestamp: UnixTimestampMicros
§

ClaimReferralRewards

Fields

§address: Address
§amount_claimed: PositiveDecimal
§total_rewards: PositiveDecimal
§

UpdateUserFeeTier

Fields

§user_address: Address
§fee_tier: FeeTier
§execution_timestamp: UnixTimestampMicros
§

UpdateUserFeeDiscountBps

Fields

§user_address: Address
§fee_discount_bps: u16
§execution_timestamp: UnixTimestampMicros
§

WithdrawSpotCollateralV2

Fields

§user_address: Address
§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

DeleteAsset

Asset is deleted.

Fields

§asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

PendingTriggerOrders

Trigger Orders are pending and should be executed.

Fields

§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

DelegateUser

Fields

§delegator: Address
§delegate: Address
§name: String
§execution_timestamp: UnixTimestampMicros
§

RevokeDelegation

Fields

§delegator: Address
§delegate: Address
§execution_timestamp: UnixTimestampMicros
§

AdminRevokeDelegation

Fields

§delegator: Address
§delegate: Address
§execution_timestamp: UnixTimestampMicros
§

AdminDeleteDelegateConfig

Fields

§delegator: Address
§delegate: Address
§name: String
§execution_timestamp: UnixTimestampMicros
§

DepositIso

Fields

§user_address: Address
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

WithdrawIso

Fields

§user_address: Address
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

TakeFromInsuranceFund

§

DelegateUserV1

Fields

§delegator: Address
§delegate: Address
§name: String
§flags: u32
§execution_timestamp: UnixTimestampMicros
§

TradeV1

Fields

§user_address: Address
§market_id: MarketId
§side: Side
§order_id: OrderId
§is_maker: bool
§is_full_fill: bool
§realized_pnl: Decimal
§trade_id: TradeId
§client_order_id: Option<ClientOrderId>
§execution_timestamp: UnixTimestampMicros
§fee_asset: AssetId
§fill_type: FillType
§cumulative_filled_size: Option<PositiveDecimal>
§cumulative_filled_cot: Option<PositiveDecimal>
§remaining_size: Option<PositiveDecimal>
§

InitializeAssetInfo

Fields

§asset_id: AssetId
§name: String
§execution_timestamp: UnixTimestampMicros
§

InitializePerpMarketV1

Fields

§market_id: MarketId
§name: String
§base_asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

InitializeSpotMarketV1

Fields

§market_id: MarketId
§name: String
§base_asset_id: AssetId
§quote_asset_id: AssetId
§execution_timestamp: UnixTimestampMicros
§

CancelOrderV1

supersedes CancelOrder; adds reason

Fields

§user_address: Address
§order_id: OrderId
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§client_order_id: Option<ClientOrderId>
§

CancelTriggerOrderV1

supersedes CancelTriggerOrder; adds reason

Fields

§user_address: Address
§trigger_order_id: TriggerOrderId
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros
§

CancelTwapV1

supersedes CancelTwap; adds reason

Fields

§user_address: Address
§twap_id: TwapId
§market_id: MarketId
§execution_timestamp: UnixTimestampMicros

Implementations§

Source§

impl<Address> Event<Address>

Source

pub fn event_key(&self) -> &'static str

Trait Implementations§

Source§

impl<Address> AsRef<str> for Event<Address>

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<Address> BorshDeserialize for Event<Address>
where Address: BorshDeserialize,

Source§

fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>

Source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
Source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
Source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

Source§

impl<Address> BorshSerialize for Event<Address>
where Address: BorshSerialize,

Source§

fn serialize<__W: Write>(&self, writer: &mut __W) -> Result<(), Error>

Source§

impl<Address: Clone> Clone for Event<Address>

Source§

fn clone(&self) -> Event<Address>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Address: Debug> Debug for Event<Address>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, Address> Deserialize<'de> for Event<Address>
where Address: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<Address> Display for Event<Address>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<Address> EnumExt for Event<Address>
where Address: BorshDeserialize,

Source§

fn deserialize_variant<__R: Read>( reader: &mut __R, variant_tag: u8, ) -> Result<Self, Error>

Deserialises given variant of an enum from the reader. Read more
Source§

impl<Address: JsonSchema> JsonSchema for Event<Address>

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl<Address: PartialEq> PartialEq for Event<Address>

Source§

fn eq(&self, other: &Event<Address>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Address> Serialize for Event<Address>
where Address: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<Address> StructuralPartialEq for Event<Address>

Auto Trait Implementations§

§

impl<Address> Freeze for Event<Address>
where Address: Freeze,

§

impl<Address> RefUnwindSafe for Event<Address>
where Address: RefUnwindSafe,

§

impl<Address> Send for Event<Address>
where Address: Send,

§

impl<Address> Sync for Event<Address>
where Address: Sync,

§

impl<Address> Unpin for Event<Address>
where Address: Unpin,

§

impl<Address> UnsafeUnpin for Event<Address>
where Address: UnsafeUnpin,

§

impl<Address> UnwindSafe for Event<Address>
where Address: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,