getAccountsBalance
Given a list of accountIds returns the balance of each account in crypto and fiat currency. Fiat currency may not be present if at the time of the request the exchange rate is not available.
/accounts/balance
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://psp.example.com/accounts/balance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountResourceApi;
import java.io.File;
import java.util.*;
public class AccountResourceApiExample {
public static void main(String[] args) {
AccountResourceApi apiInstance = new AccountResourceApi();
AccountBalanceFiltersDto body = ; // AccountBalanceFiltersDto |
String key = key_example; // String | key of the client
String signature = signature_example; // String | Client signature for this request
try {
AccountBalanceResponseDto result = apiInstance.getAccountsBalance(body, key, signature);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountResourceApi#getAccountsBalance");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AccountResourceApi;
public class AccountResourceApiExample {
public static void main(String[] args) {
AccountResourceApi apiInstance = new AccountResourceApi();
AccountBalanceFiltersDto body = ; // AccountBalanceFiltersDto |
String key = key_example; // String | key of the client
String signature = signature_example; // String | Client signature for this request
try {
AccountBalanceResponseDto result = apiInstance.getAccountsBalance(body, key, signature);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountResourceApi#getAccountsBalance");
e.printStackTrace();
}
}
}
AccountBalanceFiltersDto *body = ; //
String *key = key_example; // key of the client
String *signature = signature_example; // Client signature for this request
AccountResourceApi *apiInstance = [[AccountResourceApi alloc] init];
[apiInstance getAccountsBalanceWith:body
key:key
signature:signature
completionHandler: ^(AccountBalanceResponseDto output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Psp = require('psp');
var api = new Psp.AccountResourceApi()
var body = ; // {{AccountBalanceFiltersDto}}
var key = key_example; // {{String}} key of the client
var signature = signature_example; // {{String}} Client signature for this request
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAccountsBalance(bodykeysignature, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAccountsBalanceExample
{
public void main()
{
var apiInstance = new AccountResourceApi();
var body = new AccountBalanceFiltersDto(); // AccountBalanceFiltersDto |
var key = key_example; // String | key of the client
var signature = signature_example; // String | Client signature for this request
try
{
AccountBalanceResponseDto result = apiInstance.getAccountsBalance(body, key, signature);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AccountResourceApi.getAccountsBalance: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAccountResourceApi();
$body = ; // AccountBalanceFiltersDto |
$key = key_example; // String | key of the client
$signature = signature_example; // String | Client signature for this request
try {
$result = $api_instance->getAccountsBalance($body, $key, $signature);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountResourceApi->getAccountsBalance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountResourceApi;
my $api_instance = WWW::SwaggerClient::AccountResourceApi->new();
my $body = WWW::SwaggerClient::Object::AccountBalanceFiltersDto->new(); # AccountBalanceFiltersDto |
my $key = key_example; # String | key of the client
my $signature = signature_example; # String | Client signature for this request
eval {
my $result = $api_instance->getAccountsBalance(body => $body, key => $key, signature => $signature);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AccountResourceApi->getAccountsBalance: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AccountResourceApi()
body = # AccountBalanceFiltersDto |
key = key_example # String | key of the client
signature = signature_example # String | Client signature for this request
try:
api_response = api_instance.get_accounts_balance(body, key, signature)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountResourceApi->getAccountsBalance: %s\n" % e)
Parameters
Header parameters
Name | Description |
---|---|
key* |
String
key of the client
Required
|
signature* |
String
Client signature for this request
Required
|
Body parameters
Name | Description |
---|---|
body * |