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:
Field | Type | Description |
---|---|---|
event | string | Identifies the type of event, e.g., "layer1:trade:conversion:state-changed". |
timestamp | string | ISO 8601 formatted date and time when the event was generated. |
data.id | string | Unique identifier for the conversion event, in GUID format. |
data.reference | string | A reference identifier linked to the conversion, in GUID format. |
data.status | string | Current status of the conversion [PLACED, COMPLETE]. |
data.from.asset | string | Type of asset being converted from. |
data.from.amount | float | Amount of the asset being converted. |
data.to.asset | string | Type of asset being converted to. |
data.to.amount | float | Amount of the asset received after conversion. |
data.orders[] | array | Array containing details of orders involved in the conversion. |
data.orders[].symbol | string | Trading pair symbol. |
data.orders[].side | string | Transaction side. |
data.orders[].targetPrice | float | Target price for the order. |
data.orders[].targetQuantity | float | Target quantity for the order. |
data.orders[].venue | string | Venue where the order was placed. |
data.orders[].output | int | Output index of the order (for complex trades involving multiple orders). |
data.orders[].id | string | Unique identifier for the order, in GUID format. |
data.orders[].venueOrderId | string | Unique identifier provided by the trading venue for the order, in GUID format. |
data.orders[].status | string | Current status of the order [PLACED, COMPLETED]. |
data.orders[].actualPrice | float | Actual price at which the order was executed. |
data.orders[].actualQuantity | float | Actual quantity of the asset received from the order. |
data.orders[].createdAt | string | ISO 8601 formatted date and time when the order was created. |
data.router | string | Routing mechanism used for the conversion [VWAP]. |
data.executor | string | Type of execution used for processing the conversion [MAKER]. |
data.movements[] | array | Array detailing any asset movements and amounts related to the conversion. |
data.createdAt | string | ISO 8601 formatted date and time when the conversion was created. |
Updated 7 months ago