Get Balances List
curl --request GET \
--url https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance \
--header 'BIZ-API-KEY: <api-key>' \
--header 'BIZ-API-NONCE: <api-key>' \
--header 'BIZ-API-SIGNATURE: <api-key>'import requests
url = "https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance"
headers = {
"BIZ-API-KEY": "<api-key>",
"BIZ-API-NONCE": "<api-key>",
"BIZ-API-SIGNATURE": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'BIZ-API-KEY': '<api-key>',
'BIZ-API-NONCE': '<api-key>',
'BIZ-API-SIGNATURE': '<api-key>'
}
};
fetch('https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance', 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://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"BIZ-API-KEY: <api-key>",
"BIZ-API-NONCE: <api-key>",
"BIZ-API-SIGNATURE: <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://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("BIZ-API-KEY", "<api-key>")
req.Header.Add("BIZ-API-NONCE", "<api-key>")
req.Header.Add("BIZ-API-SIGNATURE", "<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://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance")
.header("BIZ-API-KEY", "<api-key>")
.header("BIZ-API-NONCE", "<api-key>")
.header("BIZ-API-SIGNATURE", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["BIZ-API-KEY"] = '<api-key>'
request["BIZ-API-NONCE"] = '<api-key>'
request["BIZ-API-SIGNATURE"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 123,
"data": [
{
"name": "<string>",
"symbol": "<string>",
"contractAddress": "<string>",
"chainName": "<string>",
"chainSymbol": "<string>",
"slip44": 123,
"balance": "<string>",
"frozen": "<string>",
"decimal": 123
}
],
"msg": "<string>"
}Wallets
Get Balances List
查询钱包币种余额。
This endpoint returns a JSON response with a list of token assets and their balances for for the specified wallet. The response includes the total count of token assets, as well as information about each asset, such as the coin symbol code, display name, decimal, total balance as well as frozen balance.
GET
/
v1
/
wallet
/
balance
Get Balances List
curl --request GET \
--url https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance \
--header 'BIZ-API-KEY: <api-key>' \
--header 'BIZ-API-NONCE: <api-key>' \
--header 'BIZ-API-SIGNATURE: <api-key>'import requests
url = "https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance"
headers = {
"BIZ-API-KEY": "<api-key>",
"BIZ-API-NONCE": "<api-key>",
"BIZ-API-SIGNATURE": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'BIZ-API-KEY': '<api-key>',
'BIZ-API-NONCE': '<api-key>',
'BIZ-API-SIGNATURE': '<api-key>'
}
};
fetch('https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance', 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://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"BIZ-API-KEY: <api-key>",
"BIZ-API-NONCE: <api-key>",
"BIZ-API-SIGNATURE: <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://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("BIZ-API-KEY", "<api-key>")
req.Header.Add("BIZ-API-NONCE", "<api-key>")
req.Header.Add("BIZ-API-SIGNATURE", "<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://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance")
.header("BIZ-API-KEY", "<api-key>")
.header("BIZ-API-NONCE", "<api-key>")
.header("BIZ-API-SIGNATURE", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-openapi.bisonblock.ai/api/v1/wallet/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["BIZ-API-KEY"] = '<api-key>'
request["BIZ-API-NONCE"] = '<api-key>'
request["BIZ-API-SIGNATURE"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 123,
"data": [
{
"name": "<string>",
"symbol": "<string>",
"contractAddress": "<string>",
"chainName": "<string>",
"chainSymbol": "<string>",
"slip44": 123,
"balance": "<string>",
"frozen": "<string>",
"decimal": 123
}
],
"msg": "<string>"
}Authorizations
This field contains the API key.
This field contains the nonce.
This field contains the signature.
Was this page helpful?
⌘I