Skip to content

Latest commit

 

History

History
709 lines (485 loc) · 22.5 KB

File metadata and controls

709 lines (485 loc) · 22.5 KB

bind_api.api.CryptoWalletApi

Load the API package

import 'package:bind_api/api.dart';

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

Method HTTP request Description
addCryptoFavorite POST /crypto/favorites/ Add crypto asset to favorite
createWithdrawalAddress POST /crypto/withdrawal/whitelisted_addresses/ Create new whitelisted withdrawal address
deleteCryptoFavorite DELETE /crypto/favorites/{asset_id}/ Delete asset from favorites
deleteWithdrawalAddress DELETE /crypto/withdrawal/whitelisted_addresses/{address_id}/ Delete withdrawal asset
estimateCryptoWithdrawalFee POST /crypto/withdrawal/estimate_fee/ Estimate fee for withdrawal
getAssetsBreakdown GET /crypto/breakdown/ Get crypto asset allocation/breakdown of current User
getChainImplementations GET /crypto/assets/{asset_id}/chain_implementations/ Get chains for a crypto asset
getCryptoFavorites GET /crypto/favorites/ Get user favorite crypto assets
getCryptoWallet GET /crypto/wallet/ Get crypto wallet of current User - total balance and assets balances
getCryptoWalletLight GET /crypto/wallet/light/ Get crypto assets of current user with balances and prices
getDepositAddresses GET /crypto/assets/{asset_id}/deposit_addresses/ Get deposit addresses for a crypto asset
getProfitLoss GET /crypto/wallet/profitloss/ Get profit loss
getProfitLossSummary GET /crypto/wallet/profitloss/summary/ Get profit loss summary
getSingleCryptoBalance GET /crypto/assets/{asset_id}/balance/ Get detailed balance of a crypto asset
getWithdrawalAddresses GET /crypto/withdrawal/whitelisted_addresses/ Get whitelisted addresses for crypto withdrawal
performWithdrawalOfCrypto POST /crypto/withdrawal/perform/ Register a withdrawal transaction

addCryptoFavorite

addCryptoFavorite(favoriteCryptoCreateRequest)

Add crypto asset to favorite

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().getCryptoWalletApi();
final FavoriteCryptoCreateRequest favoriteCryptoCreateRequest = ; // FavoriteCryptoCreateRequest | 

try {
    api.addCryptoFavorite(favoriteCryptoCreateRequest);
} catch on DioError (e) {
    print('Exception when calling CryptoWalletApi->addCryptoFavorite: $e\n');
}

Parameters

Name Type Description Notes
favoriteCryptoCreateRequest FavoriteCryptoCreateRequest [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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

createWithdrawalAddress

WithdrawalAddress createWithdrawalAddress(withdrawalAddressCreationRequest)

Create new whitelisted withdrawal address

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().getCryptoWalletApi();
final WithdrawalAddressCreationRequest withdrawalAddressCreationRequest = ; // WithdrawalAddressCreationRequest | 

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

Parameters

Name Type Description Notes
withdrawalAddressCreationRequest WithdrawalAddressCreationRequest [optional]

Return type

WithdrawalAddress

Authorization

bearerAuth

HTTP request headers

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

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

deleteCryptoFavorite

deleteCryptoFavorite(assetId)

Delete asset from favorites

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().getCryptoWalletApi();
final String assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id of asset

try {
    api.deleteCryptoFavorite(assetId);
} catch on DioError (e) {
    print('Exception when calling CryptoWalletApi->deleteCryptoFavorite: $e\n');
}

Parameters

Name Type Description Notes
assetId String id of asset

Return type

void (empty response body)

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]

deleteWithdrawalAddress

deleteWithdrawalAddress(addressId)

Delete withdrawal asset

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().getCryptoWalletApi();
final String addressId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id of a withdrawal address

try {
    api.deleteWithdrawalAddress(addressId);
} catch on DioError (e) {
    print('Exception when calling CryptoWalletApi->deleteWithdrawalAddress: $e\n');
}

Parameters

Name Type Description Notes
addressId String id of a withdrawal address

Return type

