Skip to content
TORNLIFE More

API Bazaar Bug?

Started by Skarr02 [3462286] on in Graveyard.

4 replies · 47 views · thread synced · 7 days ago · View on torn.com
About this thread

Posts archived: 5 / 5 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
5
Discussion span
→
People posting
3
Likes on archived posts
2
Posts by staff, officers and moderators
1
Authority score
36 / 100
Historical score
21 / 100
Story score
43 / 100
Engagement score
45 / 100
Skarr02 [3462286]

From my testing, the API appears to return the following:

User with no bazaar / no stock

{
  "bazaar_timestamp": 1780834726,
  "bazaar_delay": 30,
  "bazaar_is_open": true,
  "bazaar": []
}

User with an active bazaar and stock

{
  "bazaar_is_open": true,
  "bazaar": [
    ...
  ]
}

User with a closed bazaar

{
  "bazaar_timestamp": 1780835051,
  "bazaar_delay": 30,
  "bazaar_is_open": false,
  "bazaar": []
}

What is confusing is that a user who has never owned a bazaar appears to return:

"bazaar_is_open": true

despite having an empty bazaar array.

 

Is this expected behaviour, where bazaar_is_open simply reflects an "open" state regardless of whether a bazaar exists or contains stock, or is this a bug in the API response?

At the moment, a user with no bazaar and a user with an open bazaar containing zero stock appear to return identical data, making it impossible to reliably distinguish between the two scenarios using bazaar_is_open alone.

Skarr02 [3462286]

Using this to call and do a check if a user has a Bazaar. Just for reference "https://api.torn.com/user/{TORNID}?selections=bazaar&key={APIKEY}"