The Base Clients

class kraken.base_api.KrakenBaseSpotAPI(key: str = '', secret: str = '', url: str = '', sandbox: bool = False, use_custom_exceptions: bool = True)

Bases: object

This class the the base for all Spot clients, handles un-/signed requests and returns exception handled results.

Parameters:
  • key (str, optional) – Spot API public key (default: "")

  • secret (str, optional) – Spot API secret key (default: "")

  • url (str, optional) – URL to access the Kraken API (default: https://api.kraken.com)

  • sandbox (bool, optional) – Use the sandbox (not supported for Spot trading so far, default: False)

property return_unique_id: str

Returns a unique uuid string

Returns:

uuid

Return type:

str

class kraken.base_api.KrakenBaseFuturesAPI(key: str = '', secret: str = '', url: str = '', sandbox: bool = False, use_custom_exceptions: bool = True)

Bases: object

The base class for all Futures clients handles un-/signed requests and returns exception handled results.

If the sandbox environment is chosen, the keys must be generated from here:

https://demo-futures.kraken.com/settings/api

Parameters:
  • key (str, optional) – Futures API public key (default: "")

  • secret (str, optional) – Futures API secret key (default: "")

  • url (str, optional) – The URL to access the Futures Kraken API (default: https://futures.kraken.com)

  • sandbox (bool, optional) – If set to True the URL will be https://demo-futures.kraken.com (default: False)