curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/sendorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/sendorder"
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/sendorder', 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/sendorder"
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))
}Send order
This endpoint allows sending a limit, stop, take profit or immediate-or-cancel order for a currently listed Futures contract.
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/sendorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/sendorder"
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/sendorder', 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/sendorder"
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))
}Authorizations
Query Parameters
The order type:
-
lmt- a limit order -
post- a post-only limit order -
mkt- an immediate-or-cancel order with 1% price protection -
stp- a stop order -
take_profit- a take profit order -
ioc- an immediate-or-cancel order -
trailing_stop- a trailing stop order -
fok- fill or kill order The order type: -
lmt- a limit order -
post- a post-only limit order -
mkt- an immediate-or-cancel order with 1% price protection -
stp- a stop order -
take_profit- a take profit order -
ioc- an immediate-or-cancel order -
trailing_stop- a trailing stop order -
fok- fill-or-kill order
lmt, post, ioc, mkt, stp, take_profit, trailing_stop, fok The limit price associated with the order. Note that for stop orders, limitPrice denotes the worst price at
which the stp or take_profit order can get filled at. If no limitPrice is
provided the stp or take_profit order will trigger a market order. If placing a trailing_stop order then leave undefined.
The stop price associated with a stop or take profit order.
Required if orderType is stp or take_profit, but if placing a trailing_stop then
leave undefined. Note that for stop orders, limitPrice denotes the worst price at
which the stp or take_profit order can get filled at. If no limitPrice is
provided the stp or take_profit order will trigger a market order.
Required if the order type is trailing_stop. Maximum value of 50%, minimum value of 0.1% for 'PERCENT' 'maxDeviationUnit'.
Is the maximum distance the trailing stop's trigger price may trail behind the requested trigger signal. It defines the threshold at which the trigger price updates.
0.1 <= x <= 50Required if the order type is trailing_stop.
This defines how the trailing trigger price is calculated from the requested trigger signal. For example, if the max deviation is set to 10, the unit is 'PERCENT', and the underlying order is a sell, then the trigger price will never be more then 10% below the trigger signal. Similarly, if the deviation is 100, the unit is 'QUOTE_CURRENCY', the underlying order is a sell, and the contract is quoted in USD, then the trigger price will never be more than $100 below the trigger signal.
PERCENT, QUOTE_CURRENCY Can only be set for triggers, e.g. order types take_profit, stop and trailing_stop.
If set, limitPriceOffsetUnit must be set as well.
This defines a relative limit price depending on the trigger stopPrice. The price is determined
when the trigger is activated by the triggerSignal. The offset can be positive or negative, there
might be restrictions on the value depending on the limitPriceOffsetUnit.
Response
- Success Response
- Errors
Was this page helpful?