v1

latestOpenAPI 3.1.02026-07-2411601020.7 KB

Get account statement

[Available in Sandbox/Production environment] Retrieve your StraitsX account statement

get/merchant/statements/account-statement

Query parameters

page[size]string

Number of transactions per page (max limit: 1000)<br>Regex: /^0*[1-9][0-9]*$/

page[number]string

Page number<br>Regex: /^0*[1-9][0-9]*$/

filter[from]string required

Start of the ledger in ISO8601 format (supports up to 6 decimal places / microsecond precision) e.g. 2024-03-27T10:59:53.000000+08:00<br>Regex: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])T([01]\d|2[0-3]):([0-5]\d):([0-5]\d)(\.\d+)?(?:Z|(?:\s([+-]?\d{2}:?\d{2})))?$/

filter[to]string required

End of the ledger in ISO8601 format (supports up to 6 decimal places / microsecond precision) e.g. 2024-03-27T10:59:53.999999+08:00<br>Regex: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])T([01]\d|2[0-3]):([0-5]\d):([0-5]\d)(\.\d+)?(?:Z|(?:\s([+-]?\d{2}:?\d{2})))?$/

filter[currency]string required

Query the ledger of a specific currency:

  • Fiat Only Business User: sgd, usd
  • Default Business User: xsgd, xusd, usdc, usdt, sgd, usd
sortstring

Sorted by <br> <b>Creation Date:</b> Ascending (createdAt) / Descending (-createdAt) <br>

Headers

X-XFERS-APP-API-KEYstring required

You can retrieve this from your Dashboard Developer Tools.<br><br><strong>Note:</strong> The X-XFERS-APP-API-KEY is a mandatory header for all authentication methods, including standard API key usage and HTTP Request Signing mode.

X-PUBLIC-KEY-IDstring

The Key ID, can be retrieved from your StraitsX Dashboard.<br><br><strong>Note:</strong> This header attribute is required when HTTP Request Signing is enabled for your account.

X-TIMESTAMPstring

Current Unix epoch time in seconds. Must be within ±300 seconds of server time.<br><br><strong>Note:</strong> This header attribute is required when HTTP Request Signing is enabled for your account.

X-NONCEstring

A unique UUID string per request, used for replay protection. Must not be reused within the timestamp window.<br>Regex: /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i<br><br><strong>Note:</strong> This header attribute is required when HTTP Request Signing is enabled for your account.

X-SIGNATUREstring

Base64-encoded digital signature of the canonical request string.<br><br><strong>Note:</strong> This header attribute is required when HTTP Request Signing is enabled for your account.

Response

200

Example response

{
  "data": [
    {
      "id": "0x87d64edd7ada803b33614740a729bc1289467cba2a2fca714f2860313a7f81ac",
      "type": "ledger",
      "attributes": {
        "type": "Bank Transfer In",
        "status": "completed",
        "idempotencyId": "SUBSCRIPTION_0cd2163dc32dfdb76250db29f58da2ec",
        "contractId": "contract_d176576dfb1a498ead53d2b5f77e41b4",
        "transactionReference": "Transfer",
        "counterpartyDetails": {
          "counterpartyName": "JOHN DOE",
          "counterpartyBank": "DBS",
          "counterpartyBankSwiftBic": "DBSSSGSGXXX",
          "counterpartyBankAccountNo": "012345678"
        },
        "creditDebitIndicator": "Credit",
        "amount": 0.01,
        "ledgerBalance": 5662.39,
        "currency": "XSGD",
        "createdAt": "2024-06-03T15:28:16.088+08:00"
      }
    }
  ],
  "meta": {
    "total": 3,
    "pages": 1,
    "openingBalance": 5662.38,
    "openingBalanceTimestamp": "2024-06-01T00:00:00.000+08:00",
    "closingBalance": 5652.38,
    "closingBalanceTimestamp": "2024-06-07T00:00:00.000+08:00"
  },
  "links": {
    "self": "https://api.straitsx.com/v1/merchant/statements/account-statement?filter[currency]=xsgd&filter[from]=2024-06-01T00:00:00.000000 08:00&filter[to]=2024-06-07T00:00:00.999999 08:00&page[size]=50&page[number]=1"
  }
}