Automated Orders Notifications
Webhook
These notifications allow you to receive real-time updates regarding the status of automated orders. It ensures seamless communication and timely updates enabling you to take necessary actions promptly, like notifying further your users. The events include the following statuses:
- Finished - Indicates that an automated order has been successfully executed.
- Failed - Indicates that an automated order has failed due to any processing error.
- Cancelled - Indicates that an automated order has been cancelled by the user or by the system due to specific reasons such as delisting an asset.
- Expired - Indicates that an automated order has expired.
Examples
1. Finished
{
"params": {
"user_id": "1ef2efc7-1d0c-658b-8bdb-7398fd6afe94",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef5401-cf20-6165-b0cb-3e1e8185fb3c",
"asset_id": "a49406ee-ee33-11ec-aafe-062d595118ef",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"asset_amount": "2.43667276",
"fiat_amount": "1",
"type": "buy",
"status": "finished",
"created_at": "2024-08-06T14:40:21.848515Z"
}
}
2. Failed (with reason)
{
"params": {
"user_id": "1ef2efc7-1d0c-658b-8bdb-7398fd6afe94",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef52f5-9f60-60e1-8165-8a61e573af23",
"asset_id": "a49406ee-ee33-11ec-aafe-062d595118ef",
"fiat_id": "ea96d0fc-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "failed",
"fail_reason": "slippage.evaluation",
"created_at": "2024-08-05T06:40:36.612535Z"
}
}
3. Cancelled (with reason, user action)
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50be-98ba-678f-aeb0-164c3edf7ee5",
"asset_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"fiat_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"type": "buy",
"status": "cancelled",
"fail_reason": "cancelled.by.user",
"created_at": "2024-08-02T11:01:40.81443Z"
}
4. Cancelled (with reason, auto-canceling)
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50da-52c7-6848-9b66-8a418b68cf6f",
"asset_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "cancelled",
"fail_reason": "cancelled.due.to.asset.disabling",
"created_at": "2024-08-02T14:20:09.370021Z"
}
}
5. Expired
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50da-52c7-6848-9b66-8a418b68cf6f",
"asset_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "expired",
"created_at": "2024-08-02T14:20:09.370021Z"
}
}
6. Failed (with reason, user account inactive)
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50da-52c7-6848-9b66-8a418b68cf6f",
"asset_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "failed",
"fail_reason": "user.account.inactive",
"created_at": "2024-08-02T14:20:09.370021Z"
}
}
7. Failed (with reason, user transaction inactive cryptocoins)
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50da-52c7-6848-9b66-8a418b68cf6f",
"asset_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "failed",
"fail_reason": "user.transaction.inactive.cryptocoin",
"created_at": "2024-08-02T14:20:09.370021Z"
}
}
8. Failed (with reason, user transaction trading disabled)
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50da-52c7-6848-9b66-8a418b68cf6f",
"asset_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "failed",
"fail_reason": "user.transaction.trading.disabled",
"created_at": "2024-08-02T14:20:09.370021Z"
}
}
9. Failed (with reason, user transaction operation disabled)
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50da-52c7-6848-9b66-8a418b68cf6f",
"asset_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "failed",
"fail_reason": "user.transaction.operations.disabled",
"created_at": "2024-08-02T14:20:09.370021Z"
}
}
10. Failed (with reason, execution error)
{
"params": {
"user_id": "1ef50a17-5397-610c-bc4b-5de229acd5eb",
"domain_slug": "b2b2c_qa",
"trade_id": "01ef50da-52c7-6848-9b66-8a418b68cf6f",
"asset_id": "1eebacd8-7001-6ebe-97ca-dd9f96ed2091",
"fiat_id": "ea96ccef-edee-11eb-9bf0-06502b1fe55d",
"type": "buy",
"status": "failed",
"fail_reason": "order.execution.error",
"created_at": "2024-08-02T14:20:09.370021Z"
}
}
Request
Responses
- 200
Return a 200, 201, 202 or 204 status to indicate that the data was received successfully