markets/actions
Interfaces
Section titled “Interfaces”PlanCancelLocalMarketOrdersOptions
Section titled “PlanCancelLocalMarketOrdersOptions”Defined in: packages/sage/src/markets/actions/index.ts:79
Inputs for cancelling owned Local Market orders and withdrawing filled escrow.
orderIds is a dense, unique list of non-negative safe integers. Pass an
empty list to request withdrawal of filled escrow without cancelling an open
order. The chain remains authoritative about whether escrow is available.
Example
Section titled “Example”declare const authorization: PlanAuthorization;const options: PlanCancelLocalMarketOrdersOptions = { authorization, orderIds: [4, 9],};Properties
Section titled “Properties”authorization
Section titled “authorization”readonly authorization: PlanAuthorization;Defined in: packages/sage/src/markets/actions/index.ts:80
orderIds
Section titled “orderIds”readonly orderIds: readonly number[];Defined in: packages/sage/src/markets/actions/index.ts:81
PlanPlaceLocalMarketOrderOptions
Section titled “PlanPlaceLocalMarketOrderOptions”Defined in: packages/sage/src/markets/actions/index.ts:57
Inputs for placing one exact Local Market order.
priceRaw is the positive raw ATLAS price per cargo unit and quantity is
the positive raw cargo quantity. Both values are unsigned-u64 integers.
Example
Section titled “Example”declare const authorization: PlanAuthorization;const options: PlanPlaceLocalMarketOrderOptions = { authorization, side: 'bid', priceRaw: 100_000_000n, quantity: 5n,};Properties
Section titled “Properties”authorization
Section titled “authorization”readonly authorization: PlanAuthorization;Defined in: packages/sage/src/markets/actions/index.ts:58
priceRaw
Section titled “priceRaw”readonly priceRaw: bigint;Defined in: packages/sage/src/markets/actions/index.ts:60
quantity
Section titled “quantity”readonly quantity: bigint;Defined in: packages/sage/src/markets/actions/index.ts:61
readonly side: "bid" | "ask";Defined in: packages/sage/src/markets/actions/index.ts:59
Functions
Section titled “Functions”planCancelLocalMarketOrders()
Section titled “planCancelLocalMarketOrders()”function planCancelLocalMarketOrders( ctx, market, player,input): Promise<Plan>;Defined in: packages/sage/src/markets/actions/index.ts:581
Plans cancellation of owned Local Market orders and filled-escrow withdrawal.
The planner validates the loaded Local Market and Starbase Player, their canonical Profile/Character/System/Game graph, and each selected order’s ownership and price. An empty selection requests filled-escrow withdrawal. Final escrow availability and order races remain chain-authoritative.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
market | LocalMarketSnapshot |
player | StarbasePlayerSnapshot |
input | PlanCancelLocalMarketOrdersOptions |
Returns
Section titled “Returns”Promise<Plan>
Example
Section titled “Example”declare const ctx: SageContext;declare const market: LocalMarketSnapshot;declare const player: StarbasePlayerSnapshot;declare const options: PlanCancelLocalMarketOrdersOptions;const plan = await planCancelLocalMarketOrders(ctx, market, player, options);console.log(plan.describe());planPlaceLocalMarketOrder()
Section titled “planPlaceLocalMarketOrder()”function planPlaceLocalMarketOrder( ctx, market, player,input): Promise<Plan>;Defined in: packages/sage/src/markets/actions/index.ts:334
Plans one Local Market bid or ask without signing, simulation, or writes.
The planner validates the loaded Local Market and Starbase Player, their canonical Character/System/Game graph, the current market-enabled Starbase incarnation, and the known bid ATLAS or ask cargo balance. Matching, rent, final capacity, permissions, and state races remain chain-authoritative.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
market | LocalMarketSnapshot |
player | StarbasePlayerSnapshot |
input | PlanPlaceLocalMarketOrderOptions |
Returns
Section titled “Returns”Promise<Plan>
Example
Section titled “Example”declare const ctx: SageContext;declare const market: LocalMarketSnapshot;declare const player: StarbasePlayerSnapshot;declare const options: PlanPlaceLocalMarketOrderOptions;const plan = await planPlaceLocalMarketOrder(ctx, market, player, options);console.log(plan.describe());References
Section titled “References”PlanAuthorization
Section titled “PlanAuthorization”Re-exports PlanAuthorization