krok library

Classes

KrakenApi
Main class for interacting with the Kraken API.
KrakenConfig
KrakenPrice
Represents a Kraken API price. Depending on the context, different rules/restrictions apply.
KrakenRequest
Implements the available Kraken API requests via named constructors.
KrakenTime
Kraken API uses a timestamp (called "tm" or "time" in the API documentation) that is a double representing seconds since the Unix epoch. This class helps working with those timestamps. Especially when specifying relative dates/times like "1h" or "15m".

Enums

AssetPairsInfo
CloseTime
OhlcInterval
Represents the valid OHLC intervals.
OrderDirection
OrderFlag
OrderType
The available order types. The required arguments are defined by the Kraken API documentation.
Scope
SelfTradePrevention
TimeInForce

Extensions

StringToOhlcInterval on String?

Properties

defaultNonceGenerator int Function()
getter/setter pair

Functions

cached({required String key, required Duration maxAge, required Future<Result> retrieve()}) Future<Result>
Somewhat horrific cache handling around retrieving data from the Kraken API.
expand(String path) String

Typedefs

Asset = String
NonceGenerator = int Function()
Pair = String
Price = double
Result = Map<String, dynamic>
Volume = double

Exceptions / Errors

KrakenException