User Data Streams
PUTKeepalive user data stream (USER_STREAM)
API Description
Extends the listenKey by 60 minutes from the moment of the call.
HTTP Request
HTTP
PUT /v1/listenKeyRequest Weight
1
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
listenKey |
STRING | NO | The key to extend. Optional — the key's active listenKey is extended when omitted. Sending a listenKey that is not the key's active one — or calling this when the key has no active listenKey at all — is -1125. |
Response Example
JSON
{}Send a keepalive every 30 minutes. Half the lifetime gives you one free retry before expiry. Base the schedule on a timer, not on stream activity — a quiet account produces no events, and an open WebSocket connection does not extend the key on its own.
If the key does lapse, the stream sends a listenKeyExpired
event and then closes the connection. Recover by calling POST /v1/listenKey again, reconnecting,
and resnapshotting with GET /v1/positions and GET /v1/openOrders — events during the gap are
not replayed.


