> For the complete documentation index, see [llms.txt](https://developer.kriptomat.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.kriptomat.io/docs/whitelabel-api-fiat-onramp-offramp-via-bank-wire/webhooks-and-websockets.md).

# Webhooks & Websockets

**Exchange buy**

```
{
"id": 58463,
"type": "BUY",

"amount": 0.0623414132, //amount in cryptocurrency

"pair": "btceur",

"price": 2341.67, //price in FIAT

"date": "2018-11-27T13:46:22.658",

"state": "SUCCESS",  //states: SUCCESS, PENDING and ERROR

"fee": 2.00,  //value in FIAT

"subtotal": 98.00,  //value in FIAT

"total": 100.00  //value in FIAT

}

```

**Exchange sell**

```
{

"id": 58463,

"type": "SELL",

"amount": 0.0623414132, //amount in cryptocurrency

"pair": "btceur",

"price": 2341.67, //price in FIAT

"date": "2018-11-27T13:46:22.658",

"state": "SUCCESS",  //states: SUCCESS, PENDING and ERROR

"fee": 2.00, //value in FIAT

"subtotal": 99.00, //value in FIAT

"total": 100.00 //value in FIAT

}

```

**Kyc Statuses**

```
{

  "user_id": 34693,

  "status": {

    "createDate": "2018-07-18 11:08:30+0000",

    "reviewDate": "2018-07-18 11:27:53+0000",

    "startDate": "2018-07-18 11:26:58+0000",

    "reviewResult": {

      "moderationComment": "",

      "clientComment": "Please take and upload a photo of yourself holding your proof of identity.",

      "reviewAnswer": "RED",

      "rejectLabels": ["UNSATISFACTORY_PHOTOS"],

      "reviewRejectType": "RETRY"

    },

    "reviewStatus": "completed",

    "notificationFailureCnt": 0,

    "applicantId": "5b4f1f930a975a1dd7213c1b"

  },

  // Array with detailed information on each checked document.

  // The information appears only after the document has been checked.

  "documentStatus": [

    {

      "idDocType": "PASSPORT",

      "reviewResult": {

        "moderationComment": "",

        "clientComment": "",

        "reviewAnswer": "GREEN"

      }

    },

    {

      "idDocType": "SELFIE",

      "reviewResult": {

        "moderationComment": "Please take and upload a photo of yourself holding your proof of identity.\n\n",

        "clientComment": "",

        "reviewAnswer": "RED",

        "rejectLabels": ["UNSATISFACTORY_PHOTOS"]

      }

    }

  ]

}
```

**Bank accounts statuses**

```
{

  "user_id": 7436292,

  "id": "7436292",

  "state": "VERIFIED"

}
```

&#x20;

&#x20;

**Withdrawal statuses**

```
{

"user_id": 84624,

"id": 58463,

"type": "FIAT_WITHDRAWAL",

"amount": 100.00, //amount in FIAT

"date": "2018-11-27T13:46:22.658",

"state": "SUCCESSFUL",  //states: SUCCESS, PENDING and ERROR

"deposited": 100.00,  //value in FIAT

"bank_fee": 1.00,  //value in FIAT

"received": 99.00  //value in FIAT

}
```

**Deposit statuse**`s`

```
{

"user_id": 84624,

"id": 58463,

"type": "FIAT_DEPOSIT",

"amount": 99.00, //amount in FIAT

"date": "2018-11-27T13:46:22.658",

"state": "SUCCESS",  //states: SUCCESS, PENDING and ERROR

"deposited": 100.00,  //value in FIAT

"bank_fee": 1.00,  //value in FIAT

"received": 99.00

}
```

\
**Master balance notifications**

```
{

  "error": "Balance low, BTC balance below 1.00",

}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.kriptomat.io/docs/whitelabel-api-fiat-onramp-offramp-via-bank-wire/webhooks-and-websockets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
