get https://sandbox.kyan.sh/positions/
Retrieve all margin accounts with their positions for a specific address. This endpoint returns complete margin account data including deposits, withdrawals, P&L tracking, and all open positions.
No signature required - Only API key authentication is needed.
Margin Account Information Returned
For each margin account, you'll receive:
id: Unique margin account identifierpair_id: Reference to the trading pairdeposits: Total deposits made to this accountwithdrawals: Total withdrawals from this accountrealised_pnl: Cumulative realized profit/lossaccrued_funding: Accumulated funding paymentsliquidation: Whether the account has been liquidatedsmart_account_address: Associated smart contract addresspositions: Array of open positions with:id: Position identifierinstrument: The specific option or perpetual contractinstrument_type: Type of instrument (option/perp)size: Position size (negative for short, positive for long)average_price: Volume-weighted average entry priceentry_fees: Total fees paid when opening the position
Key Features
- Complete Account Data: Full margin account information including financial metrics
- Consolidated View: See all accounts and positions across different trading pairs
- Real-time Data: Data reflects the latest trades, deposits, and settlements
- Comprehensive Tracking: Deposits, withdrawals, P&L, and fees all tracked separately
Example Use Cases
- Position Monitoring: Quick overview of all open trades
- Risk Assessment: Identify concentrated positions or exposures
- Trade Planning: Check existing positions before placing new orders
- Fee Analysis: Calculate total fees paid across all positions
Understanding Position Sizes
- Positive size: Long position (bought the instrument)
- Negative size: Short position (sold the instrument)
- Options: Size represents number of contracts
- Perpetuals: Size represents notional amount in base currency
