ccxt_set_leverage
Call exchange.setLeverage(leverage, symbol, params), subject to the trading gate.
This record as markdown: /tools/io-github-lucyfox199818-collab-ccxt-mcp/ccxt-set-leverage.md
What ccxt_set_leverage does on Codex CCXT MCP
AI agents use ccxt_set_leverage to create or update resources in Codex CCXT MCP, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Codex CCXT MCP environment.
Why ccxt_set_leverage is rated Medium
Setting leverage is a Write operation—it modifies account state reversibly by adjusting the leverage multiplier for a trading symbol. It is not Destructive (reversible), not Financial (does not move money directly), and not Execute (does not run arbitrary code or trigger external operations beyond the leverage configuration itself).
From the tool's definition Tool calls exchange.setLeverage(leverage, symbol, params) which modifies leverage settings on a derivatives/margin account.
Attacks that exploit this kind of access
The rule that runs ccxt_set_leverage safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Codex CCXT MCP, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For ccxt_set_leverage, this is the rule to start with:
ccxt_set_leverage stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Codex CCXT MCP, apply this rule, and every ccxt_set_leverage call is checked against it from then on.
Questions about ccxt_set_leverage
Call exchange.setLeverage(leverage, symbol, params), subject to the trading gate. It is categorised as a Write tool in the Codex CCXT MCP MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
Register the Codex CCXT MCP server in PolicyLayer and add a rule for ccxt_set_leverage: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Codex CCXT MCP. Nothing to install.
ccxt_set_leverage is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the ccxt_set_leverage rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for ccxt_set_leverage. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
ccxt_set_leverage is provided by the Codex CCXT MCP server (oci:ghcr.io/lucyfox199818-collab/ccxt-mcp:0.1.0). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Codex CCXT, and thousands of servers like it.
This server
Across the catalogue