API
Publiczny JSON tylko do odczytu, z CORS i ETag. Te same filtry co na stronach.
curl -s "https://trade.projectfibula.org/api/market?item=uh&side=sell&sort=low"
/api/market | item, side (sell|buy), period (6h|24h|3d|7d), sort (recent|low|high), city, n (60-600) | {generated_at, total, offers: [{player, item, name, slug, sprite, side, qty, bp, price, unit, unit_price, city, at (latest mention), priced_at (the offer shown), times, message_id, message, outfit}]} |
/api/market?group=player | (no item) side, period, sort, city, n | {generated_at, total, cards: [{player, side, at, lowest, highest, times (announcements by the player on that side), outfit, offers: [...]}]} |
/api/items | – | {generated_at, items: [{item, name, slug, sprite, sellers_now, buyers_now, lowest_ask, unit, median_7d_sell, median_7d_buy, change_7d_sell}]} |
/api/item/<slug> | days (30|90|180) | {item, name, slug, sprite, unit, days: [{date, sell: {median, q1, q3, n}, buy: {...}}], stats} |
/api/chat | q, player, channel, item, from, to (YYYY-MM-DD, UTC), before (id), limit (1-200) | {messages: [{id, at, channel, sender, message}], next_before} |
/api/names | – | [[name, slug, [aliases], sprite]] |
/api/compose | s1, i1, q1, p1 ... s20, i20, q20, p20 (row: side sell|buy, item, quantity, price such as 2.5k, 50k, 1kk, 800), city, short (0: full names) | {max, city, short, messages: [{text, length, rows, read: [{side, item, name, slug, sprite, qty, bp, unit, unit_price, city}]}], rows: [{ok, reason, message, item}]} (the chat message(s) for the rows, each as the site reads it; reason: price_band, not_read, mismatch, unknown_item, bad_price, bad_qty, too_long) |
/api/state | – | {seq, last_message_at} |