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

406 when trying to stream offers #552

Closed
praneethmendu opened this issue May 24, 2020 · 5 comments · Fixed by #553
Closed

406 when trying to stream offers #552

praneethmendu opened this issue May 24, 2020 · 5 comments · Fixed by #553
Labels

Comments

@praneethmendu
Copy link

Describe the bug
I am trying to stream my dex offers, but I keep getting 406 : not applicable

What version are you on?
5.0.2

To Reproduce

let StellarSdk = require('stellar-sdk')
let server = new StellarSdk.Server('https://horizon.stellar.org');

server.offers()
    .forAccount("GBNEOJ5TZEDXEE2IYKXQ2HQEIZUQGVLS74KNZ72MAWMNPA4IKFC7BHR7")
    .stream({
        onmessage: (currentOffers) => {
            console.log(currentOffers);
        },
        onerror: (err) => {
            console.log(err)
        }
    })
abuiles added a commit that referenced this issue May 26, 2020
This allows streaming offers for a given account. Trying to stream
through `/offers` is not supported at the moment.

Fix #552
abuiles added a commit that referenced this issue May 26, 2020
This allows streaming offers for a given account. Trying to stream
through `/offers` is not supported at the moment.

Fix #552
@abuiles
Copy link
Contributor

abuiles commented May 26, 2020

@praneethmendu thanks! I just released 5.0.3 which fixes this problem.

@praneethmendu
Copy link
Author

Can you test it again, Im getting the same error

@vcarl
Copy link
Contributor

vcarl commented May 27, 2020

Appears to work in a codesandbox https://codesandbox.io/s/falling-leftpad-q0upv

@abuiles
Copy link
Contributor

abuiles commented May 27, 2020

@praneethmendu are you on 5.0.3?

@praneethmendu
Copy link
Author

My Bad, I was using the wrong API: offers('accounts', address) which seems to only work for REST calls,
Thanks for the help.

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

Successfully merging a pull request may close this issue.

3 participants