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

outdated

Flutter API Client to retrieve financial data using IEX Cloud data provider.

flutter_iexcloud_api #

Pub support Build Status

The IEX Cloud API client based on REST, has resource-oriented URLs, returns JSON-encoded responses, and returns standard HTTP response codes.

Note:

  • IEX Cloud authenticates your API requests using your account’s API tokens. To use any IEX Cloud API, you must pass an API token with each request. If you do not include your API token when making an API request, or use one that is incorrect or disabled, IEX Cloud returns an error.
  • Work in progress, Only REST Requests are supported.

For more details click here

Road map #

API Collection Status Milestone
Status 1.0.0
Symbols 1.0.0
Cryptocurrency 1.0.0
News 1.1.0
Stocks / Equities 🧑️‍💻 1.1.0
Corporate Actions 🧑️‍💻 1.2.0
Market Info 🧑️‍💻 1.2.0
Forex / Currencies 🧑️‍💻 1.3.0
Options 🧑️‍💻 1.3.0
Futures 🧑️‍💻 1.3.0
CEO Compensation 🧑️‍💻 1.3.0
Treasuries 🧑️‍💻 1.3.0
Commodities 🧑️‍💻 1.4.0
Economic Data 🧑️‍💻 1.4.0
Reference Data 🧑️‍💻 1.5.0
Investors Exchange Data 🧑️‍💻 1.6.0
Premium Data 🧑️‍💻 2.0.0

Get started #

API Reference: https://iexcloud.io/docs/api/#api-reference

Add dependency #

dependencies:
  flutter_iexcloud_api: ^1.0.0

Super simple to use #

import 'package:flutter_iexcloud_api/flutter_iexcloud_api.dart';

late final IEXClientApi service = IEXClientApi(
  token: "<Your Token>",
);

final response = await service.cryptocurrencyPrice("btcbusd");

Configuration #

property description default
token (required) API Token provided by iexcloud -
apiVersion (required) iexcloud API Version stable (see: ApiVersion)
connectTimeout It occurs when url is opened timeout. 5000
sendTimeout It occurs when url is sent timeout. 30000
receiveTimeout It occurs when receiving timeout. 30000

Interceptors #

For each client instance, We can add one or more interceptors, by which we can intercept requests, responses and errors before they are handled by then or catchError.

Simple interceptor example

import 'package:dio/dio.dart';
class CustomInterceptors extends Interceptor {
  @override
  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
    print('REQUEST[${options.method}] => PATH: ${options.path}');
    return super.onRequest(options, handler);
  }
  @override
  Future onResponse(Response response, ResponseInterceptorHandler handler) {
    print('RESPONSE[${response.statusCode}] => PATH: ${response.request?.path}');
    return super.onResponse(response, handler);
  }
  @override
  Future onError(DioError err, ErrorInterceptorHandler handler) {
    print('ERROR[${err.response?.statusCode}] => PATH: ${err.request.path}');
    return super.onError(err, handler);
  }
}

Registering the Interceptor

late final IEXClientApi service = IEXClientApi(
  token: "<Your Token>",
);
service.addInterceptor(CustomInterceptors());

Cleaning all interceptors

late final IEXClientApi service = IEXClientApi(
  token: "<Your Token>",
);
service.clearInterceptors();

For more details on how to use Interceptor, please check dio plugin page

This open source project implemented by Tiarê Balbi Bonamini , and the license is MIT. Data provided by IEX Cloud

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Development Notes #

dartdoc #

Use dartdoc to generate HTML documentaton for your Dart package.

Reference: https://github.com/dart-lang/dartdoc#dartdoc

pana #

A library for analyzing Dart packages. It invokes executables from the Dart SDK (or from the Flutter SDK if the package uses Flutter).

Reference: https://pub.dev/packages/pana

3
likes
0
pub points
0%
popularity

Publisher

verified publishertiarebalbi.com

Flutter API Client to retrieve financial data using IEX Cloud data provider.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter

More

Packages that depend on flutter_iexcloud_api