Positions

List processed open positions

get

Returns processed open positions for the authenticated user

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Processed open positions fetched successfully

application/json
positionIdstringRequired

Position identifier

addressstringRequired

User wallet address

pearExecutionFlagstring Β· enumRequired

Pear execution flag

Possible values:
entryRationumberRequired

Weighted entry ratio

Example: 1.02
markRationumberRequired

Weighted mark ratio

Example: 1.01
entryPriceRationumberOptional

Entry price ratio (only for 1 long x 1 short)

markPriceRationumberOptional

Mark price ratio (only for 1 long x 1 short)

entryPositionValuenumberRequired

Total entry USD value

Example: 10000
positionValuenumberRequired

Total current USD value

Example: 10200
marginUsednumberRequired

Total margin used

Example: 2000
unrealizedPnlnumberRequired

Total unrealized PnL (USD)

Example: 200
unrealizedPnlPercentagenumberRequired

Unrealized PnL percentage relative to margin used

Example: 0.1
createdAtstring Β· date-timeRequired

Creation timestamp

updatedAtstring Β· date-timeRequired

Last update timestamp

get
/positions
200

Processed open positions fetched successfully

Create a new pair trading position with order

post

Create a pair trading position with various execution types: MARKET (immediate execution), TRIGGER (conditional execution), TWAP (time-weighted average), or LADDER (multiple ratio levels)

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
slippagenumber Β· min: 0.001 Β· max: 0.1Required

Slippage tolerance percentage (0.01 = 1%)

Example: 0.01
executionTypestring Β· enumRequired

Order execution type

Possible values:
leveragenumber Β· min: 1 Β· max: 100Required

Applied leverage

Example: 10
usdValuenumber Β· min: 1Required

Position size in USD

Example: 1000
triggerValuestringOptional

Required trigger threshold for TRIGGER orders (price, dominance, ratios, etc.)

Example: 45000
triggerTypestring Β· enumOptional

Trigger type for TRIGGER orders (PRICE, PRICE_RATIO, WEIGHTED_RATIO, BTC_DOM, CROSS_ASSET_PRICE, PREDICTION_MARKET_OUTCOME)

Example: PRICEPossible values:
directionstring Β· enumOptional

Direction for TRIGGER orders

Possible values:
assetNamestringOptional

Asset to monitor when triggerType is CROSS_ASSET_PRICE

Example: ETH
marketCodestringOptional

Market code to monitor when triggerType is PREDICTION_MARKET_OUTCOME

Example: KALSHI:EVENT_CODE
marketSourcestring Β· enumOptional

Market source for prediction market orders

Example: KALSHIPossible values:
twapDurationnumberOptional

TWAP duration in minutes (required for TWAP orders)

Example: 120
twapIntervalSecondsnumber Β· min: 1 Β· max: 3600Optional

TWAP interval in seconds (time between chunks). Defaults to 30 seconds if not provided.

Example: 30
randomizeExecutionbooleanOptional

Randomize TWAP execution timing

Default: false
referralCodestringOptional

Referral code to be attached to user address if user has no referral code

Example: 0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'
Responses
post
/positions
201

Position order created successfully

Close an entire position

post

Close a position using MARKET (immediate execution), TWAP (time-weighted average), or TRIGGER (conditional trigger-close order) execution type

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
positionIdstring Β· uuidRequired

Position identifier

Body
executionTypestring Β· enumRequired

Type of close order

Possible values:
twapDurationnumberOptional

TWAP duration in minutes - required if executionType is TWAP

Example: 60
twapIntervalSecondsnumberOptional

TWAP interval in seconds (time between close chunks). Defaults to 30 seconds if not provided.

Example: 30
randomizeExecutionbooleanOptional

Randomize TWAP execution times - optional for TWAP orders

Example: true
triggerValuestringOptional

Trigger threshold for TRIGGER close orders

Example: 1.08
triggerTypestring Β· enumOptional

Trigger type for TRIGGER close orders

Possible values:
directionstring Β· enumOptional

Direction for TRIGGER close orders

Possible values:
referralCodestringOptional

Referral code to be attached to user address if user has no referral code

Example: 0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'
Responses
200

Position close order created

application/json
orderIdstring Β· uuidRequired

Unique identifier for the close order

Example: 550e8400-e29b-41d4-a716-446655440003
executionTimestringOptional

Execution time for the order

Example: 2023-12-01T10:00:00.000Z
orderIdsstring[]Optional

Created trigger order identifiers for TRIGGER close requests

chunksSchedulednumberOptional

Number of TWAP chunks scheduled (only for TWAP orders)

