Skip to main content
POST
/
payments
/
balances
Get wallet balances
curl --request POST \
  --url https://v2.prod.halliday.xyz/payments/balances \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payment_id": "pay_abc123",
  "custom_queries": [
    {
      "address": "0xabc1234567890abcdef1234567890abcdef1234",
      "token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
    },
    {
      "address": "0xdef1234567890abcdef1234567890abcdef5678",
      "token": "arbitrum:0xfffFFFFFfFFfffFFfFffffFffFFfFFfFFfFFf"
    }
  ]
}
'
import requests

url = "https://v2.prod.halliday.xyz/payments/balances"

payload = {
"payment_id": "pay_abc123",
"custom_queries": [
{
"address": "0xabc1234567890abcdef1234567890abcdef1234",
"token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
},
{
"address": "0xdef1234567890abcdef1234567890abcdef5678",
"token": "arbitrum:0xfffFFFFFfFFfffFFfFffffFffFFfFFfFFfFFf"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment_id: 'pay_abc123',
custom_queries: [
{
address: '0xabc1234567890abcdef1234567890abcdef1234',
token: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
},
{
address: '0xdef1234567890abcdef1234567890abcdef5678',
token: 'arbitrum:0xfffFFFFFfFFfffFFfFffffFffFFfFFfFFfFFf'
}
]
})
};

fetch('https://v2.prod.halliday.xyz/payments/balances', 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://v2.prod.halliday.xyz/payments/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payment_id' => 'pay_abc123',
'custom_queries' => [
[
'address' => '0xabc1234567890abcdef1234567890abcdef1234',
'token' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
],
[
'address' => '0xdef1234567890abcdef1234567890abcdef5678',
'token' => 'arbitrum:0xfffFFFFFfFFfffFFfFffffFffFFfFFfFFfFFf'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://v2.prod.halliday.xyz/payments/balances"

payload := strings.NewReader("{\n \"payment_id\": \"pay_abc123\",\n \"custom_queries\": [\n {\n \"address\": \"0xabc1234567890abcdef1234567890abcdef1234\",\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n },\n {\n \"address\": \"0xdef1234567890abcdef1234567890abcdef5678\",\n \"token\": \"arbitrum:0xfffFFFFFfFFfffFFfFffffFffFFfFFfFFfFFf\"\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://v2.prod.halliday.xyz/payments/balances")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_id\": \"pay_abc123\",\n \"custom_queries\": [\n {\n \"address\": \"0xabc1234567890abcdef1234567890abcdef1234\",\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n },\n {\n \"address\": \"0xdef1234567890abcdef1234567890abcdef5678\",\n \"token\": \"arbitrum:0xfffFFFFFfFFfffFFfFffffFffFFfFFfFFfFFf\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://v2.prod.halliday.xyz/payments/balances")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_id\": \"pay_abc123\",\n \"custom_queries\": [\n {\n \"address\": \"0xabc1234567890abcdef1234567890abcdef1234\",\n \"token\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\n },\n {\n \"address\": \"0xdef1234567890abcdef1234567890abcdef5678\",\n \"token\": \"arbitrum:0xfffFFFFFfFFfffFFfFffffFffFFfFFfFFfFFf\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "balance_results": [
    {
      "address": "0xabc1234567890abcdef1234567890abcdef1234",
      "token": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "value": {
        "kind": "amount",
        "amount": "<string>",
        "withdrawal_fee": "<string>"
      }
    }
  ]
}
{
"errors": [
{
"kind": "other",
"message": "Invalid wallet address format"
}
]
}
{
"errors": [
{
"kind": "other",
"message": "Invalid API key"
}
]
}
{
"errors": [
{
"kind": "other",
"message": "You do not have permission to query payment balances"
}
]
}
{
"errors": [
{
"kind": "other",
"message": "Payment 'pay_abc123' not found"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
payment_id
string<uuid>

Payment identifier whose associated wallets should be queried.

Example:

"41b16a6f-704e-44ba-9964-2b66df8a73e8"

custom_queries
object[]

Additional wallet and token combinations to query.

Response

Wallet balances retrieved successfully

balance_results
object[]
required