Get Account
curl --request GET \
--url https://staging-api.getpartna.com/v4/account \
--header 'x-api-key: <api-key>' \
--header 'x-api-user: <api-key>'import requests
url = "https://staging-api.getpartna.com/v4/account"
headers = {
"x-api-key": "<api-key>",
"x-api-user": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', 'x-api-user': '<api-key>'}};
fetch('https://staging-api.getpartna.com/v4/account', 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://staging-api.getpartna.com/v4/account",
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>",
"x-api-user: <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://staging-api.getpartna.com/v4/account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-user", "<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://staging-api.getpartna.com/v4/account")
.header("x-api-key", "<api-key>")
.header("x-api-user", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.getpartna.com/v4/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-user"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"accounts": [
{
"BNB": {
"accountName": "user1",
"asset": [
{
"id": "0x20B3bE3a0629f30512E8bf6CcaCC1f2FC403b6AC",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
},
"BTC": {
"accountName": "user1",
"asset": [
{
"id": "tb1q6zdd464wxlmd9glqefeeqsuxnemcyq73rhzn77",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
},
"ETH": {
"accountName": "user1",
"asset": [
{
"id": "0x20B3bE3a0629f30512E8bf6CcaCC1f2FC403b6AC",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
},
"GHS": {
"accountName": "user1",
"asset": [
{
"id": "",
"meta": null,
"type": "ghanaiancedis"
}
],
"balance": 0,
"pendingDebit": 0
},
"KES": {
"accountName": "user1",
"asset": [
{
"id": "",
"meta": null,
"type": "kenyanshilling"
}
],
"balance": 0,
"pendingDebit": 0
},
"NGN": {
"accountName": "user1",
"asset": [
{
"id": "",
"meta": null,
"type": "naira"
}
],
"balance": 0,
"pendingDebit": 0
},
"USD": {
"accountName": "user1",
"asset": [
{
"id": "0x20B3bE3a0629f30512E8bf6CcaCC1f2FC403b6AC",
"meta": null,
"type": "crypto"
},
{
"id": "TCx7wxwFVm9GwnEaKaNckzqRYxrUxgoJDD",
"meta": null,
"type": "crypto"
},
{
"id": "EXq68wLDiXvPppv6VVJKyECcAC1oz25rHk8BgeorRvUe",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
}
}
]
},
"message": "success"
}{
"message": "invalid apikey"
}{
"message": "account not found"
}Account
Get Account
Get all accounts or filter using account name. The account name must be an alphanumeric lowercase hex string between 2 to 40 characters long
GET
/
account
Get Account
curl --request GET \
--url https://staging-api.getpartna.com/v4/account \
--header 'x-api-key: <api-key>' \
--header 'x-api-user: <api-key>'import requests
url = "https://staging-api.getpartna.com/v4/account"
headers = {
"x-api-key": "<api-key>",
"x-api-user": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', 'x-api-user': '<api-key>'}};
fetch('https://staging-api.getpartna.com/v4/account', 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://staging-api.getpartna.com/v4/account",
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>",
"x-api-user: <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://staging-api.getpartna.com/v4/account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-user", "<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://staging-api.getpartna.com/v4/account")
.header("x-api-key", "<api-key>")
.header("x-api-user", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.getpartna.com/v4/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-user"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"accounts": [
{
"BNB": {
"accountName": "user1",
"asset": [
{
"id": "0x20B3bE3a0629f30512E8bf6CcaCC1f2FC403b6AC",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
},
"BTC": {
"accountName": "user1",
"asset": [
{
"id": "tb1q6zdd464wxlmd9glqefeeqsuxnemcyq73rhzn77",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
},
"ETH": {
"accountName": "user1",
"asset": [
{
"id": "0x20B3bE3a0629f30512E8bf6CcaCC1f2FC403b6AC",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
},
"GHS": {
"accountName": "user1",
"asset": [
{
"id": "",
"meta": null,
"type": "ghanaiancedis"
}
],
"balance": 0,
"pendingDebit": 0
},
"KES": {
"accountName": "user1",
"asset": [
{
"id": "",
"meta": null,
"type": "kenyanshilling"
}
],
"balance": 0,
"pendingDebit": 0
},
"NGN": {
"accountName": "user1",
"asset": [
{
"id": "",
"meta": null,
"type": "naira"
}
],
"balance": 0,
"pendingDebit": 0
},
"USD": {
"accountName": "user1",
"asset": [
{
"id": "0x20B3bE3a0629f30512E8bf6CcaCC1f2FC403b6AC",
"meta": null,
"type": "crypto"
},
{
"id": "TCx7wxwFVm9GwnEaKaNckzqRYxrUxgoJDD",
"meta": null,
"type": "crypto"
},
{
"id": "EXq68wLDiXvPppv6VVJKyECcAC1oz25rHk8BgeorRvUe",
"meta": null,
"type": "crypto"
}
],
"balance": 0,
"pendingDebit": 0
}
}
]
},
"message": "success"
}{
"message": "invalid apikey"
}{
"message": "account not found"
}Was this page helpful?
⌘I