curl -X GET "https://api.services.payward.com/v1/accounts/ABCD1234EFGH5678/portfolio/details" \
-H "API-Key: $PWS_API_KEY" \
-H "API-Nonce: $PWS_API_NONCE" \
-H "API-Sign: $PWS_API_SIGN"import requests
url = "https://api.services.payward.com/v1/accounts/{account_id}/portfolio/details"
headers = {
"API-Key": "<api-key>",
"API-Sign": "<api-key>",
"API-Nonce": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'API-Key': '<api-key>', 'API-Sign': '<api-key>', 'API-Nonce': '<api-key>'}
};
fetch('https://api.services.payward.com/v1/accounts/{account_id}/portfolio/details', 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.services.payward.com/v1/accounts/{account_id}/portfolio/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"API-Nonce: <api-key>",
"API-Sign: <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.services.payward.com/v1/accounts/{account_id}/portfolio/details"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("API-Sign", "<api-key>")
req.Header.Add("API-Nonce", "<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.services.payward.com/v1/accounts/{account_id}/portfolio/details")
.header("API-Key", "<api-key>")
.header("API-Sign", "<api-key>")
.header("API-Nonce", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.services.payward.com/v1/accounts/{account_id}/portfolio/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
request["API-Sign"] = '<api-key>'
request["API-Nonce"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"symbol": "BTC",
"type": "crypto",
"index_price": "63000.00",
"total": "0.5",
"total_in_quote": "31500.00",
"available": "0.45",
"available_in_quote": "28350.00",
"open_orders": "0.05",
"avg_entry_price_in_quote": "58000.00",
"cost_basis_in_quote": "29000.00",
"pnl": {
"unrealized": "3500.00",
"realized": "-3.7440",
"reference_currency": {
"symbol": "USD",
"type": "fiat"
},
"status": {
"unrealized": "ready",
"realized": "ready"
}
}
},
{
"symbol": "USD",
"type": "fiat",
"index_price": "1.00",
"total": "5000.00",
"total_in_quote": "5000.00",
"available": "5000.00",
"available_in_quote": "5000.00",
"open_orders": "0.00",
"avg_entry_price_in_quote": null,
"cost_basis_in_quote": null
}
],
"quote_symbol": "USD",
"quote_type": "fiat"
}{
"error": {
"type": "<string>",
"status": 400,
"instance": "<string>",
"code": "bad_request",
"doc_url": "<string>",
"causes": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"status": 401,
"instance": "<string>",
"code": "unauthenticated",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 403,
"instance": "<string>",
"code": "forbidden",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 429,
"instance": "<string>",
"code": "resource_exhausted",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 500,
"instance": "<string>",
"code": "internal",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 501,
"instance": "<string>",
"code": "unimplemented",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 503,
"instance": "<string>",
"code": "unavailable",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 504,
"instance": "<string>",
"code": "deadline_exceeded",
"doc_url": "<string>",
"causes": [
{}
]
}
}List Portfolio Details
Lists owned assets in a user’s portfolio.
curl -X GET "https://api.services.payward.com/v1/accounts/ABCD1234EFGH5678/portfolio/details" \
-H "API-Key: $PWS_API_KEY" \
-H "API-Nonce: $PWS_API_NONCE" \
-H "API-Sign: $PWS_API_SIGN"import requests
url = "https://api.services.payward.com/v1/accounts/{account_id}/portfolio/details"
headers = {
"API-Key": "<api-key>",
"API-Sign": "<api-key>",
"API-Nonce": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'API-Key': '<api-key>', 'API-Sign': '<api-key>', 'API-Nonce': '<api-key>'}
};
fetch('https://api.services.payward.com/v1/accounts/{account_id}/portfolio/details', 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.services.payward.com/v1/accounts/{account_id}/portfolio/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"API-Nonce: <api-key>",
"API-Sign: <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.services.payward.com/v1/accounts/{account_id}/portfolio/details"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("API-Sign", "<api-key>")
req.Header.Add("API-Nonce", "<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.services.payward.com/v1/accounts/{account_id}/portfolio/details")
.header("API-Key", "<api-key>")
.header("API-Sign", "<api-key>")
.header("API-Nonce", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.services.payward.com/v1/accounts/{account_id}/portfolio/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
request["API-Sign"] = '<api-key>'
request["API-Nonce"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"symbol": "BTC",
"type": "crypto",
"index_price": "63000.00",
"total": "0.5",
"total_in_quote": "31500.00",
"available": "0.45",
"available_in_quote": "28350.00",
"open_orders": "0.05",
"avg_entry_price_in_quote": "58000.00",
"cost_basis_in_quote": "29000.00",
"pnl": {
"unrealized": "3500.00",
"realized": "-3.7440",
"reference_currency": {
"symbol": "USD",
"type": "fiat"
},
"status": {
"unrealized": "ready",
"realized": "ready"
}
}
},
{
"symbol": "USD",
"type": "fiat",
"index_price": "1.00",
"total": "5000.00",
"total_in_quote": "5000.00",
"available": "5000.00",
"available_in_quote": "5000.00",
"open_orders": "0.00",
"avg_entry_price_in_quote": null,
"cost_basis_in_quote": null
}
],
"quote_symbol": "USD",
"quote_type": "fiat"
}{
"error": {
"type": "<string>",
"status": 400,
"instance": "<string>",
"code": "bad_request",
"doc_url": "<string>",
"causes": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "<string>",
"status": 401,
"instance": "<string>",
"code": "unauthenticated",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 403,
"instance": "<string>",
"code": "forbidden",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 429,
"instance": "<string>",
"code": "resource_exhausted",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 500,
"instance": "<string>",
"code": "internal",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 501,
"instance": "<string>",
"code": "unimplemented",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 503,
"instance": "<string>",
"code": "unavailable",
"doc_url": "<string>",
"causes": [
{}
]
}
}{
"error": {
"type": "<string>",
"status": 504,
"instance": "<string>",
"code": "deadline_exceeded",
"doc_url": "<string>",
"causes": [
{}
]
}
}Authorizations
Your public API key. Identifies the partner making the request.
HMAC signature over the request, computed with your private key.
Monotonically increasing nonce included in the request signature.
Path Parameters
ID of the account the request applies to. This refers to one of the accounts held by the user the request is acting on behalf of (typically the user's main account, but any of the user's accounts is accepted). Routes the request to that specific account container. Canonical identifier for an account in the Payward public API.
14 - 42Query Parameters
Ticker symbol of the quote asset to use for all valuations and PnL calculations in the response (e.g. USD, USDC). Defaults to USD.
Ticker symbol of an asset (e.g. BTC, USDC, EUR).
3 - 16"BTC"
Classification of the quote asset. Supports fiat and stablecoin.
fiat, stablecoin Response
Response
List of assets owned by the user with their detailed information.
Show child attributes
Show child attributes
The asset used as the quote currency for all *_in_quote fields. Echoes the quote_symbol query parameter (or its default).
16Classification of the quote asset. Echoes the quote_type query parameter (or its default).
fiat, stablecoin