cURL
curl --request GET \
--url https://api.grainfinance.co/v1/wallets \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.grainfinance.co/v1/wallets"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.grainfinance.co/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.grainfinance.co/v1/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.grainfinance.co/v1/wallets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.grainfinance.co/v1/wallets")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grainfinance.co/v1/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"wallets": [
{
"id": "1b0ada1e-fa1b-4cfe-a553-01b340c5650e",
"totalBalance": 10525,
"availableBalance": 8500,
"collateralAmount": 2025,
"currency": "EUR",
"depositDetails": {
"accountHolderName": "Acme Payments Ltd",
"accountNumber": "8290041523",
"bankName": "JPMorgan Chase Bank, N.A.",
"bankAddress": "383 Madison Avenue, New York, NY 10017",
"bankCountry": "US",
"bankState": "NY",
"iban": "<string>",
"bicSwift": "CHASUS33XXX",
"routingCode": "<string>",
"bankCode": "<string>",
"branchCode": "<string>",
"sortCode": "560036",
"bsbCode": "082902",
"specialInstructions": "<string>",
"achRoutingCode": "486478148",
"wireRoutingCode": "419568613"
}
}
]
}Wallets
List Wallets
Retrieves all wallets and their balances, per currency.
GET
/
wallets
cURL
curl --request GET \
--url https://api.grainfinance.co/v1/wallets \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.grainfinance.co/v1/wallets"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.grainfinance.co/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.grainfinance.co/v1/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.grainfinance.co/v1/wallets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.grainfinance.co/v1/wallets")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grainfinance.co/v1/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"wallets": [
{
"id": "1b0ada1e-fa1b-4cfe-a553-01b340c5650e",
"totalBalance": 10525,
"availableBalance": 8500,
"collateralAmount": 2025,
"currency": "EUR",
"depositDetails": {
"accountHolderName": "Acme Payments Ltd",
"accountNumber": "8290041523",
"bankName": "JPMorgan Chase Bank, N.A.",
"bankAddress": "383 Madison Avenue, New York, NY 10017",
"bankCountry": "US",
"bankState": "NY",
"iban": "<string>",
"bicSwift": "CHASUS33XXX",
"routingCode": "<string>",
"bankCode": "<string>",
"branchCode": "<string>",
"sortCode": "560036",
"bsbCode": "082902",
"specialInstructions": "<string>",
"achRoutingCode": "486478148",
"wireRoutingCode": "419568613"
}
}
]
}Authorizations
Basic authentication using the partner API keys from https://console.grainfinance.co/keys
Response
200 - application/json
Wallets Retrieved
List of the Partner's Wallets
Show child attributes
Show child attributes
⌘I