kraken_api 1.0.0 copy "kraken_api: ^1.0.0" to clipboard
kraken_api: ^1.0.0 copied to clipboard

outdated

Dart Library for the kraken api (https://api.kraken.com/0).

Kraken API #

Dart Library for the kraken api (https://api.kraken.com/0).

Getting Started #

Add the package to your pubspec.yaml:

kraken_api: ^1.0.0

In your dart file, import the library:

import 'package:kraken_api/kraken_api.dart';

Usage #

First create an KrakenApi instance:

KrakenApi api = KrakenApi('apiKey', 'secretKey');

The constructor requires the API-Key and the Secret-Key which should be both generated on the kraken website.

For accessing the kraken API use the call method. It's required to pass the method which should be called as the first parameter. Request parameters can be added to the request by the parameters parameter:

Future<String> response = api.call(Methods.TRADE_BALANCE, parameters: {'asset': 'ZEUR'});

Hint: To see which parameters can be applied to which API calls take a look at the kraken api.

The call method returns the response body as an Future<String> which can be accessed through e.g.:

response.then(
    (body) {
        Map<String, dynamic> tradeBalances = jsonDecode(body)['result'];
        return tradeBalances;
    },
);

API #

Public methods:

Methods.TIME 
Methods.ASSETS
Methods.ASSET_PAIRS 
Methods.TICKER 
Methods.OHLC 
Methods.DEPTH 
Methods.TRADES
Methods.SPREAD 

Private methods:

Methods.BALANCE
Methods.TRADE_BALANCE
Methods.OPEN_ORDERS 
Methods.CLOSED_ORDERS 
Methods.QUERY_ORDERS
Methods.TRADES_HISTORY 
Methods.QUERY_TRADES 
Methods.OPEN_POSITIONS 
Methods.LEDGERS 
Methods.QUERY_LEDGERS
Methods.TRADE_VOLUME 
Methods.ADD_EXPORT
Methods.EXPORT_STATUS 
Methods.RETRIEVE_EXPORT 
Methods.REMOVE_EXPORT 
Methods.ADD_ORDER
Methods.CANCEL_ORDER 
8
likes
0
pub points
48%
popularity

Publisher

verified publisherbegnis.dev

Dart Library for the kraken api (https://api.kraken.com/0).

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, http

More

Packages that depend on kraken_api