Set PNL currency preference
curl --request PUT \
--url https://futures.kraken.com/derivatives/api/v3/pnlpreferences \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/pnlpreferences"
headers = {
"APIKey": "<api-key>",
"Authent": "<api-key>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {APIKey: '<api-key>', Authent: '<api-key>'}};
fetch('https://futures.kraken.com/derivatives/api/v3/pnlpreferences', 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/pnlpreferences"
req, _ := http.NewRequest("PUT", 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",
"serverTime": "2022-06-28T14:48:58.711Z"
}Multi-Collateral
Set PNL currency preference
The PNL currency preference is used to determine which currency to pay out when realizing PNL gains. Calling this API can result in the following error codes:
87: Contract does not exist
88: Contract not a multi-collateral futures contract
89: Currency does not exist
90: Currency is not enabled for multi-collateral futures
41: Would cause liquidation
PUT
/
pnlpreferences
Set PNL currency preference
curl --request PUT \
--url https://futures.kraken.com/derivatives/api/v3/pnlpreferences \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/pnlpreferences"
headers = {
"APIKey": "<api-key>",
"Authent": "<api-key>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {APIKey: '<api-key>', Authent: '<api-key>'}};
fetch('https://futures.kraken.com/derivatives/api/v3/pnlpreferences', 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/pnlpreferences"
req, _ := http.NewRequest("PUT", 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",
"serverTime": "2022-06-28T14:48:58.711Z"
}Authorizations
General API key with full access
Authentication string
Query Parameters
The symbol for the PnL preference.
The asset in which profit will be realised for the specific symbol.
Was this page helpful?