Swap Structures
There are a variety if swap events which may occur during a trade. See Maker Events and Taker Events for more info.
Parameter | Type | Description |
---|---|---|
type | string | See Maker Events and Taker Events for more info. |
data | varies | The data field may contain contextual information (e.g. txids) releated to a swap event. In some cases, it will be null . |
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 | Type | Description |
---|---|---|
timestamp | integer | Timestamp for the SwapEvent in UNIX format. |
event | object | A standard SwapEvent object. |
Each swap status will be nested under its associated UUID.
Parameter | Type | Description |
---|---|---|
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. |
events | list | A list of swap events. The structure of each event varies depending on its type, as detailed in the SwapEvents section. |
maker_coin | string | The coin being sent by the maker and received by the taker. |
taker_coin | string | The coin being sent by the taker and received by the maker. |
maker_amount | numeric string | The amount of maker_coin being traded. |
taker_amount | numeric string | The amount of taker_coin being traded. |
gui | string | An identifier for the GUI used to initiate the swap, as defined in a user's MM2.json file. May be null if not defined. |
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. |
error_events | list | A list of possible swap event types which may appear in a failed swap, for makers and takers. |