@@ -19,6 +19,7 @@ import type { Storage } from '../storage/interface.js';
1919import { requireAuth } from '../auth/middleware.js' ;
2020import { success , error } from '../middleware/envelope.js' ;
2121import { resolveIdentity } from '../utils/gaii.js' ;
22+ import { commerceFeePercent } from '../services/marketplace-fee.js' ;
2223import { createEntitlement , readEntitlementForCall } from '../services/metered-entitlements.js' ;
2324import {
2425 type Offering , type Need , type Bid , type ActionCommercial ,
@@ -33,6 +34,17 @@ const posOrNull = (v: unknown): number | null => (typeof v === 'number' && Numbe
3334export function exchangeMarketRouter ( config : AimeatConfig , storage : Storage ) : Router {
3435 const router = Router ( ) ;
3536
37+ // ── INFO — the marketplace's public economics (rake, currencies) ─────────────
38+ /** Public: what the platform takes on each metered call + the units in play. */
39+ router . get ( '/v1/exchange/info' , ( _req : Request , res : Response ) => {
40+ return res . json ( success ( config . nodeId , {
41+ rake_percent : commerceFeePercent ( config ) ,
42+ rake_note : 'Platform fee applied to each metered call (provider keeps the rest). Set by the node operator.' ,
43+ units : [ 'morsels' , 'EUR' , 'USD' ] ,
44+ morsel_note : 'Morsels are the node’s throttle unit (plain integers); real money settles in EUR/USD.' ,
45+ } ) ) ;
46+ } ) ;
47+
3648 // ── OFFERINGS (supply) ─────────────────────────────────────────────────────
3749 /** List a supply offering for an action the caller's extension owns. Pricing is read from the action. */
3850 router . post ( '/v1/exchange/offerings' , requireAuth ( ) , async ( req : Request , res : Response ) => {
0 commit comments