Jump to content

Data API/Market

From Bconomy Wiki

Data API · Types

market/preview

[edit | edit source]

Returns the current lowest listing price and price delta for every item. Data is cached (refreshes approximately every 5 minutes).

Request

{ "type": "market/preview" }

Response

{
  lastUpdated: number   // Unix ms timestamp
  data: Record<string, MarketPreviewItem>  // keyed by item idName
}

market/listings

[edit | edit source]

Returns up to 50 active market listings for an item, sorted by price ascending.

Request

{ "type": "market/listings", "itemId": 5 }

Response — MarketListing[]

market/userListings

[edit | edit source]

Returns all active market listings created by a user.

Request

{ "type": "market/userListings", "id": 1 }

Response — MarketListing[]

market/globalRecentActivity

[edit | edit source]

Returns the last 20 market transactions (buys, listings, and delistings) across all items. Results are cached for 10 seconds.

Request

{ "type": "market/globalRecentActivity" }

Response — MarketActivityEntry[]

market/recentTransactions

[edit | edit source]

Returns the last 5 market transactions for a specific item.

Request

{ "type": "market/recentTransactions", "itemId": 5 }

Response — MarketActivityEntry[]

market/priceHistory

[edit | edit source]

Returns historical lowest-price snapshots for an item.

Request

{ "type": "market/priceHistory", "itemId": 5, "days": 30 }
Field Type Required Notes
itemId number yes
fromMs non-negative integer no Unix ms start of range
toMs non-negative integer no Unix ms end of range
days positive integer no number of days back from now; alternative to fromMs/toMs

Response — MarketPriceSnapshot[] (sorted by snapshotTime ascending)

market/volumeHistory

[edit | edit source]

Returns aggregated trade volume history for an item.

Request

{ "type": "market/volumeHistory", "itemId": 5, "granularity": "day", "days": 30 }
Field Type Required Notes
itemId number yes
granularity "hour" | "day" | "month" yes
days positive integer no max 400; defaults to server-configured value

Response — MarketVolumeSnapshot[]

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