Skip to main content
GET
/
positions
Get position update events
curl --request GET \
  --url https://futures.kraken.com/api/history/v3/positions \
  --header 'APIKey: <api-key>' \
  --header 'Authent: <api-key>'
{
  "accountUid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "len": 123,
  "elements": [
    {
      "accountUid": "<string>",
      "tradeable": "<string>",
      "oldPosition": "<string>",
      "newPosition": "<string>",
      "newAverageEntryPrice": "<string>",
      "timestamp": "<unknown>",
      "oldAverageEntryPrice": "<string>",
      "fillTime": 123,
      "fee": "<string>",
      "feeCurrency": "<string>",
      "realizedPnL": "<string>",
      "executionUid": "<string>",
      "executionPrice": "<string>",
      "executionSize": "<string>",
      "fundingRealizationTime": 123,
      "realizedFunding": "<string>",
      "settlementPrice": "<string>"
    }
  ],
  "serverTime": "2023-11-07T05:31:56Z",
  "continuationToken": "aSDinaTvuI8gbWludGxpZnk="
}

Authorizations

APIKey
string
header
required

General API key with at least read-only access

Authent
string
header
required

Authentication string

Query Parameters

since
integer<timestamp-milliseconds>

Timestamp in milliseconds.

Example:

1604937694000

before
integer<timestamp-milliseconds>

Timestamp in milliseconds.

Example:

1604937694000

sort
enum<string>
default:desc

Determines the order of events in response(s).

  • asc = chronological
  • desc = reverse-chronological
Available options:
asc,
desc
continuation_token
file

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.

count
integer<int64>

The maximum number of results to return. The upper bound is determined by a global limit.

Required range: x >= 1
opened
boolean

True 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.

closed
boolean

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.

increased
boolean

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.

decreased
boolean

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.

reversed
boolean

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.

no_change
boolean

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.

trades
boolean

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.

funding_realization
boolean

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.

settlement
boolean

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.

tradeable
string

If present events of other tradeables are filtered out.

Response

200 - application/json
accountUid
string<uuid>
required
len
integer<uint64>
required
elements
object[]
required
serverTime
string<date-time>
continuationToken
file

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.