Jump to content

Data API/Game Data

From Bconomy Wiki
Revision as of 12:19, 2 November 2026 by TheCarriedOne (talk | contribs) (Publish from docs/data-api.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Data API · Types

misc/itemData

Returns static data for all game items.

Request

{ "type": "misc/itemData" }

Response

Array<{
  id: number
  imageUrl: string
  recipe: Array<[idName: string, amount: number]>
  // plus all other item fields (name, emoji, idName, etc.)
}>

misc/gameState

Returns the current live game state including active bosses, the ball pit, global action boosts, and giveaways. Giveaways are included only for Main profiles; profiles without direct-transfer access receive an empty activeGiveaways array.

Request

{ "type": "misc/gameState" }

Response

{
  globalActionBoosts: Array<{
    type: "baseGlobalActionBoost" | "flexibleGlobalActionBoost"
    user: User
    action: "fish" | "hunt" | "explore" | "mine" | "work"
    multiplier: number
    duration: number    // ms
    endTime: number     // Unix ms
  }>
  lastGlobalActionCooldownResetTime: number  // Unix ms
  activeBossStatus: {
    lastUpdated: number
    data: {
      bossId: string
      startTime: number
      initialHealth: number
      weaknessItemIds: number[]
      numAttackingUsers: number
      damageDealt: number
      nextWeakpointRevealAt: number | null
    }
  } | null
  ballPitStatus: {
    type: "black" | "purple" | "blue" | "orange" | "yellow" | "green"
    balls: number
  }
  activeGiveaways: Array<{
    id: number
    ownerBcId: number
    message: string
    endDate: string     // ISO 8601
    numWinners: number
    entrantBcIds: number[]
    flatInventory: Inventory
  }>
}

misc/userBallsOwned

Returns the number of balls the authenticated user (identified by the API key) currently has in the ball pit. No id parameter is accepted; the result is always for the key holder.

Request

{ "type": "misc/userBallsOwned" }

Response — number (non-negative integer)

stats/questSeasons

Returns archived quest seasons. The live ongoing season is excluded.

Request

{ "type": "stats/questSeasons" }

Response

interface QuestSeasonsResponse {
  endedSeasons: Array<{
    id: number
    name: string
    emoji: string
    endedAt: number   // Unix ms
  }>
}

misc/bossFactionStats

Returns active faction combat contribution stats for the current boss fight. Returns null if no boss is active or the user is not in a faction.

Request

{ "type": "misc/bossFactionStats" }

Response

interface BossFactionStatsResponse {
  factionPresenceMemberCount: number
  factionMultiplier: number
} | null

Generated from the Bconomy source documentation. Edits made on the wiki are overwritten on the next publish; ask the developers to change the source.