Transactions
Partners can fetch the history of transactions associated with their API key.
Query results may be truncated. Queries are limited to 100 results.
Please see Pagination at the bottom of page.
get
https://partners.liquid.com
/api/v1/partner/{public_api_key}/transactions
Fetch Transactions
Encoded payload must contain:
{
"token_id": "{created in Liquid web app, link above}",
"path": "/realtime",
"delegate_path": "/api/v1/partner/{public_api_key}/transactions",
"nonce": {current unix timestamp}
}
const jwt = require("jwt-simple");
const axios = require("axios");
const tokenId = "";
const tokenSecret = "";
const publicApiKey = "pk_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
const path = `/api/v1/partner/${publicApiKey}/transactions`;
const apiBase = "https://partners.liquid.com";
const xQuoineAuth = jwt.encode(
{
token_id: tokenId,
path: "/realtime",
delegate_path: path,
nonce: Date.now(),
},
tokenSecret
);
axios
.get(apiBase + path + "?min_ts=1623165462000&status=FILLED", {
headers: {
"X-Quoine-Auth": xQuoineAuth,
},
})
.then((response) => {
console.log(response.data);
})
.catch((err) => console.log(err));
The
selection
object returned in the query contains information about:- How many transactions exist for the given partner (
total_*
) - How many transactions are responsive to the given query (
range_*
) - How many transactions were actually returned in the payload (
payload_*
)
"selection": {
"payload_min_ts": 1621417624122,
"payload_max_ts": 1623231033118,
"payload_count": 46,
"range_min_ts": 1620639114127,
"range_max_ts": 1623231114127,
"range_count": 46,
"total_max_ts": 1623231033118,
"total_min_ts": 1618978440482,
"total_count": 57
}
If the
payload_count
is less than the range_count
then results are being hidden. A new query should be made again form min_ts={payload_max_ts + 1}
.Last modified 2yr ago