trade_order
core_v2.GCapiClientV2.trade_order(
quantity,
offer_price,
bid_price,
direction,
market_id,
market_name,
stop_loss=None,
take_profit=None,
trigger_price=None,
close=False,
order_id=None,
tolerance=None,
)Place a trade order.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| quantity | float | Quantity to trade. | required |
| offer_price | float | Offer price for the trade. | required |
| bid_price | float | Bid price for the trade. | required |
| direction | str | Direction of the trade (“buy” or “sell”). | required |
| market_id | str | Market ID. | required |
| market_name | str | Market name. | required |
| stop_loss | float | Stop loss price (optional). | None |
| take_profit | float | Take profit price (optional). | None |
| trigger_price | float | Trigger price (optional). | None |
| close | bool | Whether to close the trade (optional). | False |
| order_id | str | Order ID (optional). | None |
| tolerance | float | Price tolerance (optional). | None |
Returns
| Name | Type | Description |
|---|---|---|
| dict | API response as a dictionary. |