Skip to main content

Exchange Events

The exchange module emits several events for various actions.


EventOrderCreated

Any time an order is created, an EventOrderCreated is emitted.

Event Type: provenance.exchange.v1.EventOrderCreated

Attribute KeyAttribute Value
order_idThe id of the order just created.
order_typeThe type of the order just created (e.g. "ask" or "bid").
market_idThe id of the market that the order was created in.
external_idThe external id of the order just created.

EventOrderCancelled

When an order is cancelled (either by the owner or the market), an EventOrderCancelled is emitted.

Event Type: provenance.exchange.v1.EventOrderCancelled

Attribute KeyAttribute Value
order_idThe id of the cancelled order.
cancelled_byThe bech32 address of the account that cancelled the order.
market_idThe id of the market that the cancelled order was in.
external_idThe external id of the order that was just cancelled.

EventOrderFilled

When an order is filled in full, an EventOrderFilled is emitted.

This event indicates that an order has been settled, cleared, and deleted.

Event Type: provenance.exchange.v1.EventOrderFilled

Attribute KeyAttribute Value
order_idThe id of the settled order.
assetsThe assets that were bought or sold (Coin string).
priceThe price received (Coin string).
feesThe fees paid to settle the order (Coins string).
market_idThe id of the market that the order was in.
external_idThe external id of the order.

The assets, price, and fees, reflect the funds that were actually transferred. E.g. when an ask order is settled for a higher price than set in the order, the price reflects what the seller actually received. Similarly, the fees reflect the actual settlement fees paid (both flat and ratio) by the order's owner.

If an order was previously partially filled, but now, the rest is being filled, this event is emitted.

EventOrderPartiallyFilled

When an order is partially filled, an EventOrderPartiallyFilled is emitted.

This event indicates that some of an order was filled, but that the order has been reduced and still exists.

Event Type: provenance.exchange.v1.EventOrderPartiallyFilled

Attribute KeyAttribute Value
order_idThe id of the partially settled order.
assetsThe assets that were bought or sold (Coin string).
priceThe price received (Coin string).
feesThe fees paid for the partial settlement of this order (Coins string).
market_idThe id of the market that the order is in.
external_idThe external id of the order.

The assets, price, and fees, reflect the funds that were actually transferred.

If an order was previously partially filled, but now, the rest is being filled, an EventOrderFilled is emitted.

EventOrderExternalIDUpdated

When an order's external id is updated, an EventOrderExternalIDUpdated is emitted.

Event Type: provenance.exchange.v1.EventOrderExternalIDUpdated

Attribute KeyAttribute Value
order_idThe id of the updated order.
market_idThe id of the market that the order is in.
external_idThe new external id of the order.

EventFundsCommitted

When funds are committed to a market by an account, an EventFundsCommitted is emitted.

Event Type: provenance.exchange.v1.EventFundsCommitted

Attribute KeyAttribute Value
accountThe bech32 address of the account that committed the funds.
market_idThe id of the market that funds were committed to.
amountThe funds committed (Coins string).
tagThe event_tag provided in the msg.

EventCommitmentReleased

When funds are released by a market, an EventCommitmentReleased is emitted.

Event Type: provenance.exchange.v1.EventCommitmentReleased

Attribute KeyAttribute Value
accountThe bech32 address of the account that committed the funds.
market_idThe id of the market that funds were committed to.
amountThe funds committed (Coins string).
tagThe event_tag provided in the msg.

EventMarketWithdraw

Any time a market's funds are withdrawn, an EventMarketWithdraw is emitted.

Event Type: provenance.exchange.v1.EventMarketWithdraw

Attribute KeyAttribute Value
market_idThe id of the market the funds were withdrawn from.
amountThe funds withdrawn (Coins string).
destinationThe bech32 address string of the account that received the funds.
withdrawn_byThe bech32 address string of the admin account that made the withdrawal.

EventMarketDetailsUpdated

When a market's details are updated, an EventMarketDetailsUpdated is emitted.

Event Type: provenance.exchange.v1.EventMarketDetailsUpdated

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketOrdersEnabled

When a market's accepting_orders changes from false to true, an EventMarketOrdersEnabled is emitted.

Event Type: provenance.exchange.v1.EventMarketOrdersEnabled

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketOrdersDisabled

When a market's accepting_orders changes from true to false, an EventMarketOrdersDisabled is emitted.

