Skip to content

Latest commit

 

History

History
154 lines (104 loc) · 5.98 KB

File metadata and controls

154 lines (104 loc) · 5.98 KB

bind_api.api.CurrencyApi

Load the API package

import 'package:bind_api/api.dart';

All URIs are relative to https://api.thebind.uk/v1

Method HTTP request Description
getCryptoAsset GET /currencies/crypto/{crypto_currency_id} Crypto currency information with flag favorite or not for user
listCryptoCurrencies GET /currencies/crypto/ List of Crypto Currencies
listCurrencies GET /currencies/ List of Currencies available at Bind

getCryptoAsset

CryptoAssetFavorite getCryptoAsset(cryptoCurrencyId)

Crypto currency information with flag favorite or not for user

Crypto currency information with flag favorite or not for user.

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getCurrencyApi();
final String cryptoCurrencyId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | 

try {
    final response = api.getCryptoAsset(cryptoCurrencyId);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CurrencyApi->getCryptoAsset: $e\n');
}

Parameters

Name Type Description Notes
cryptoCurrencyId String

Return type

CryptoAssetFavorite

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listCryptoCurrencies

BuiltList listCryptoCurrencies(sort)

List of Crypto Currencies

List of Crypto Currencies available at Bind

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getCurrencyApi();
final CryptoAssetSorting sort = ; // CryptoAssetSorting | Sort order:  * `all` - Ascending, order by currency code  * `gainers` - Top gainers, tokens with highest perfomance first  * `losers` - Top losers, tokens with lowest perfomance first  * `capUp` - Ascending, order by market capitalization  * `capDown` - Descending, order by market capitalization  * `volumeUp` - Ascending, order by market volume   * `volumeDown` - Descending, order by market volume  * `recentUp` - Ascending, order by listing date on coinmarketcap api  * `recentDown` - Descending, order by listing date on coinmarketcap api  * `watch` - not implemented yet, sort like `all`  * `trending` - order by coinmarketcap trending sort 

try {
    final response = api.listCryptoCurrencies(sort);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CurrencyApi->listCryptoCurrencies: $e\n');
}

Parameters

Name Type Description Notes
sort CryptoAssetSorting Sort order: * all - Ascending, order by currency code * gainers - Top gainers, tokens with highest perfomance first * losers - Top losers, tokens with lowest perfomance first * capUp - Ascending, order by market capitalization * capDown - Descending, order by market capitalization * volumeUp - Ascending, order by market volume * volumeDown - Descending, order by market volume * recentUp - Ascending, order by listing date on coinmarketcap api * recentDown - Descending, order by listing date on coinmarketcap api * watch - not implemented yet, sort like all * trending - order by coinmarketcap trending sort [optional]

Return type

BuiltList<CryptoAsset>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listCurrencies

BuiltList listCurrencies(isCrypto)

List of Currencies available at Bind

Main method to get information about Currencies at BIND.

Example

import 'package:bind_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = BindApi().getCurrencyApi();
final bool isCrypto = true; // bool | allows to view separately fiat or crypto currencies, if not passed then all available currencies will be shown

try {
    final response = api.listCurrencies(isCrypto);
    print(response);
} catch on DioError (e) {
    print('Exception when calling CurrencyApi->listCurrencies: $e\n');
}

Parameters

Name Type Description Notes
isCrypto bool allows to view separately fiat or crypto currencies, if not passed then all available currencies will be shown [optional]

Return type

BuiltList<Currency>

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]