Example: 10
post
/positions/{positionId}/close
200

Position close order created

Close all open positions

post

Fetches all open positions and closes them sequentially using MARKET or TWAP execution

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
executionTypestring Β· enumRequired

Type of close order

Possible values:
twapDurationnumberOptional

TWAP duration in minutes - required if executionType is TWAP

Example: 60
twapIntervalSecondsnumberOptional

TWAP interval in seconds (time between close chunks). Defaults to 30 seconds if not provided.

Example: 30
randomizeExecutionbooleanOptional

Randomize TWAP execution times - optional for TWAP orders

Example: true
triggerValuestringOptional

Trigger threshold for TRIGGER close orders

Example: 1.08
triggerTypestring Β· enumOptional

Trigger type for TRIGGER close orders

Possible values:
directionstring Β· enumOptional

Direction for TRIGGER close orders

Possible values:
referralCodestringOptional

Referral code to be attached to user address if user has no referral code

Example: 0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'
Responses
200

Close orders created for all positions

application/json
post
/positions/close-all
200

Close orders created for all positions

Adjust position size by reducing or increasing by a specified amount

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
positionIdstring Β· uuidRequired

Position identifier

Body
adjustmentTypestring Β· enumRequired

Type of position adjustment (reduce or increase)

Default: REDUCEPossible values:
adjustmentSizenumber Β· min: 1 Β· max: 100Required

Percentage of position to adjust (1-100%)

Example: 25
executionTypestring Β· enumRequired

Type of execution for the adjustment

Default: MARKETPossible values:
limitRationumberOptional

Required if executionType is LIMIT

Example: 50000
referralCodestringOptional

Referral code to be attached to user address if user has no referral code

Example: 0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'
Responses
200

Position adjustment order created successfully

application/json
orderIdstring Β· uuidRequired

Unique identifier for the adjustment order

Example: 550e8400-e29b-41d4-a716-446655440003
statusstringRequired

Status of the adjustment order

Example: SUCCESS
adjustmentTypestring Β· enumRequired

Type of adjustment that was made

Possible values:
adjustmentSizenumberRequired

Percentage used for position adjustment

Example: 25
newSizenumberRequired

New position size after adjustment

Example: 3.5
executedAtstring Β· date-timeRequired

Timestamp when the reduction was executed

Example: 2023-07-14T10:30:00Z
post
/positions/{positionId}/adjust
200

Position adjustment order created successfully

Adjust position to target absolute sizes per asset (advance)

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
positionIdstring Β· uuidRequired

Position identifier

Bodyobject[]
Responses
200

Advance adjustment executed

application/json
orderIdstringRequired

Order identifier

statusstringRequired

Order status

executedAtstringRequired

Execution timestamp

post
/positions/{positionId}/adjust-advance
200

Advance adjustment executed

Adjust leverage for a position

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
positionIdstring Β· uuidRequired

Position identifier

Body
leveragenumber Β· min: 1 Β· max: 100Required

Applied leverage

Example: 10
Responses
200

Leverage updated successfully

application/json
objectOptional
post
/positions/{positionId}/adjust-leverage
200

Leverage updated successfully

Preview rebalance plan without executing

post

Computes weight deltas and returns what would be traded, without placing any orders. Use this to preview before calling the execute endpoint.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
positionIdstring Β· uuidRequired

Position identifier

Body
Responses
200

Rebalance plan computed successfully

application/json
positionIdstringRequired

Position ID being rebalanced

canExecutebooleanRequired

Whether any asset has a non-skipped trade to execute

post
/positions/{positionId}/rebalance/plan
200

Rebalance plan computed successfully

Rebalance position assets to target weights

post

Computes weight deltas and adjusts asset sizes to match target weights. Uses existing targetWeight from position if no overrides provided.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
positionIdstring Β· uuidRequired

Position identifier

Body
Responses
200

Rebalance executed successfully

application/json
orderIdstringRequired

Rebalance order ID

statusstringRequired

Execution status

Example: EXECUTED
executedAtstringRequired

ISO 8601 timestamp of execution

post
/positions/{positionId}/rebalance
200

Rebalance executed successfully

Update stop loss and take profit values for a position

put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
positionIdstring Β· uuidRequired

Position identifier

Body
Responses
200

Risk parameters updated successfully

application/json
positionIdstring Β· uuidRequired

Position identifier

Example: 550e8400-e29b-41d4-a716-446655440000
updatedAtstring Β· date-timeRequired

Update timestamp

Example: 2023-07-14T10:35:00Z
put
/positions/{positionId}/riskParameters
200

Risk parameters updated successfully

Last updated