peterszombati / xapi-node

xStation5 Trading API for NodeJS/JS
https://peterszombati.github.io/xapi-node/
Other
58 stars 19 forks source link

streamSessionId available from login? #24

Closed stav closed 2 years ago

stav commented 2 years ago

The XAPI documentation says:

After successful login the system responds with the status message that can contain the String representing streamSessionId field:

{
    "status": true,
    "streamSessionId": "8469308861804289383"
}

Are we able to get this information?

peterszombati commented 2 years ago

Hi, yes

in code

const x = new XAPI(...) console.log(x.Stream.session)

stav commented 2 years ago

Ah ok, thanks. It looks like Stream.listen.getKeepAlive is already passing that for us as well.