Skip to main content
POST
Close a position
Close part of an account position by creating a sell order intent. API keys need portfolio:write. Read portfolio positions first, then submit the exact tokenId and amount to close. The amount must be positive and cannot exceed the current position size.

Authorizations

Authorization
string
header
default:bp_YOUR_API_KEY
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
tokenId
string
required
amount
number
required

Response

Close-position intent was queued.

intentId
string<uuid>
status
string
amount
number