Positions

Retrieves the entire exchange module's positions

get
Responses
application/json
objectOptional

QueryPositionsResponse is the response type for the Query/Positions RPC method.

get
GET /injective/exchange/v1beta1/positions HTTP/1.1
Host: inj.nownodes.io
Accept: */*
{
  "state": [
    {
      "subaccount_id": "text",
      "market_id": "text",
      "position": {
        "isLong": true,
        "quantity": "text",
        "entry_price": "text",
        "margin": "text",
        "cumulative_funding_entry": "text"
      }
    }
  ]
}

Retrieves subaccount's positions

get
Path parameters
subaccount_idanyRequired
Responses
application/json
objectOptional

QuerySubaccountPositionsResponse is the response type for the Query/SubaccountPositions RPC method.

get
GET /injective/exchange/v1beta1/positions/{subaccount_id} HTTP/1.1
Host: inj.nownodes.io
Accept: */*
{
  "state": [
    {
      "subaccount_id": "text",
      "market_id": "text",
      "position": {
        "isLong": true,
        "quantity": "text",
        "entry_price": "text",
        "margin": "text",
        "cumulative_funding_entry": "text"
      }
    }
  ]
}

Retrieves subaccount's position in market

get
Path parameters
subaccount_idanyRequired
market_idanyRequired
Responses
application/json
objectOptional

QuerySubaccountPositionInMarketResponse is the response type for the Query/SubaccountPositionInMarket RPC method.

get
GET /injective/exchange/v1beta1/positions/{subaccount_id}/{market_id} HTTP/1.1
Host: inj.nownodes.io
Accept: */*
{
  "state": {
    "isLong": true,
    "quantity": "text",
    "entry_price": "text",
    "margin": "text",
    "cumulative_funding_entry": "text"
  }
}