Positions

Create, update, or close perpetual trading positions and limit orders

Open a new perpetual position

post

Creates a leveraged perpetual trading position.

Body
Responses
200

Successfully created position transaction

application/json
post
POST /api/perpetuals/openPosition HTTP/1.1
Host: app.strikefinance.org
Content-Type: application/json
Accept: */*
Content-Length: 191

{
  "request": {
    "address": "text",
    "asset": {
      "policyId": "text",
      "assetName": "text"
    },
    "collateralAmount": 1,
    "leverage": 1,
    "position": "Long",
    "stopLossPrice": 1,
    "takeProfitPrice": 1,
    "partnerAddress": "text"
  }
}
{
  "cbor": "text"
}

Open a new perpetual limit order

post

Creates a leveraged perpetual position but only executes when the limit price is met.

Body
requestall ofRequired
Responses
200

Successfully created limit order transaction

application/json
post
POST /api/perpetuals/openLimitOrder HTTP/1.1
Host: app.strikefinance.org
Content-Type: application/json
Accept: */*
Content-Length: 209

{
  "request": {
    "address": "text",
    "asset": {
      "policyId": "text",
      "assetName": "text"
    },
    "collateralAmount": 1,
    "leverage": 1,
    "position": "Long",
    "stopLossPrice": 1,
    "takeProfitPrice": 1,
    "partnerAddress": "text",
    "limitUSDPrice": 1
  }
}
{
  "cbor": "text"
}

Close an existing perpetual position

post

Closes a perpetual trading position and calculates PnL.

Body
Responses
200

Successfully closed position transaction

application/json
post
POST /api/perpetuals/closePosition HTTP/1.1
Host: app.strikefinance.org
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "request": {
    "address": "text",
    "asset": {
      "policyId": "text",
      "assetName": "text"
    },
    "outRef": {
      "txHash": "text",
      "outputIndex": 1
    }
  }
}
{
  "cbor": "text"
}

Cancel Limit Order

post

Cancels an existing limit order for perpetual trading.

Body
Responses
200

Successfully cancelled limit order

application/json
post
POST /api/perpetuals/cancelLimitOrder HTTP/1.1
Host: app.strikefinance.org
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "request": {
    "address": "text",
    "asset": {
      "policyId": "text",
      "assetName": "text"
    },
    "outRef": {
      "txHash": "text",
      "outputIndex": 1
    }
  }
}
{
  "cbor": "text"
}

Update Position

post

Updates stop loss and take profit prices for an existing perpetual position.

Body
Responses
200

Successfully updated position

application/json
post
POST /api/perpetuals/updatePosition HTTP/1.1
Host: app.strikefinance.org
Content-Type: application/json
Accept: */*
Content-Length: 172

{
  "request": {
    "address": "text",
    "asset": {
      "policyId": "text",
      "assetName": "text"
    },
    "outRef": {
      "txHash": "text",
      "outputIndex": 1
    },
    "stopLossPrice": 1,
    "takeProfitPrice": 1,
    "side": "Long"
  }
}
{
  "cbor": "text"
}