Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket / postRequest #57

Open
tedyptedto opened this issue Feb 15, 2025 · 4 comments
Open

websocket / postRequest #57

tedyptedto opened this issue Feb 15, 2025 · 4 comments

Comments

@tedyptedto
Copy link

tedyptedto commented Feb 15, 2025

Hello,

Thanks for your work.
I think the postRequest( function in WebSocket is not working.

You are testing :
data.channel === 'post'
And it will be (i think) :
data.method === 'post'

And after doing this change, i still have problem.

Hope you can help.

My test code :

 hlsdk.value.subscriptions.postRequest('info', {
   type: 'userVaultEquities',
   user: portfolio_address
 }).then(response => {
   console.log('Vault equities:', response.data)
 }).catch(error => {
   console.error('Error fetching vault equities:', error)
 }).
@nomeida
Copy link
Owner

nomeida commented Feb 18, 2025

Hey will take a look at this, thanks

@tedyptedto
Copy link
Author

thanks, let me know if you find the solution :)
i will update my code to avoid REST API call and change by WebSocket call.

@nomeida
Copy link
Owner

nomeida commented Feb 21, 2025

Hey, still haven't figured this out, for now try to just use REST API calls instead of the websocket calls. There shouldn't be any difference between the two really

@tedyptedto
Copy link
Author

I'm currently using the REST API, but it would be beneficial to route all requests through WebSocket instead. Please let me know your thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants