Skip to main content
GET
/
openpositions
Get open positions
curl --request GET \
  --url https://futures.kraken.com/derivatives/api/v3/openpositions \
  --header 'APIKey: <api-key>' \
  --header 'Authent: <api-key>'
import requests

url = "https://futures.kraken.com/derivatives/api/v3/openpositions"

headers = {
    "APIKey": "<api-key>",
    "Authent": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {APIKey: '<api-key>', Authent: '<api-key>'}};

fetch('https://futures.kraken.com/derivatives/api/v3/openpositions', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://futures.kraken.com/derivatives/api/v3/openpositions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("APIKey", "<api-key>")
	req.Header.Add("Authent", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
{ "result": "success", "openPositions": [ { "side": "short", "symbol": "PI_XBTUSD", "price": 9392.749993345933, "size": 10000, "unrealizedPnl": -607250.006654067, "unrealizedFunding": 0.00001045432180096817 }, { "side": "long", "symbol": "FI_XBTUSD_201225", "price": 9399.749966754434, "size": 20000, "unrealizedPnl": 1199500.664911316, "unrealizedFunding": null }, { "side": "long", "symbol": "PF_DEFIUSD", "price": 570, "size": 1, "unrealizedPnl": 12.34, "unrealizedFunding": -0.0073428045972263895, "pnlCurrency": "BTC", "maxFixedLeverage": 5 } ], "serverTime": "2020-07-22T14:39:12.376Z" }

Authorizations

APIKey
string
header
required

General API key with at least read-only access

Authent
string
header
required

Authentication string

Response

200 - application/json
openPositions
object[]
required

A list containing structures with information on open positions.

The list is sorted descending by fillTime.

result
enum<string>
required
Available options:
success
Example:

"success"

serverTime
string<date-time>
required

Server time in Coordinated Universal Time (UTC)

Example:

"2020-08-27T17:03:33.196Z"