PerpsHub TP/SL Implementation
Overview
Endpoints
1. Create Stop Loss / Take Profit
{
userAddress: string // Ethereum address of the user (0x...)
accountAddress: string // Ethereum address of the account/partyA (0x...)
positionSide: 0 | 1 // 0 = LONG, 1 = SHORT
symbolId: number // Numeric symbol identifier
requestedPrice: string // Requested open price (decimal string)
quoteId: number // Quote ID (positive for filled trades, negative for pending instant opens)
tpPrice: string // Take profit trigger price (decimal string, can be empty)
slPrice: string // Stop loss trigger price (decimal string, can be empty)
timestamp: number // Request timestamp in milliseconds
}2. List Stop Losses / Take Profits
3. Cancel Stop Loss / Take Profit
Stop Loss States
Status
Description
Authentication
Common Error Codes
HTTP Status
Error Message
Description
Last updated
