On this page

latest contributor to this doc

Last Edit:

@gcharang

Swap Common Structures

structuresswaps_common_structures

There are a variety if swap events which may occur during a trade. See Maker Events and Taker Events for more info.

Parameter* = requiredTypeDescription
data*
varies
The data field may contain contextual information (e.g. txids) releated to a swap event. In some cases, it will be null.
type*
string
See Maker Events and Taker Events for more info.

For each step of a trade, a SwapEvent will be created, alongside the timestamp of the event. See Maker Events and Taker Events for more info.

Parameter* = requiredTypeDescription
event*
object
A standard SwapEvent object.
timestamp*
integer
Timestamp for the SwapEvent in UNIX format.

Each swap status will be nested under its associated UUID.

Parameter* = requiredTypeDescription
error_events*
list
A list of possible swap event types which may appear in a failed swap, for makers and takers.
events*
list
A list of swap events. The structure of each event varies depending on its type, as detailed in the SwapEvents section.
maker_amount*
numeric string
The amount of maker_coin being traded.
maker_coin*
string
The coin being sent by the maker and received by the taker.
mm_version*
string
The release version and/or commit hash of the Komodo DeFi SDK used to initiate the swap.
success_events*
list
A list of possible swap event types for a successful swap, for makers and takers.
taker_amount*
numeric string
The amount of taker_coin being traded.
taker_coin*
string
The coin being sent by the taker and received by the maker.
type*
string
Maker or Taker. Indicates if the user created the order (maker), or matched with an existing order (taker).
uuid*
string
A unique identifier for the swap.
gui
string
default: null
Optional. An identifier for the GUI used to initiate the swap, as defined in your MM2.json file.