GET
/
api
/
positions
Get User Alive Positions
curl --request GET \
  --url https://unidexv4-api-production.up.railway.app/api/positions
{
  "posIds": [
    "<string>"
  ],
  "positions": [
    {
      "posId": "<string>",
      "size": 123,
      "margin": 123,
      "isLong": true,
      "entryPrice": 123,
      "leverage": 123
    }
  ],
  "orders": [
    {}
  ],
  "triggers": [
    {}
  ],
  "paidFees": [
    {}
  ],
  "accruedFees": [
    {}
  ]
}

Overview

The Positions endpoint returns all active trading positions for a specific Ethereum address, including position details, orders, triggers, and associated fees.

Important Notes

  • Only returns currently active positions
  • Includes both long and short positions
  • Provides detailed fee information
  • Shows all associated orders and triggers

Parameters

address
string
required
Ethereum address of the user (0x format)

Response Fields

Position Object

posIds
array
Array of unique position identifiers
positions
array
Array of position objects containing:
  • posId: Position identifier
  • size: Position size
  • margin: Margin amount
  • isLong: Position direction
  • entryPrice: Entry price
  • leverage: Position leverage
orders
array
Array of associated orders
triggers
array
Array of stop-loss and take-profit triggers
paidFees
array
Array of already paid fees
accruedFees
array
Array of accumulated but unpaid fees

Example Usage

curl "https://unidexv4-api-production.up.railway.app/api/positions?address=0x1234..."

Query Parameters

address
string
required

Ethereum address of the user

Response

200 - application/json

Successful response

The response is of type object.