flash-trade-mcp 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +9 -17
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49601,7 +49601,7 @@ function registerOpenPositionTool(server, client) {
49601
49601
  slippage_percentage: exports_external.string().max(8).optional().describe('Default: "0.5" (0.5%)'),
49602
49602
  take_profit: exports_external.string().max(32).optional().describe("TP trigger price in UI format"),
49603
49603
  stop_loss: exports_external.string().max(32).optional().describe("SL trigger price in UI format"),
49604
- degen_mode: exports_external.boolean().optional().describe("Enable degen mode (higher leverage limits)")
49604
+ degen_mode: exports_external.coerce.boolean().optional().describe("Enable degen mode (higher leverage limits)")
49605
49605
  }
49606
49606
  }, async (params) => {
49607
49607
  const res = await client.openPosition({
@@ -49675,7 +49675,7 @@ function registerClosePositionTool(server, client) {
49675
49675
  position_key: exports_external.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).describe("Position account pubkey to close"),
49676
49676
  input_usd: exports_external.string().max(32).describe('USD amount to close, e.g. "500.00" for full or "250.00" for partial'),
49677
49677
  withdraw_token_symbol: exports_external.string().max(16).describe('Token to receive: "USDC", "SOL", etc.'),
49678
- keep_leverage_same: exports_external.boolean().optional().describe("Keep leverage constant during partial close"),
49678
+ keep_leverage_same: exports_external.coerce.boolean().optional().describe("Keep leverage constant during partial close"),
49679
49679
  slippage_percentage: exports_external.string().max(8).optional().describe('Default: "0.5" (0.5%)')
49680
49680
  }
49681
49681
  }, async (params) => {
@@ -49809,7 +49809,7 @@ function registerReversePositionTool(server, client) {
49809
49809
  position_key: exports_external.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).describe("Position account pubkey to reverse"),
49810
49810
  owner: exports_external.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).describe("Wallet pubkey"),
49811
49811
  slippage_percentage: exports_external.string().max(8).optional().describe('Default: "0.5" (0.5%)'),
49812
- degen_mode: exports_external.boolean().optional().describe("Enable degen mode for the new position")
49812
+ degen_mode: exports_external.coerce.boolean().optional().describe("Enable degen mode for the new position")
49813
49813
  }
