-
Notifications
You must be signed in to change notification settings - Fork 42
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
Subscribing to ORDERS does not produce updates when orders are entered #12
Comments
Since you're working with multiple ids you have to use the subscribe_to_ids function Here's an example of how you use subscribe_to_ids
I tried this myself and got the expected result |
Thanks for the fast reply. |
I'm still not having any results using the avanza.subscribe_to_ids function unfortunally
This generates a list like this: I'm wondering if there is an order issue of the accounts or that some types of accounts should not be in this string array for it to work. from the documentation in the .js api it says I need to provide all accounts but reading fhqvst/avanza#48 (comment) it seems the order is important aswell. I don't want to inquire too much about what kind of accounts you have but is there any patterns you have observed that could be usefull? I'm really lost here. Thanks! :) |
I managed to solve it by inspecting the site and see what is sent. here is the code that worked for me:
Again thanks for the great api ! :) |
First off. awsome job! I've been trying this api wrapper out a bit and it works well for most parts!
I'm trying to subscribe to ORDERS by specifying a string of account ids formated like this:
accounts = "_accountId0,accountId1,accountId2"
oraccounts = "_2234713,2234713,2234713"
I've also tried providing a list of accountIds and it does not seem to work either.
I would expect the following code to start returning changes made to my orders but nope :(
await avanza.subscribe_to_id( ChannelType.ORDERS, accounts, callback )
Has anyone gotten this to work?
Repro steps:
1: subscribe to ORDERS
2: place order
3: no callback :(
The text was updated successfully, but these errors were encountered: