Skip to content
Docs
Open Legend

About

AboutGetting startedWhat is Legend?Why are we building this?Who is this for?

Platform

Web appiOSAndroidTelegram

Trading

TradingOrder typesDeposits and withdrawalsRanks

Capital

Legend CapitalCapital Affiliate Rewards

Autocopy

Copy tradingAutocopyLimits and safeguards

Social

SocialActivityFeedClansChat

Rewards

Referrals and rewards

API reference

Trading APIAuthentication and API keysAPI key actionsOrdersAccount, positions, and fillsLeverage, margin, and TWAPsRate limitsErrors and idempotency

Legend Research

Connect Legend to an AI assistantConnector permissionsMCP tools and order review

Fees

Fees

Support

FAQ
Trade onLEGEND

Trade where legends are made.

Download on theApp StoreGet it onGoogle Play
Product
TradeMobile app
Resources
BlogLearnFAQDocsCareers
© 2026 Legend. All rights reserved.
Privacy policyTerms of service
Ctrl K

Legend documentation

MCP tools and order review

Preview tools for account reads, order preparation, and authorized mainnet execution.

View Markdown ↗
Connector permissionsPreviousFeesNext

These tools describe the Legend MCP connector. Availability depends on the endpoint, grant, and assistant host. See setup and availability.

Account reads

ToolPurpose
get_accountAccount identity, unified balances, withdrawable funds, and available-to-trade estimate
list_positionsOpen positions and their liquidation prices and unrealized PnL
list_ordersPaginated orders; use status=open for open orders
get_orderRetrieve a single order by a supported reference
list_fillsPaginated executed fills and fees
get_operationReconcile the outcome of a previous execution operation

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:

ToolPurpose
place_orderSubmit a supported order
modify_orderModify an existing order
cancel_orderCancel an order
set_leverageChange a market's leverage settings
adjust_isolated_marginAdjust isolated position margin
place_twapSubmit a supported TWAP
cancel_twapCancel a TWAP

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.