Skip to main content
POST
Execute Smart Order
Executes a trade by automatically routing it to the exchange with the best price, or to a preferred exchange if specified.

Features

  • Unified order primitive: Access market and limit orders through one endpoint
  • Routing flexibility: Auto-route or pin to a preferred exchange per request
  • Advanced controls: Configure reduce-only behaviour and custom quantities
  • Rich telemetry: Responses include routing decisions, pricing, and execution latency

Use Cases

  • Power algorithmic trading systems needing granular order flags
  • Build discretionary trading interfaces that display execution venue rationale
  • Prototype new strategies without managing venue-specific adapters

Request

  • Method: POST
  • Endpoint: /api/trade/execute
  • Headers:
    • Content-Type: application/json
    • Authorization: Bearer <token>
This endpoint requires authentication. You must provide a valid JWT token in the Authorization header.

Request Fields

Example Request

Success Response

Response Fields

Error Responses

400 Bad Request - Missing Required Fields

401 Unauthorized - Invalid Token

500 Internal Server Error

When to Use

  • Implement custom order flows while still benefiting from smart routing
  • Execute trades with automatic best-price venue selection
  • Run discretionary trades while preserving reduce-only protections
Use preferredExchange to force execution on a specific venue when you need deterministic routing, otherwise let the system automatically select the best price.
Avantis: When Avantis is selected as the execution venue, trades are executed client-side on the Base network via wallet signing, not through the Tide backend. The routing recommendation may include Avantis pricing for comparison.

Authorizations

Authorization
string
header
required

JWT token for authentication. Required for smart order execution.

Body

application/json
symbol
string
required

Trading pair symbol (e.g., 'BTC', 'ETH')

Example:

"BTC"

side
enum<string>
required

Order side

Available options:
BUY,
SELL
type
enum<string>
required

Order type

Available options:
MARKET,
LIMIT
quantity
string
required

Amount of base asset to trade

Example:

"0.1"

price
string

Limit price. Required if type is LIMIT

reduceOnly
boolean
default:false

If true, the order will only reduce an existing position

preferredExchange
enum<string>

Force execution on a specific exchange

Available options:
hyperliquid,
aster,
lighter

Response

Order executed successfully

success
boolean
data
object
timestamp
integer