Create withdrawal transaction
To create a withdrawal transaction, send POST /digital/v1/transaction-requests request with the following body parameters:
Body parameters
{
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600",
"asset": "ETH",
"network": "ETHEREUM",
"reference": "myUniqueRef333",
"destinations": [
{
"address": "0x84A4a239805d06c685219801B82BEA7c76702214",
"amount": "0.001",
"asset": "ETH"
}
]
}
Upon successfully submitting the transaction request, you receive the following details:
Example Response
{
"requestId": "018fef0a-ab15-7afb-966b-7d20c89b5504",
"asset": "ETH",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600",
"network": "ETHEREUM",
"reference": "myUniqueRef333",
"status": "CREATED",
"sources": [],
"destinations": [
{
"address": "0x84A4a239805d06c685219801B82BEA7c76702214",
"amount": "0.001"
}
],
"type": "WITHDRAWAL",
"createdAt": "2024-06-06T19:33:24.885Z"
}
The withdrawal is now actioned and moves throughout the flow described previously. You can use the requestId along with the Get transaction request endpoint to poll the withdrawal at any point.
At this point, the Layer1 platform sends out webhooks related to the withdrawal, which will be covered in the next section, Receive withdrawal notifications.