Assignment Program
Add assignment preference
This endpoint adds an assignment program preference
POST
/
assignmentprogram
/
add
Add assignment preference
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/assignmentprogram/add \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/assignmentprogram/add"
headers = {
"APIKey": "<api-key>",
"Authent": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {APIKey: '<api-key>', Authent: '<api-key>'}};
fetch('https://futures.kraken.com/derivatives/api/v3/assignmentprogram/add', 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/assignmentprogram/add"
req, _ := http.NewRequest("POST", 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))
}{
"id": 123,
"participant": {
"contractType": "flex",
"contract": "PF_BTCUSD",
"maxPosition": 10,
"maxSize": 10,
"acceptLong": true,
"acceptShort": true,
"timeFrame": "weekdays",
"enabled": true
},
"result": "success",
"serverTime": "2020-08-27T17:03:33.196Z"
}Authorizations
General API key with at least read-only access
Authentication string
Query Parameters
Type of contract for the assignment program preference. Options can be found in the 'accounts' structure in the Get Wallets /accounts response
A specific contract for this assignment program preference. Required for "flex" contracts if base/quote currencies are not included.
The maximum size for an assignment
The maximum position
Accept to take long positions
Accept to take short positions
When is the program preference valid
enabled assignment
Response
200 - application/json
- Success Response
- Errors
Show child attributes
Show child attributes
Example:
{
"contractType": "flex",
"contract": "PF_BTCUSD",
"maxPosition": 10,
"maxSize": 10,
"acceptLong": true,
"acceptShort": true,
"timeFrame": "weekdays",
"enabled": true
}
Available options:
success Example:
"success"
Server time in Coordinated Universal Time (UTC)
Example:
"2020-08-27T17:03:33.196Z"
⌘I
Add assignment preference
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/assignmentprogram/add \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/assignmentprogram/add"
headers = {
"APIKey": "<api-key>",
"Authent": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {APIKey: '<api-key>', Authent: '<api-key>'}};
fetch('https://futures.kraken.com/derivatives/api/v3/assignmentprogram/add', 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/assignmentprogram/add"
req, _ := http.NewRequest("POST", 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))
}{
"id": 123,
"participant": {
"contractType": "flex",
"contract": "PF_BTCUSD",
"maxPosition": 10,
"maxSize": 10,
"acceptLong": true,
"acceptShort": true,
"timeFrame": "weekdays",
"enabled": true
},
"result": "success",
"serverTime": "2020-08-27T17:03:33.196Z"
}