Set leverage settings
curl --request PUT \
--url https://futures.kraken.com/derivatives/api/v3/leveragepreferences \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/leveragepreferences"
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/leveragepreferences', 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/leveragepreferences"
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 leverage settings
Sets a contract’s max leverage, either isolating the position at it or capping the leverage of a cross-margined position, or restores plain cross margin.
When specifying a max leverage without a margin mode, the contract’s margin mode will be isolated.
Calling this endpoint can result in the following error codes:
- 87: Contract does not exist
- 88: Contract not a multi-collateral futures contract
- 41: Would cause liquidation
- 393: Cross max leverage setting disabled
PUT
/
leveragepreferences
Set leverage settings
curl --request PUT \
--url https://futures.kraken.com/derivatives/api/v3/leveragepreferences \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/leveragepreferences"
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/leveragepreferences', 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/leveragepreferences"
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
Query Parameters
The margin mode the max leverage applies in. Defaults to "isolated".
"isolated" isolates the position at the max leverage. "cross" keeps the position in
cross margin and floors its initial margin at 1 / maxLeverage.
The margin mode a max leverage applies in: "isolated" isolates the position at it, "cross"
keeps the position in cross margin with its initial margin floored at 1 / maxLeverage.
Available options:
isolated, cross Was this page helpful?