v13

latestOpenAPI 3.1.0raw.githubusercontent.com2026-04-0815390371.2 KB
Trading

Place Trade

Place a buy or sell order using a specific account and connector.

Args: trade_request: Trading request with account, connector, trading pair, type, amount, etc. accounts_service: Injected accounts service

Returns: TradeResponse with order ID and trading details

Raises: HTTPException: 400 for invalid parameters, 404 for account/connector not found, 500 for trade execution errors

post/trading/orders

Request body

account_namestring required

Name of the account to trade with

connector_namestring required

Name of the connector/exchange

trading_pairstring required

Trading pair (e.g., BTC-USDT)

trade_type'BUY' | 'SELL' required

Whether to buy or sell

order_type'LIMIT' | 'MARKET' | 'LIMIT_MAKER'

Type of order

position_action'OPEN' | 'CLOSE'

Position action for perpetual contracts (OPEN/CLOSE)

Response

Successful Response

order_idstring required

Client order ID assigned by the connector

account_namestring required

Account used for the trade

connector_namestring required

Connector used for the trade

trading_pairstring required

Trading pair

trade_typestring required

Trade type

amountstring required

Trade amount

order_typestring required

Order type

pricestring nullable required

Order price

statusstring

Order status