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.

Fetch Transactions

GET https://partners.liquid.com/api/v1/partner/{public_api_key}/transactions

Path Parameters

NameTypeDescription

public_api_key

string

Public API key of the partner.

Query Parameters

NameTypeDescription

min_ts

number

Unix millisecond timestamp.

max_ts

number

Unix millisecond timestamp.

status

string

Transaction status.

intent_id

string

Search by Intent.

partner_order_id

string

Searchable 40 character id.

partner_tag

string

Filter for transactions containing a specified tag.

Headers

NameTypeDescription

X-Quoine-Auth

string

Signed JWT belonging to the Liquid user account associated with the partner.

{
    "success": true,
    "environment": "SANDBOX",
    "message": "Partner Transactions.",
    "payload": [
        {
            "id": "1664961c-a190-48cf-b787-5b85fd5bfc75",
            "intent_id": "f53762a1-3ca4-4224-8f49-41caf86baba9",
            "created_at": "1618978440482",
            "public_api_key": "pk_sandbox_3ded0834-6bc5-4442-86ec-bd1fb96a075e",
            "partner_order_id": "max 40 chars",
            "partner_ref": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
            "reputation_identity_id": "e74b7962-75c5-40eb-9724-1ff8189c9ad8",
            "status": "FILLED",
            "outcome_category": "FILLED",
            "funding_settlement": {
                "currency": "USD",
                "quantity": "50.00"
            },
            "payout_settlement": {
                "currency": "BTC",
                "quantity": "0.0014150"
            },
            "approximate_usd_equivalent": "50.00"
        }
    ],
    "selection": {        
        "payload_min_ts": 1619978440482,
        "payload_max_ts": 1619978440482,
        "payload_count": 100,
        
        "range_min_ts": 1618978400000,
        "range_max_ts": 1618978850000,
        "range_count": 497,
        
        "total_min_ts": 1618978440482,
        "total_max_ts": 1623109714598,
        "total_count": 47567
    }
}

Swagger

https://partners.liquid.com/swagger/#/default/get_api_v1_partner__public_api_key__transactions

X-Quoine-Auth

Signed JWT. Please refer to auth token instructions.

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}
}

Example (Javascript)

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));

Pagination

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 updated