Skip to main content
POST
/
position_service.v1.PositionService
/
GetOpenPositions
GetOpenPositions
curl --request POST \
  --url https://api.fairground.fi/position_service.v1.PositionService/GetOpenPositions \
  --header 'Authorization: Bearer <token>' \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "<string>"
}
'
{
  "positions": [
    {
      "owner": "<string>",
      "positionId": 123,
      "marketId": 123,
      "timestamp": "2023-11-07T05:31:56Z",
      "market": "<string>",
      "side": "SIDE_LONG",
      "marginType": "MARGIN_TYPE_ISOLATED",
      "nominalSize": 123,
      "entryPrice": 123,
      "markPrice": 123,
      "liquidationPrice": 123,
      "allocatedMargin": 123,
      "leverage": 123,
      "unrealizedPnl": 123,
      "reduceOnly": true,
      "associatedOrders": [
        {
          "owner": "<string>",
          "orderId": 123,
          "timestamp": "2023-11-07T05:31:56Z",
          "marketId": 123,
          "market": "<string>",
          "type": "ORDER_TYPE_MARKET",
          "side": "SIDE_LONG",
          "thresholdPrice": 123,
          "size": 123,
          "leverage": 123,
          "status": "ORDER_STATUS_PENDING",
          "filledSize": 123,
          "unfilledSize": 123,
          "reduceOnly": true,
          "canceled": true,
          "initialMargin": 123,
          "tickDecimals": 123,
          "fees": 123,
          "rebates": 123
        }
      ],
      "tickDecimals": 123,
      "revenueSpent": 123,
      "effectiveSize": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Connect-Protocol-Version
enum<number>
required

Define the version of the Connect protocol

Available options:
1
Connect-Timeout-Ms
number

Define the timeout, in ms

Body

application/json
address
string

Response

Success

positions
Position · object[]