void (empty response body)

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]

estimateCryptoWithdrawalFee

CryptoWithdrawalFeeEstimationResult estimateCryptoWithdrawalFee(cryptoWithdrawalFeeEstimationRequest)

Estimate fee for withdrawal

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().getCryptoWalletApi();
final CryptoWithdrawalFeeEstimationRequest cryptoWithdrawalFeeEstimationRequest = ; // CryptoWithdrawalFeeEstimationRequest | 

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

Parameters

Name Type Description Notes
cryptoWithdrawalFeeEstimationRequest CryptoWithdrawalFeeEstimationRequest [optional]

Return type

CryptoWithdrawalFeeEstimationResult

Authorization

bearerAuth

HTTP request headers

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

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

getAssetsBreakdown

CryptoWalletWithShare getAssetsBreakdown()

Get crypto asset allocation/breakdown of current 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().getCryptoWalletApi();

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

Parameters

This endpoint does not need any parameter.

Return type

CryptoWalletWithShare

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]

getChainImplementations

BuiltList getChainImplementations(assetId)

Get chains for a crypto asset

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().getCryptoWalletApi();
final String assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id of a crypto asset

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

Parameters

Name Type Description Notes
assetId String id of a crypto asset

Return type

BuiltList<ChainImplementation>

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]

getCryptoFavorites

BuiltList getCryptoFavorites()

Get user favorite crypto assets

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().getCryptoWalletApi();

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

Parameters

This endpoint does not need any parameter.

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]

getCryptoWallet

CryptoWallet getCryptoWallet()

Get crypto wallet of current User - total balance and assets balances

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().getCryptoWalletApi();

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

Parameters

This endpoint does not need any parameter.

Return type

CryptoWallet

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]

getCryptoWalletLight

BuiltList getCryptoWalletLight()

Get crypto assets of current user with balances and prices

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().getCryptoWalletApi();

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

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<CryptoAccountLight>

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]

getDepositAddresses

BuiltList getDepositAddresses(assetId)

Get deposit addresses for a crypto asset

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().getCryptoWalletApi();
final String assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id of a crypto asset

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

Parameters

Name Type Description Notes
assetId String id of a crypto asset

Return type

BuiltList<DepositAddress>

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]

getProfitLoss

BuiltList getProfitLoss(sorting)

Get profit loss

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().getCryptoWalletApi();
final ProfitLossSort sorting = ; // ProfitLossSort | sorting

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

Parameters

Name Type Description Notes
sorting ProfitLossSort sorting

Return type

BuiltList<ProfitLoss>

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]

getProfitLossSummary

ProfitLossSummary getProfitLossSummary()

Get profit loss summary

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().getCryptoWalletApi();

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

Parameters

This endpoint does not need any parameter.

Return type

ProfitLossSummary

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]

getSingleCryptoBalance

SingleCryptoBalance getSingleCryptoBalance(assetId)

Get detailed balance of a crypto asset

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().getCryptoWalletApi();
final String assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id of a crypto asset

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

Parameters

Name Type Description Notes
assetId String id of a crypto asset

Return type

SingleCryptoBalance

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]

getWithdrawalAddresses

BuiltList getWithdrawalAddresses(assetId)

Get whitelisted addresses for crypto withdrawal

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().getCryptoWalletApi();
final String assetId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | id of a crypto asset

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

Parameters

Name Type Description Notes
assetId String id of a crypto asset

Return type

BuiltList<WithdrawalAddress>

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]

performWithdrawalOfCrypto

performWithdrawalOfCrypto(cryptoWithdrawalRequest)

Register a withdrawal transaction

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().getCryptoWalletApi();
final CryptoWithdrawalRequest cryptoWithdrawalRequest = ; // CryptoWithdrawalRequest | 

try {
    api.performWithdrawalOfCrypto(cryptoWithdrawalRequest);
} catch on DioError (e) {
    print('Exception when calling CryptoWalletApi->performWithdrawalOfCrypto: $e\n');
}

Parameters

Name Type Description Notes
cryptoWithdrawalRequest CryptoWithdrawalRequest [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

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