Ccxt: How to get Binance listenKey by sending POST request (browser javascript)?

Created on 1 Apr 2018  ·  3Comments  ·  Source: ccxt/ccxt

Hi, as Binance userDataStream requires listenKey (POST data), is it possible to obtain the key using ccxt existing functions with browser javascript? Or is it possible to add and extend ccxt functions to get the listenKey? Thanks a lot for the help.

Reference:
Binance API userDataStream: https://github.com/binance-exchange/binance-official-api-docs/blob/master/user-data-stream.md

  • OS: MacOS
  • Programming Language version: browser javascript (using localhost proxy)
  • CCXT version: any
  • Exchange: Binance
  • Method: (looking for a method)
question

All 3 comments

is it possible to obtain the key using ccxt existing functions

Yes, by means of implicit methodsprivatePostUserDataStream.

with browser javascript?

Because Binance does not have CORS support yet, you will have to use a CORS proxy: https://github.com/ccxt/ccxt/wiki/Install#cors-access-control-allow-origin

Or is it possible to add and extend ccxt functions to get the listenKey?

We already support all endpoints out of the box, no need to add anything.

Hope it answers your questions. Thx!

That's really awesome, I use publicPostUserDataStream and it works seamlessly!

Thanks a lot, appreciate your reply and kindness, I'll be wasting days and weeks and get stucked if didn't have your solution. Will support you on ccxt with donation after traded and earned successfully, cheers.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

UnitNote picture UnitNote  ·  3Comments

nashse picture nashse  ·  3Comments

kumboo picture kumboo  ·  3Comments

luigikitten picture luigikitten  ·  3Comments

werewere picture werewere  ·  3Comments