Skip to main content
POST
Close a position

Authorizations

Authorization
string
header
required

API key in the format cc_<64 hex characters>. Obtain from the Dashboard under Settings → API Keys.

Body

application/json
positionId
string
required

Convex document ID of the position.

marketSlug
string
required
Example:

"will-x-happen"

direction
string
required
Example:

"YES"

shares
number
required

Number of shares to sell.

Example:

15.5

outcome
string

Optional outcome override.

Example:

"YES"

Response

Position closed successfully.

success
boolean
Example:

true