> For the complete documentation index, see [llms.txt](https://satangdev.gitbook.io/satang-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://satangdev.gitbook.io/satang-api/apis-v3/private/listen-key.md).

# Listen Key

## Generate a listen key (UserStream)

<mark style="color:green;">`POST`</mark> `htts://satangcorp.com/api/v3/userDataStream`

Create a new listen key. The listen key will be expired after 60 minutes

#### Headers

| Name         | Type   | Description                    |
| ------------ | ------ | ------------------------------ |
| X-MBX-APIKEY | string | User API-Key for authorization |

{% tabs %}
{% tab title="200 " %}

```
{
    "listenKey":  "6d11238b402041a3ba53b97de503c6a2"
}
```

{% endtab %}
{% endtabs %}

## Keep-alive a listen key (UserStream)

<mark style="color:orange;">`PUT`</mark> `htts://satangcorp.com/api/v3/userDataStream`

Keep-alive a listen key for 30 minutes

#### Query Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| listenKey | string |             |

#### Headers

| Name         | Type   | Description                    |
| ------------ | ------ | ------------------------------ |
| X-MBX-APIKEY | string | User API-Key for authorization |

{% tabs %}
{% tab title="200 " %}

```
{}
```

{% endtab %}
{% endtabs %}

<mark style="color:red;">`DELETE`</mark> `htts://satangcorp.com/api/v3/userDataStream`

Close a listen key

#### Headers

| Name         | Type   | Description                    |
| ------------ | ------ | ------------------------------ |
| X-MBX-APIKEY | string | User API-Key for authorization |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
