alpaca_markets

Creator: coderz1093

Last updated:

0 purchases

alpaca_markets Image
alpaca_markets Images

Languages

Categories

Add to Cart

Description:

alpaca markets

Alpaca Markets plugin #
A wrapper for the Alpaca Markets trading APIs. Provides an easy dart-specific
way of working with the broker, trading, and market data requests.
For information on Alpaca Markets and their APIs, see the documentation on Alpaca Market's Overview.
Prerequisites #
The APIs require that you signup as either a trader or a broker, depending on the type of app you
are developing. Visit https://alpaca.markets/ to sign up.
Usage #
To use this plugin, add alpaca_markets as a dependency in your pubspec.yaml file.
Examples #
Here are small examples that show you how to use the API.
Create an instance
Use your generated live and/or paper keys to create an instance for querying.
AlpacaMarkets am = AlpacaMarkets(
liveApacApiKeyId: "<Insert live key>",
liveApcaApiSecretKey: "<Insert secret live key>",
paperApacApiKeyId: "<Insert paper key>",
paperApcaApiSecretKey: "<Insert secret paper key>");
copied to clipboard
Retrieve account and assets
Additional parameters for the getAssets() request include asset status,
asset class, and exchange filters.
The Account
and Asset classes
are available for viewing the fields of data.
Account? account = await am.getAccount();
Asset? asset = await am.getAsset("GRMN");
List<Asset>? assets = await am.getAssets();
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.