MCPcopy Create free account
hub / github.com/discountry/ritmex-bot / parseExchangeCommand

Function parseExchangeCommand

src/cli/command-parser.ts:153–162  ·  view source on GitHub ↗
(
  action: string,
  options: Record<string, string | boolean>,
  common: CommandCommonOptions & { help?: boolean }
)

Source from the content-addressed store, hash-verified

151}
152
153function parseExchangeCommand(
154 action: string,
155 options: Record<string, string | boolean>,
156 common: CommandCommonOptions & { help?: boolean }
157): ParsedCliCommand {
158 assertAllowedOptions(options, new Set(GLOBAL_OPTION_NAMES));
159 if (action === "list") return { kind: "exchange-list", ...common };
160 if (action === "capabilities") return { kind: "exchange-capabilities", ...common };
161 throw new CommandParseError(`Unsupported exchange action '${action}'`);
162}
163
164function parseMarketCommand(
165 action: string,

Callers 1

parseCommandArgvFunction · 0.85

Calls 1

assertAllowedOptionsFunction · 0.85

Tested by

no test coverage detected