Skip to main content
POST
Cash out position

Authorizations

Authorization
string
header
required

Scoped API key from the Totalis app settings. Each key acts for one account, yours or a maker's, and holds only scopes that account can use. Each operation lists the scopes it requires.

Headers

Idempotency-Key
string<uuid>
required

Lowercase UUIDv7 naming this command, unique per caller and route. A retry with the same key and body returns the original result; the same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED.

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Path Parameters

position_id
string
required

Position ID: the contract's ticketId of the position, as lowercase bytes32 hex.

Pattern: ^0x[0-9a-f]{64}$

Body

application/json

The cash-out RFQ to open on the position in the path. The caller's embedded wallet must be its current owner.

intent_id
string<uuid>

Automatic-RFQ intent (UUIDv7) this RFQ belongs to. Send it with intent_generation, or omit both.

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
intent_generation
string

Generation of the intent, as a decimal string. A higher generation atomically cancels the intent's open earlier RFQ; send it with intent_id.

Maximum string length: 19
Pattern: ^([1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-6]|9223372036854775807)$

Response

The cash-out RFQ was created, or an exact retry returned it. Makers answer with cash-out quotes priced on the position as it stood at the RFQ's decision_block; you accept one like an entry quote, and the maker confirms it.

rfq_id
string<uuid>
required

ID of the new RFQ.