I am expected to send a ping every 60 minute or so to keep a listenKey alive.
The documentation states that I need to make a PUT request to the endpoint WITHOUT any parameters.
Keepalive User Data Stream (USER_STREAM)
Response:
{}
PUT /fapi/v1/listenKey
Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes.
Weight: 1
Parameters:
None
When I do this request I get the following error back: “missing field listenKey”. When I send a PUT request with the listenKey as form I still get the same error. Whats the deal?
Code for reference, maybe im dumb and doing something wrong…
or are we supposed to spam the POST every hour or so to extend the validity? Will this guarantee the same listenKey identifier?
If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
Start User Data Stream (USER_STREAM)
Response:
{
"listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1"
}
POST /fapi/v1/listenKey
Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.
Weight: 1
Parameters:
None