Jump to content
Medved Trader Forums

Having problem getting Websocket Available Funds Data with colon


Roger

Recommended Posts

Hello, I am having trouble getting from websocket  -- balancesUpdate --  the AvailableFunds:USD value.  The colon is creating an error in my javascript code.

I can access other websocket data that does not have that colon. I have tried many code variations, with no luck.

Examples:

This works:  addmessages(json.result.accountKey)   no colon

This does not work: addmessages(json.result.AvailableFunds:USD)    the colon causes an error

Any suggestions?

Thanks, Roger

Link to comment
Share on other sites

Both give error in Visual Studio Code and the code will not run.

addmebal (json.result.AvailableFunds~USD)

addmessages (json.result.AvailableFunds:USD)

    The underscore  _  does not give error in Visual Studio Code, so may work.

addmessages (json.result.AvailableFunds_USD)

Thanks.

  • Confused 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...