position.close

Close an existing prediction market position at market or limit price.


Overview

The position.close tool exits positions to realize profits or limit losses. Supports market orders (immediate execution) and limit orders (price-specific).


Parameters

Parameter
Type
Required
Description

position_id

string

Yes

Position identifier from position.open

order_type

string

No

"market" or "limit" (default: market)

limit_price

number

No

Limit price 0-1 (required if order_type=limit)

shares

number

No

Partial close (omit to close all shares)


Request Examples

Close Entire Position

result = agent.run("""
  Close my presidential election position at market price
""")

Partial Close

Limit Order Close


Response Format


Last updated