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"
}Account
Get open positions
This endpoint returns the size and average entry price of all open positions in Futures contracts. This includes Futures contracts that have matured but have not yet been settled.
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
Response
- Success Response
- Errors
Was this page helpful?