layer1:trade:conversion:state-changed

Webhook Payload Structure

The webhook notification sends a JSON object containing details about the event. Here is the example payloads:

{
  "event": "layer1:trade:conversion:state-changed",
  "timestamp": "2024-05-01T14:49:43.151138Z",
  "data": {
    "id": "65a726c7-e56f-4bf0-b65e-7225d8abd9ee",
    "reference": "13963121-6626-4694-8fb8-9557db7b5a04",
    "status": "PLACED",
    "from": {
      "asset": "EUR",
      "amount": 100
    },
    "to": {
      "asset": "LTC",
      "amount": 1.386770212175842462
    },
    "orders": [
      {
        "symbol": "LTC-EUR",
        "side": "BUY",
        "targetPrice": 72.11,
        "targetQuantity": 1.386770212175842462,
        "venue": "kraken",
        "output": 0,
        "id": "234098b4-f55b-4ef6-9ea3-1d28010d8476",
        "venueOrderId": "cd5009ad-ecd4-438a-813c-7608c85833d7",
        "status": "PLACED",
        "actualPrice": 0,
        "actualQuantity": 0,
        "createdAt": "2024-05-01T14:49:43.157286Z"
      }
    ],
    "router": "VWAP",
    "executor": "MAKER",
    "movements": [],
    "createdAt": "2024-05-01T14:49:43.151138Z"
  }
}
{
  "event": "layer1:trade:conversion:state-changed",
  "timestamp": "2024-05-01T14:49:43.151138Z",
  "data": {
    "id": "65a726c7-e56f-4bf0-b65e-7225d8abd9ee",
    "reference": "13963121-6626-4694-8fb8-9557db7b5a04",
    "status": "COMPLETED",
    "from": {
      "asset": "EUR",
      "amount": 100
    },
    "to": {
      "asset": "LTC",
      "amount": 1.386770212175842462
    },
    "orders": [
      {
        "symbol": "LTC-EUR",
        "side": "BUY",
        "targetPrice": 72.11,
        "targetQuantity": 1.386770212175842462,
        "venue": "kraken",
        "output": 0,
        "id": "234098b4-f55b-4ef6-9ea3-1d28010d8476",
        "venueOrderId": "cd5009ad-ecd4-438a-813c-7608c85833d7",
        "status": "CANCELLED",
        "actualPrice": 72.050216507121990198,
        "actualQuantity": 0.21356492612732545,
        "createdAt": "2024-05-01T14:49:43.157286Z"
      },
      {
        "symbol": "LTC-EUR",
        "side": "BUY",
        "targetPrice": 72.11,
        "targetQuantity": 1.173382344115915787,
        "venue": "kraken",
        "output": 0,
        "id": "a1c86126-9c56-407a-902c-a89a15d198f1",
        "venueOrderId": "5e893e50-9260-435a-ac5c-e7430dbf34e5",
        "status": "COMPLETED",
        "actualPrice": 72.11,
        "actualQuantity": 1.17338234,
        "createdAt": "2024-05-01T14:50:44.788691Z"
      }
    ],
    "router": "VWAP",
    "executor": "MAKER",
    "movements": [
      {
        "asset": "LTC",
        "amount": 1.38694726612732545
      },
      {
        "asset": "EUR",
        "amount": -99.9999997032013125489753309548559391
      }
    ],
    "createdAt": "2024-05-01T14:49:43.151138Z"
  }
}

Field Descriptions

Below is a detailed explanation of each field in the webhook payload:

FieldTypeDescription
eventstringIdentifies the type of event, e.g., "layer1:trade:conversion:state-changed".
timestampstringISO 8601 formatted date and time when the event was generated.
data.idstringUnique identifier for the conversion event, in GUID format.
data.referencestringA reference identifier linked to the conversion, in GUID format.
data.statusstringCurrent status of the conversion [PLACED, COMPLETE].
data.from.assetstringType of asset being converted from.
data.from.amountfloatAmount of the asset being converted.
data.to.assetstringType of asset being converted to.
data.to.amountfloatAmount of the asset received after conversion.
data.orders[]arrayArray containing details of orders involved in the conversion.
data.orders[].symbolstringTrading pair symbol.
data.orders[].sidestringTransaction side.
data.orders[].targetPricefloatTarget price for the order.
data.orders[].targetQuantityfloatTarget quantity for the order.
data.orders[].venuestringVenue where the order was placed.
data.orders[].outputintOutput index of the order (for complex trades involving multiple orders).
data.orders[].idstringUnique identifier for the order, in GUID format.
data.orders[].venueOrderIdstringUnique identifier provided by the trading venue for the order, in GUID format.
data.orders[].statusstringCurrent status of the order [PLACED, COMPLETED].
data.orders[].actualPricefloatActual price at which the order was executed.
data.orders[].actualQuantityfloatActual quantity of the asset received from the order.
data.orders[].createdAtstringISO 8601 formatted date and time when the order was created.
data.routerstringRouting mechanism used for the conversion [VWAP].
data.executorstringType of execution used for processing the conversion [MAKER].
data.movements[]arrayArray detailing any asset movements and amounts related to the conversion.
data.createdAtstringISO 8601 formatted date and time when the conversion was created.