List Accounts
curl --request GET \
--url https://api.hopnow.io/v1/customers/{customer_id}/accounts \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/customers/{customer_id}/accounts"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/customers/{customer_id}/accounts', 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.hopnow.io/v1/customers/{customer_id}/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.hopnow.io/v1/customers/{customer_id}/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/customers/{customer_id}/accounts")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/customers/{customer_id}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"object": "<string>",
"customer_id": "<string>",
"name": "<string>",
"status": "<string>",
"balances": [
{
"currency": "<string>",
"currency_type": "<string>",
"available_balance": "<string>",
"pending_payout": "<string>",
"pending_payin": "<string>",
"total_balance": "<string>",
"updated_at": "<string>"
}
],
"created": "<string>"
}
],
"page": 123,
"size": 123,
"total": 123,
"pages": 123
}Accounts
List Accounts
Retrieve all accounts for a customer
GET
/
v1
/
customers
/
{customer_id}
/
accounts
List Accounts
curl --request GET \
--url https://api.hopnow.io/v1/customers/{customer_id}/accounts \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/customers/{customer_id}/accounts"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/customers/{customer_id}/accounts', 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.hopnow.io/v1/customers/{customer_id}/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.hopnow.io/v1/customers/{customer_id}/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/customers/{customer_id}/accounts")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/customers/{customer_id}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"object": "<string>",
"customer_id": "<string>",
"name": "<string>",
"status": "<string>",
"balances": [
{
"currency": "<string>",
"currency_type": "<string>",
"available_balance": "<string>",
"pending_payout": "<string>",
"pending_payin": "<string>",
"total_balance": "<string>",
"updated_at": "<string>"
}
],
"created": "<string>"
}
],
"page": 123,
"size": 123,
"total": 123,
"pages": 123
}Path Parameters
string
required
The customer’s external ID (starts with
cus_)Query Parameters
integer
default:"1"
Page number (minimum 1)
integer
default:"10"
Items per page (1-100)
array
Filter accounts by status (e.g.,
active, suspended)string
Filter accounts created on or after this date (ISO 8601 format)
string
Filter accounts created before this date (ISO 8601 format)
Response
array
Array of account objects
Show Account Fields
Show Account Fields
string
Account identifier (starts with
acc_)string
Always returns
"account"string
The customer’s external ID
string
The account name
string
Account status:
active, suspended, or inactivearray
Account balances by currency
Show Balance Fields
Show Balance Fields
string
ISO 4217 currency code
string
Type of currency:
fiat or cryptostring
Available balance for transactions (decimal string)
string
Amount pending in outgoing transfers (decimal string)
string
Amount pending in incoming transfers (decimal string)
string
Total balance including pending amounts (decimal string)
string
ISO 8601 timestamp of last balance update
string
ISO 8601 timestamp when the account was created
integer
Current page number
integer
Number of items per page
integer
Total number of items
integer
Total number of pages
Response Example
{
"items": [
{
"id": "acc_1234567890abcdef",
"object": "account",
"customer_id": "cus_abc123",
"name": "Primary Trading Account",
"status": "active",
"balances": [
{
"currency": "USD",
"currency_type": "fiat",
"available_balance": "10000.50",
"pending_payout": "250.00",
"pending_payin": "500.00",
"total_balance": "10750.50",
"updated_at": "2024-01-15T12:30:00Z"
}
],
"created": "2024-01-01T00:00:00Z"
},
{
"id": "acc_fedcba0987654321",
"object": "account",
"customer_id": "cus_abc123",
"name": "Savings Account",
"status": "active",
"balances": [],
"created": "2024-01-02T00:00:00Z"
}
],
"page": 1,
"size": 10,
"total": 25,
"pages": 3
}
⌘I