49814
49814
  }, async (params) => {
49815
49815
  const res = await client.reversePosition({
@@ -56953,17 +56953,15 @@ function registerTriggerOrderTools(server, client) {
56953
56953
  description: "Place a take-profit (TP) or stop-loss (SL) trigger order on an existing position. The trigger order will automatically close part or all of the position when the price hits the trigger level. Requires an open position for the given market/side. Returns an unsigned transaction. Up to 5 trigger orders per position.",
56954
56954
  inputSchema: {
56955
56955
  market_symbol: exports_external.string().max(16).describe('Market symbol, e.g. "SOL", "BTC", "ETH"'),
56956
- collateral_symbol: exports_external.string().max(16).describe('Collateral token, e.g. "USDC", "JITOSOL"'),
56957
56956
  side: exports_external.enum(["LONG", "SHORT"]).describe("Position side"),
56958
56957
  trigger_price: exports_external.string().max(32).describe('Trigger price in UI format, e.g. "160.00"'),
56959
56958
  size_amount: exports_external.string().max(32).describe('Size in target token to close when triggered, e.g. "0.5"'),
56960
- is_stop_loss: exports_external.boolean().describe("true = stop-loss, false = take-profit"),
56959
+ is_stop_loss: exports_external.coerce.boolean().describe("true = stop-loss, false = take-profit"),
56961
56960
  owner: exports_external.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).describe("Wallet pubkey (must own the position)")
56962
56961
  }
56963
56962
  }, async (params) => {
56964
56963
  const res = await client.placeTriggerOrder({
56965
56964
  marketSymbol: params.market_symbol,
56966
- collateralSymbol: params.collateral_symbol,
56967
56965
  side: params.side,
56968
56966
  triggerPriceUi: params.trigger_price,
56969
56967
  sizeAmountUi: params.size_amount,
@@ -56991,18 +56989,16 @@ Transaction (base64, unsigned — sign with wallet):`);
56991
56989
  description: "Edit an existing take-profit or stop-loss trigger order. Change the trigger price, size, or order type without canceling and re-placing. Requires the order_id (0-7) from get_orders. Returns an unsigned transaction.",
56992
56990
  inputSchema: {
56993
56991
  market_symbol: exports_external.string().max(16).describe('Market symbol, e.g. "SOL", "BTC", "ETH"'),
56994
- collateral_symbol: exports_external.string().max(16).describe('Collateral token, e.g. "USDC", "JITOSOL"'),
56995
56992
  side: exports_external.enum(["LONG", "SHORT"]).describe("Position side"),
56996
- order_id: exports_external.number().describe("Index of the trigger order to edit (0-7)"),
56993
+ order_id: exports_external.coerce.number().describe("Index of the trigger order to edit (0-7)"),
56997
56994
  trigger_price: exports_external.string().max(32).describe("New trigger price in UI format"),
56998
56995
  size_amount: exports_external.string().max(32).describe("New size in target token"),
56999
- is_stop_loss: exports_external.boolean().describe("true = stop-loss, false = take-profit"),
56996
+ is_stop_loss: exports_external.coerce.boolean().describe("true = stop-loss, false = take-profit"),
57000
56997
  owner: exports_external.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).describe("Wallet pubkey (must be original order owner)")
57001
56998
  }
57002
56999
  }, async (params) => {
57003
57000
  const res = await client.editTriggerOrder({
57004
57001
  marketSymbol: params.market_symbol,
57005
- collateralSymbol: params.collateral_symbol,
57006
57002
  side: params.side,
57007
57003
  orderId: params.order_id,
57008
57004
  triggerPriceUi: params.trigger_price,
@@ -57031,16 +57027,14 @@ Transaction (base64, unsigned — sign with wallet):`);
57031
57027
  description: "Cancel a single take-profit or stop-loss trigger order. Requires the order_id (0-7) from get_orders. Returns an unsigned transaction.",
57032
57028
  inputSchema: {
57033
57029
  market_symbol: exports_external.string().max(16).describe('Market symbol, e.g. "SOL", "BTC", "ETH"'),
57034
- collateral_symbol: exports_external.string().max(16).describe('Collateral token, e.g. "USDC", "JITOSOL"'),
57035
57030
  side: exports_external.enum(["LONG", "SHORT"]).describe("Position side"),
57036
- order_id: exports_external.number().describe("Index of the trigger order to cancel (0-7)"),
57037
- is_stop_loss: exports_external.boolean().describe("true = stop-loss, false = take-profit"),
57031
+ order_id: exports_external.coerce.number().describe("Index of the trigger order to cancel (0-7)"),
57032
+ is_stop_loss: exports_external.coerce.boolean().describe("true = stop-loss, false = take-profit"),
57038
57033
  owner: exports_external.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).describe("Wallet pubkey (must own the order)")
57039
57034
  }
57040
57035
  }, async (params) => {
57041
57036
  const res = await client.cancelTriggerOrder({
57042
57037
  marketSymbol: params.market_symbol,
57043
- collateralSymbol: params.collateral_symbol,
57044
57038
  side: params.side,
57045
57039
  orderId: params.order_id,
57046
57040
  isStopLoss: params.is_stop_loss,
@@ -57065,14 +57059,12 @@ Transaction (base64, unsigned — sign with wallet):`);
57065
57059
  description: "Cancel ALL take-profit and stop-loss trigger orders for a market+side. Removes all TP and SL orders in one transaction. Returns an unsigned transaction.",
57066
57060
  inputSchema: {
57067
57061
  market_symbol: exports_external.string().max(16).describe('Market symbol, e.g. "SOL", "BTC", "ETH"'),
57068
- collateral_symbol: exports_external.string().max(16).describe('Collateral token, e.g. "USDC", "JITOSOL"'),
57069
57062
  side: exports_external.enum(["LONG", "SHORT"]).describe("Position side"),
57070
57063
  owner: exports_external.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).describe("Wallet pubkey (must own the orders)")
57071
57064
  }
57072
57065
  }, async (params) => {
57073
57066
  const res = await client.cancelAllTriggerOrders({
57074
57067
  marketSymbol: params.market_symbol,
57075
- collateralSymbol: params.collateral_symbol,
57076
57068
  side: params.side,
57077
57069
  owner: params.owner
57078
57070
  });
@@ -57186,7 +57178,7 @@ try {
57186
57178
  const client = new FlashApiClient(config2);
57187
57179
  const server = new McpServer({
57188
57180
  name: "flash-trade",
57189
- version: "0.3.2"
57181
+ version: "0.3.4"
57190
57182
  }, {
57191
57183
  capabilities: {
57192
57184
  tools: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flash-trade-mcp",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "MCP server for Flash Trade — perpetual futures DEX on Solana. Provides AI agents with typed tools for trading, position management, and market data.",
5
5
  "module": "src/index.ts",
6
6
  "main": "dist/index.js",