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

Disable the tradingpost part of the account value #943

Closed
queicherius opened this Issue Apr 1, 2018 · 19 comments

Comments

Projects
None yet
4 participants
@queicherius
Member

queicherius commented Apr 1, 2018

gw2efficiency will temporarily calculate the account value without including the tradingpost sell orders, the tradingpost buy orders, and the tradingpost delivery box. This change is due to two bugs in the official API:


Bug 1) The buy/sell orders are not being updated (Official Issue)

Since some time in January 2018, the sell/buy orders (the things you are currently trying to sell/buy on the tradingpost) have not been updated. This means that your value was calculated with your tradingpost as it was in January 2018, even tho you most likely sold/ordered other items in the meantime, which caused the value to be incorrect.


Bug 2) The tradingpost sell/buy orders may return wrong page numbers (Official Issue)

Also since some time in January 2018, the tradingpost API could return wrong page numbers. These numbers tell gw2efficiency how many pages (each page is 200 transactions) of transactions you have. Since the numbers were wrong, we could not calculate the account value at all in some cases.


We were waiting for the official API to fix the issues, but according to reports they now appear more regularly. To make it fair for all users and to fix the calculation for the users suffering from those issues, we decided to completely remove tradingpost values from the account value till the problems are fixed. Thank you for your understanding.

@kenofnz

This comment has been minimized.

kenofnz commented Apr 9, 2018

A workaround for bug 1 I've come across was to quickly query the gw2api twice, around 3 seconds apart, would update my trading post listings.

I haven't tried anything to verify if the workaround to update your tp listings would fix bug 2.

@1moere1

This comment has been minimized.

1moere1 commented Apr 10, 2018

@kenofnz Workaround for bug 1 I can't confirm to be working for sell, only for buy. The only way to get an updated buy listing is by using a newly created api key (sometimes).

@queicherius

This comment has been minimized.

Member

queicherius commented Apr 10, 2018

A workaround for bug 1 I've come across was to quickly query the gw2api twice, around 3 seconds apart, would update my trading post listings.

The entire account update takes about 3 seconds and it's already tricky getting all updates into 24h with the resources I have, so doubling it is pretty much impossible. 😞

@kenofnz

This comment has been minimized.

kenofnz commented Apr 11, 2018

Is it possible to execute only the TP api query twice?

That is assuming you can build the commerce map entry in accountData on it's own.

i just tested the workaround with my own TP listings using no sleeps and appears to work.

Here's a quick marshaled result of the workaround with no sleeps between queries.

Buy Listings
250 ---- for 856
125 ---- for 856
250 ---- for 856
106 ---- for 863
238 ---- for 863
250 ---- for 966
250 ---- for 966
198 ---- for 966
1 ---- for 8030003
Value: 953g 61s 43c <- Previous total buy value

Sell Listings
250 ---- for 944
248 ---- for 944 <- Previous listing amount
10 ---- for 8449
221 ---- for 8449
60 ---- for 2676
250 ---- for 950
115 ---- for 950
Value: 263g 62s 26c <- Previous total sell value

Buy Listings
Value: 0g 0s 0c <- Updated total buy value

Sell Listings
250 ---- for 944
244 ---- for 944 <- Updated listing amount
10 ---- for 8449
221 ---- for 8449
60 ---- for 2676
250 ---- for 950
115 ---- for 950
Value: 263g 28s 28c <- Updated total sell value

Listings refreshed

Seems like the API goes inactive on an API Key if it's not hit within a couple minutes.
Hitting it again while its inactive puts it back to active but doesn't update the data.
Hitting it multiple times while it's active seems to work fine.
Maybe it's a caching issue on gw2 api's end, this is just my speculation though.

@queicherius

This comment has been minimized.

Member

queicherius commented Apr 11, 2018

Hm, I'd rather wait until the official API works again instead of resorting to hacky "fixes" (that are not confirmed to work in 100% of instances), but we will see how long it'll be until they work on it. Might have to resort to it if it taks too long. :/

The other issue with "fixing" it this way is that the users will not know that the API is wonky, which means there is less incentive for the API to be properly fixed. Aka worse for the users in the short term, better for the API in the long term.

@DxCx

This comment has been minimized.

DxCx commented Jul 1, 2018

From my testing this looks like cacheing issue,
Can you try append to each request ?ts=timestamp to skip cacheing?

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 1, 2018

@DxCx I had reports of people refreshing the page daily and still not getting the items they listed 4+ days ago

@DxCx

This comment has been minimized.

DxCx commented Jul 1, 2018

well since gw2efficency didnt work for me as well, i was writing a little script of my own
and im using ?ts= trick there and it works for me,
thats why i suggest it here as well (requests with ?ts= are uncacheable)

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 3, 2018

and im using ?ts= trick there and it works for me,

Interesting. I wonder if it works because of the query string or because you are requesting your data multiple times (as suggested above). I'll give it a shot when the API is fully recovered.

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 12, 2018

I just re-enabled the tradingpost bit (for now without the trick that @DxCx mentioned), just to see how it will go. Please let me know if the tradingpost parts of your account value are not correct!

@DxCx

This comment has been minimized.

DxCx commented Jul 12, 2018

did you had the chance to test it tho?
did it work for you too?

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 12, 2018

It seemed to work for me without the trick as well. I can at least not see any jobs failing in the last 10 hours, but of course this does not say if the data is actually correct or not

@DxCx

This comment has been minimized.

DxCx commented Jul 12, 2018

i can see the issue with buy/sell listing in trading post
it doesnt refersh correctly right now (/buys and /sells)
this is effecting account value isn't it?

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 12, 2018

Yes, it should. I'll try it with the query parameter with the next deploy.

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 13, 2018

@DxCx I added the query parameter - do the buy/sell listings in the tradingpost section now work correctly for you?

@DxCx

This comment has been minimized.

DxCx commented Jul 13, 2018

Im not with the laptop atm (so cant really test it with the game) but ill give it a try tomorrow and report back

@DxCx

This comment has been minimized.

DxCx commented Jul 13, 2018

hey @queicherius
it took like 5 minutes after i made the change in game and till it was showen,
but that is much better then before where it didn't update the day after aswell. ;)

P.S
right now it will fetch a new data only when refereshing the page,
maybe adding a refersh now button like delivery box will be easier then refershing the whole page..

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 14, 2018

it took like 5 minutes after i made the change in game and till it was showen,
but that is much better then before where it didn't update the day after aswell. ;)

5 minutes is the internal cache time of the API, nothing can go past that.

right now it will fetch a new data only when refereshing the page,
maybe adding a refersh now button like delivery box will be easier then refershing the whole page..

Yeah might add that in the future


Sadly I am still getting reports that people's stuff is not showing up, even after 24+ hours. 😞

@queicherius

This comment has been minimized.

Member

queicherius commented Jul 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment