curl --request GET \
--url https://futures.kraken.com/api/history/v3/positions \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/api/history/v3/positions"
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/api/history/v3/positions', 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/api/history/v3/positions"
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))
}{
"accountUid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"len": 123,
"elements": [
{
"uid": "<string>",
"timestamp": 1604937694000,
"event": {
"PositionUpdate": {
"accountUid": "<string>",
"tradeable": "<string>",
"oldPosition": "<string>",
"newPosition": "<string>",
"newAverageEntryPrice": "<string>",
"positionChange": "open",
"timestamp": 1604937694000,
"updateReason": "trade",
"oldAverageEntryPrice": "<string>",
"fillTime": 123,
"fee": "<string>",
"feeCurrency": "<string>",
"realizedPnL": "<string>",
"executionUid": "<string>",
"executionPrice": "<string>",
"executionSize": "<string>",
"tradeType": "userExecution",
"fundingRealizationTime": 123,
"realizedFunding": "<string>",
"settlementPrice": "<string>"
}
}
}
],
"serverTime": "2023-11-07T05:31:56Z",
"continuationToken": "aSDinaTvuI8gbWludGxpZnk="
}Get position update events
Lists position events for authenticated account.
curl --request GET \
--url https://futures.kraken.com/api/history/v3/positions \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/api/history/v3/positions"
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/api/history/v3/positions', 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/api/history/v3/positions"
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))
}{
"accountUid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"len": 123,
"elements": [
{
"uid": "<string>",
"timestamp": 1604937694000,
"event": {
"PositionUpdate": {
"accountUid": "<string>",
"tradeable": "<string>",
"oldPosition": "<string>",
"newPosition": "<string>",
"newAverageEntryPrice": "<string>",
"positionChange": "open",
"timestamp": 1604937694000,
"updateReason": "trade",
"oldAverageEntryPrice": "<string>",
"fillTime": 123,
"fee": "<string>",
"feeCurrency": "<string>",
"realizedPnL": "<string>",
"executionUid": "<string>",
"executionPrice": "<string>",
"executionSize": "<string>",
"tradeType": "userExecution",
"fundingRealizationTime": 123,
"realizedFunding": "<string>",
"settlementPrice": "<string>"
}
}
}
],
"serverTime": "2023-11-07T05:31:56Z",
"continuationToken": "aSDinaTvuI8gbWludGxpZnk="
}Authorizations
General API key with at least read-only access
Authentication string
Query Parameters
Timestamp in milliseconds.
1604937694000
Timestamp in milliseconds.
1604937694000
Determines the order of events in response(s).
asc= chronologicaldesc= reverse-chronological
asc, desc Opaque token from the Next-Continuation-Token header used to continue listing events. The
sort parameter must be the same as in the previous request to continue listing in the same
direction.
The maximum number of results to return. Larger values are not rejected, they are silently
capped at 1000; when more events match, the Next-Continuation-Token header is returned to
continue the listing.
x >= 1True if results should include opened position events. Setting this to false has no effect.
If multiple position change filters (opened/closed/increased/decreased/reversed/no_change) are provided, then positions matching any of these will be included.
When combined with update reason filters (trades/funding_realization/settlement), positions must match at least one position change filter AND at least one update reason filter.
If no filters are provided for the request, all position events will be included.
True if results should include closed position events. Setting this to false has no effect.
If multiple position change filters (opened/closed/increased/decreased/reversed/no_change) are provided, then positions matching any of these will be included.
When combined with update reason filters (trades/funding_realization/settlement), positions must match at least one position change filter AND at least one update reason filter.
If no filters are provided for the request, all position events will be included.
True if results should include increased position events. Setting this to false has no effect.
If multiple position change filters (opened/closed/increased/decreased/reversed/no_change) are provided, then positions matching any of these will be included.
When combined with update reason filters (trades/funding_realization/settlement), positions must match at least one position change filter AND at least one update reason filter.
If no filters are provided for the request, all position events will be included.
True if results should include decreased position events. Setting this to false has no effect.
If multiple position change filters (opened/closed/increased/decreased/reversed/no_change) are provided, then positions matching any of these will be included.
When combined with update reason filters (trades/funding_realization/settlement), positions must match at least one position change filter AND at least one update reason filter.
If no filters are provided for the request, all position events will be included.
True if results should include reversed position events. Setting this to false has no effect.
If multiple position change filters (opened/closed/increased/decreased/reversed/no_change) are provided, then positions matching any of these will be included.
When combined with update reason filters (trades/funding_realization/settlement), positions must match at least one position change filter AND at least one update reason filter.
If no filters are provided for the request, all position events will be included.
True if results should include "no change" position events - where the position has not changed. Setting this to false has no effect.
If multiple position change filters (opened/closed/increased/decreased/reversed/no_change) are provided, then positions matching any of these will be included.
When combined with update reason filters (trades/funding_realization/settlement), positions must match at least one position change filter AND at least one update reason filter.
If no filters are provided for the request, all position events will be included.
True if results should include position events caused by a trade. Setting this to false has no effect.
If multiple update reason filters (trades/funding_realization/settlement) are provided, then positions matching any of these will be included.
When combined with position change filters (opened/closed/increased/decreased/reversed/no_change), positions must match at least one update reason filter AND at least one position change filter.
If no filters are provided for the request, all position events will be included.
True if results should include position events caused by a funding realisation. Setting this to false has no effect.
If multiple update reason filters (trades/funding_realization/settlement) are provided, then positions matching any of these will be included.
When combined with position change filters (opened/closed/increased/decreased/reversed/no_change), positions must match at least one update reason filter AND at least one position change filter.
If no filters are provided for the request, all position events will be included.
True if results should include position events caused by a settlement. Setting this to false has no effect.
If multiple update reason filters (trades/funding_realization/settlement) are provided, then positions matching any of these will be included.
When combined with position change filters (opened/closed/increased/decreased/reversed/no_change), positions must match at least one update reason filter AND at least one position change filter.
If no filters are provided for the request, all position events will be included.
If present events of other tradeables are filtered out.
Response
Show child attributes
Show child attributes
Opaque token to pass to the next request to continue listing events. The sort parameter
must be the same as in the previous request to continue listing in the same direction.
Was this page helpful?