Active Positions

GET /active_positions

Retrieve your active positions. Requires a valid API key sent with the x-api-key header.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • code integer

      Response code

    • msg string

      Diagnostic message

    • result object

      Request result

      Hide result attribute Show result attribute object
      • Market of position

        Hide USD_BTCCALL_PERP attributes Show USD_BTCCALL_PERP attributes object
  • 503 application/json

    Error

    Hide response attributes Show response attributes object
GET /active_positions
curl \
 -X GET https://api.testnet.everstrike.io/active_positions \
 -H "x-api-key: $API_KEY"
Response examples (200)
{
  "code": 200,
  "msg": "null",
  "result": {
    "USD_BTCCALL_PERP": {
      "fees": 0,
      "free": 1,
      "size": 1,
      "fills": [],
      "stats": {
        "lp": 3.7,
        "pnl": 0,
        "roe": 0,
        "mark": 2.1,
        "rpnl": 0,
        "size": 1,
        "upnl": 0,
        "equity": 1,
        "margin": 1,
        "bankrupt": 3.78,
        "leverage": 2.82,
        "notional": 0.14,
        "avg_entry": 3.4,
        "direction": "BUY"
      },
      "locked": 0,
      "funding": 0,
      "realized": 0
    }
  }
}
Response examples (503)
{
  "code": 503,
  "msg": "Invalid request",
  "result": {}
}