3.3 KiB
3.3 KiB
fintracker_api.api.InstrumentsApi
Load the API package
import 'package:fintracker_api/api.dart';
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| instrumentsGet | GET /api/v1/instruments/{instrument_id} | Get |
| instrumentsList | GET /api/v1/instruments | List |
instrumentsGet
InstrumentDetail instrumentsGet(instrumentId, scope, pricesFrom)
Get
One instrument with its position, open lots, events and price history.
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getInstrumentsApi();
final int instrumentId = 56; // int |
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
final DateTime pricesFrom = 2013-10-20; // DateTime |
try {
final response = api.instrumentsGet(instrumentId, scope, pricesFrom);
print(response);
} on DioException catch (e) {
print('Exception when calling InstrumentsApi->instrumentsGet: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| instrumentId | int | ||
| scope | String | all | account: |
| pricesFrom | DateTime | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
instrumentsList
List instrumentsList(q, assetClass, heldOnly, limit)
List
Example
import 'package:fintracker_api/api.dart';
final api = FintrackerApi().getInstrumentsApi();
final String q = q_example; // String | substring of ticker, name or ISIN
final String assetClass = assetClass_example; // String | share | bond | etf | fund | currency | index | …
final bool heldOnly = true; // bool | only instruments with an open lot
final int limit = 56; // int |
try {
final response = api.instrumentsList(q, assetClass, heldOnly, limit);
print(response);
} on DioException catch (e) {
print('Exception when calling InstrumentsApi->instrumentsList: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| q | String | substring of ticker, name or ISIN | [optional] |
| assetClass | String | share | bond |
| heldOnly | bool | only instruments with an open lot | [optional] [default to false] |
| limit | int | [optional] [default to 100] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]