⚙️API

[GET] Get Positions by Address

https://graph.stellaxyz.io/api/rest/positions/:address
ParametersTypeExample

address

String (Case Insensitive)

0x81e1A8AD25FAE74a955166E9AdDf0a43f23db12e

Example Response

{
  "position": [
    {
      "id": 43,
      "strategy_id": 16,
      "position_id": 3,
      "borrowed_amounts": [362.714907, 11.380251],
      "claimable_amounts": null,
      "claimable_token": null,
      "position_value_usd": 424.0865485960339,
      "collateral_value_usd": 0,
      "opened_at": "2023-06-22T08:15:14",
      "pnl_percent": 0.0003791518386889244,
      "pnl_usd": 0.0189545136006679,
      "status": "Closed",
      "updated_at": "2023-06-22T08:18:01.316"
    },
    {
      "id": 19,
      "strategy_id": 13,
      "position_id": 3,
      "borrowed_amounts": [0, 81.52],
      "claimable_amounts": 15.251389,
      "claimable_token": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",
      "position_value_usd": 96.7810661389,
      "collateral_value_usd": 0,
      "opened_at": "2023-06-21T06:57:15",
      "pnl_percent": -0.3028816092753054,
      "pnl_usd": -6.6270338611,
      "status": "Liquidated",
      "updated_at": "2023-06-21T13:48:02.289"
    }
  ]
}

[GET] Get All Strategies

https://graph.stellaxyz.io/api/rest/strategies

Example Response

{
  "strategy": [
    {
      "id": 11,
      "name": "WBTC/ETH",
      "lp_address": "0x2f5e87c9312fa29aed5c179e456625d79015299c",
      "position_manager_address": "0xf4ccdc8e5675c0d142cea9462dfea5fc2f3441ef",
      "strategy_address": "0x1ca882b986469d9a153d14bce3e055b55c65e391",
      "strategy_info": {
        "borrow_factors": [11400, 11400],
        "collateral_factor": 9000
      },
      "underlying_tokens": [
        "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",
        "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"
      ]
    },
    {
      "id": 13,
      "name": "ARB/USDC.e",
      "lp_address": "0x81c48d31365e6b526f6bbadc5c9aafd822134863",
      "position_manager_address": "0xb273f0e68c4d1d35717220973d57d5e6a331cb7e",
      "strategy_address": "0xdfe5b67df8c6081566bafeb313ac1d91618a4d5b",
      "strategy_info": {
        "borrow_factors": [11400, 11400],
        "collateral_factor": 9000
      },
      "underlying_tokens": [
        "0x912ce59144191c1204e64559fe8253a0e49e6548",
        "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"
      ]
    }
  ]
}

Last updated