Skip to main content
These tools describe the MCP preview. Availability depends on the endpoint, grant, and assistant host. See setup and availability.

Account reads

Read responses use the Trading API’s canonical decimal strings and display fields. Preserve market precision rather than rounding all instruments the same way. Follow pagination when has_more is true.

Prepare an order

prepare_order validates a perpetual GTC limit-order proposal with an explicit market, side, base-asset size, and limit price. It returns a review link, not an execution receipt. It does not reserve margin or guarantee that the order will be accepted later.
  1. Open the link to populate Legend’s Advanced trade form.
  2. Confirm that the market, direction, base size, and limit price match your intent.
  3. Review the current account, leverage, margin, and market conditions before submitting in Legend.
Proposal links expire after 15 minutes. They contain no account credential. Opening a proposal while the app is in a non-mainnet mode is blocked; it does not silently switch networks or execute. This proposal flow currently supports perpetual GTC limit orders only.

Execution tools

The trading endpoint additionally exposes the following tools to grants with trading permission: Each execution call requires an idempotency_key. Reuse the same key for a retry of the same action; use a new key for a new intended action. When an outcome is unknown, query the operation and reconcile it before attempting a replacement. See execution and retry rules. Execution uses the shared Trading API validations and mainnet account permissions. An accepted request is not necessarily a completed fill. Read the returned status and reconcile the resulting order or operation.