Currency Leg
currency_legThe cost of the currency you were never quoted in. Use for "what does it really cost me to trade $5M of SOL", "which venue is cheapest for a USD fund", "how much am I paying to hold USDT", "should I use a USDC venue instead".
THE POINT: every execution cost in this API, and in every competing tool, is denominated in the VENUE'S OWN quote currency. Most perp venues quote USDT. A fund's money is USD. So the quoted cost is for a trade the fund cannot place until it has bought USDT, and the price of that conversion appears in nobody's TCA. This walks the live USD/USDT and USD/USDC books at the caller's size, reports the cheapest round trip and the capacity ceiling, and re-ranks venues on cost INCLUDING the leg.
IT DOES NOT TELL YOU WHICH VENUE TO TRADE ON, and you must not present it as if it does.
That output existed, was measured across 20 coins x 5 sizes, flipped 0 of 95 times, and was
deleted — leg_does_not_change_venue in the response carries the numbers. What it tells you
is what the trade ACTUALLY costs: quote leg_as_pct_of_execution_cost, which is the leg
measured against the trade's own execution cost on the venue the desk would really use.
THE LEG IS A COST ON CAPITAL MOVED, NOT ON TURNOVER. turns is how many times the desk
turns the balance over before repatriating to USD. At turns=1 the full round trip is
charged; at turns=50 the leg is rounding error and the response will show that. Do not
quote the turns=1 figure as a per-trade cost for a desk that trades continuously.
coin = ticker e.g. 'sol'. notional_usd = order size in USD. side = 'buy' or 'sell'.
Requires an EnsoTrade Pro API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | ||
| side | No | buy | |
| turns | No | ||
| notional_usd | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||