Event Type: provenance.exchange.v1.EventMarketOrdersDisabled

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketUserSettleEnabled

When a market's allow_user_settlement changes from false to true, an EventMarketUserSettleEnabled is emitted.

Event Type: provenance.exchange.v1.EventMarketUserSettleEnabled

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketUserSettleDisabled

When a market's allow_user_settlement changes from true to false, an EventMarketUserSettleDisabled is emitted.

Event Type: provenance.exchange.v1.EventMarketUserSettleDisabled

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketCommitmentsEnabled

When a market's accepting_commitments changes from false to true, an EventMarketCommitmentsEnabled is emitted.

Event Type: provenance.exchange.v1.EventMarketCommitmentsEnabled

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketCommitmentsDisabled

When a market's accepting_commitments changes from true to false, an EventMarketCommitmentsDisabled is emitted.

Event Type: provenance.exchange.v1.EventMarketCommitmentsDisabled

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketIntermediaryDenomUpdated

When a market's intermediary_denom is updated, an EventMarketIntermediaryDenomUpdated is emitted.

Event Type: provenance.exchange.v1.EventMarketIntermediaryDenomUpdated

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketPermissionsUpdated

Any time a market's permissions are managed, an EventMarketPermissionsUpdated is emitted.

Event Type: provenance.exchange.v1.EventMarketPermissionsUpdated

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketReqAttrUpdated

When a market's required attributes are altered, an EventMarketReqAttrUpdated is emitted.

Event Type: provenance.exchange.v1.EventMarketReqAttrUpdated

Attribute KeyAttribute Value
market_idThe id of the updated market.
updated_byThe bech32 address string of the admin account that made the change.

EventMarketCreated

When a market is created, an EventMarketCreated is emitted.

Event Type: provenance.exchange.v1.EventMarketCreated

Attribute KeyAttribute Value
market_idThe id of the new market.

EventMarketFeesUpdated

When a market's fees are updated, an EventMarketFeesUpdated is emitted.

Event Type: provenance.exchange.v1.EventMarketFeesUpdated

Attribute KeyAttribute Value
market_idThe id of the updated market.

EventParamsUpdated

An EventParamsUpdated is emitted when the exchange module's params are changed.

Event Type: provenance.exchange.v1.EventParamsUpdated

Attribute KeyAttribute Value
(none)

EventPaymentCreated

When a payment is created, an EventPaymentCreated is emitted.

Event Type: provenance.exchange.v1.EventPaymentCreated

Attribute KeyAttribute Value
sourceThe bech32 address string of the source account (that created the payment).
source_amountThe amount in the source account involved in the payment (Coins string).
targetThe bech32 address string of the target account.
target_amountThe amount that the target account will provide (Coins string).
external_idThe external id of the payment just created.

EventPaymentUpdated

When a payment's target is changed, an EventPaymentUpdated is emitted.

Event Type: provenance.exchange.v1.EventPaymentUpdated

Attribute KeyAttribute Value
sourceThe bech32 address string of the source account (that updated the payment).
source_amountThe amount in the source account involved in the payment (Coins string).
old_targetThe old bech32 address string of the target account.
new_targetThe new bech32 address string of the target account.
target_amountThe amount that the target account will provide (Coins string).
external_idThe external id of the payment just updated.

EventPaymentAccepted

When a payment is accepted, an EventPaymentAccepted is emitted.

Event Type: provenance.exchange.v1.EventPaymentAccepted

Attribute KeyAttribute Value
sourceThe bech32 address string of the source account (that created the payment).
source_amountThe amount in the source account involved in the payment (Coins string).
targetThe bech32 address string of the target account (that accepted the payment).
target_amountThe amount that the target account will provide (Coins string).
external_idThe external id of the payment just accepted.

EventPaymentRejected

When a payment is rejected (by a target), an EventPaymentRejected is emitted.

Event Type: provenance.exchange.v1.EventPaymentRejected

Attribute KeyAttribute Value
sourceThe bech32 address string of the source account (that created the payment).
targetThe bech32 address string of the target account (that rejected the payment).
external_idThe external id of the payment just accepted.

EventPaymentCancelled

When a payment is cancelled (by a source), an EventPaymentCancelled is emitted.

Event Type: provenance.exchange.v1.EventPaymentCancelled

Attribute KeyAttribute Value
sourceThe bech32 address string of the source account (that cancelled the payment).
targetThe bech32 address string of the target account.
external_idThe external id of the payment just accepted.