Account Data

Get Open Positions

Get information about open margin positions.

API Key Permissions Required: Orders and trades - Query open orders & trades

post/private/OpenPositions

Request

  • Base URL: https://api.kraken.com/0
  • URL: https://api.kraken.com/0/private/OpenPositions
  • Auth: API key in header API-Key and API key in header API-Sign

Query parameters

account_idstring

Public wallet account ID. Omit to use the authenticated user's default wallet. See List Wallet Accounts.

Request body

nonceinteger required

Nonce used in construction of API-Sign header

txidstring

Comma delimited list of txids to limit output to

docalcsboolean

Whether to include P&L calculations

consolidation'market'

Consolidate positions by market/pair

rebase_multiplier'rebased' | 'base' nullable

Optional parameter for viewing xStocks data.

  • rebased: Display in terms of underlying equity.
  • base: Display in terms of SPV tokens.

Response

Open positions info retrieved.

errorstring[]

Example response

{
  "error": [],
  "result": {
    "TF5GVO-T7ZZ2-6NBKBI": {
      "ordertxid": "OLWNFG-LLH4R-D6SFFP",
      "posstatus": "open",
      "pair": "XXBTZUSD",
      "time": 1605280097.8294,
      "type": "buy",
      "ordertype": "limit",
      "cost": "104610.52842",
      "fee": "289.06565",
      "vol": "8.82412861",
      "vol_closed": "0.20200000",
      "margin": "20922.10568",
      "value": "258797.5",
      "net": "+154186.9728",
      "terms": "0.0100% per 4 hours",
      "rollovertm": "1616672637",
      "misc": "",
      "oflags": ""
    },
    "T24DOR-TAFLM-ID3NYP": {
      "ordertxid": "OIVYGZ-M5EHU-ZRUQXX",
      "posstatus": "open",
      "pair": "XXBTZUSD",
      "time": 1607943827.3172,
      "type": "buy",
      "ordertype": "limit",
      "cost": "145756.76856",
      "fee": "335.24057",
      "vol": "8.00000000",
      "vol_closed": "0.00000000",
      "margin": "29151.35371",
      "value": "240124.0",
      "net": "+94367.2314",
      "terms": "0.0100% per 4 hours",
      "rollovertm": "1616672637",
      "misc": "",
      "oflags": ""
    },
    "TYMRFG-URRG5-2ZTQSD": {
      "ordertxid": "OF5WFH-V57DP-QANDAC",
      "posstatus": "open",
      "pair": "XXBTZUSD",
      "time": 1610448039.8374,
      "type": "buy",
      "ordertype": "limit",
      "cost": "0.00240",
      "fee": "0.00000",
      "vol": "0.00000010",
      "vol_closed": "0.00000000",
      "margin": "0.00048",
      "value": "0",
      "net": "+0.0006",
      "terms": "0.0100% per 4 hours",
      "rollovertm": "1616672637",
      "misc": "",
      "oflags": ""
    },
    "TAFGBN-TZNFC-7CCYIM": {
      "ordertxid": "OF5WFH-V57DP-QANDAC",
      "posstatus": "open",
      "pair": "XXBTZUSD",
      "time": 1610448039.8448,
      "type": "buy",
      "ordertype": "limit",
      "cost": "2.40000",
      "fee": "0.00264",
      "vol": "0.00010000",
      "vol_closed": "0.00000000",
      "margin": "0.48000",
      "value": "3.0",
      "net": "+0.6015",
      "terms": "0.0100% per 4 hours",
      "rollovertm": "1616672637",
      "misc": "",
      "oflags": ""
    },
    "T4O5L3-4VGS4-IRU2UL": {
      "ordertxid": "OF5WFH-V57DP-QANDAC",
      "posstatus": "open",
      "pair": "XXBTZUSD",
      "time": 1610448040.7722,
      "type": "buy",
      "ordertype": "limit",
      "cost": "21.59760",
      "fee": "0.02376",
      "vol": "0.00089990",
      "vol_closed": "0.00000000",
      "margin": "4.31952",
      "value": "27.0",
      "net": "+5.4133",
      "terms": "0.0100% per 4 hours",
      "rollovertm": "1616672637",
      "misc": "",
      "oflags": ""
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.