WalletD developers
Postings

Post many transactions atomically, in order

Posts many transactions as one atomic unit, in request order: every transaction commits or none does, under a single Idempotency-Key whose stored result covers the whole batch.

POST/v1/ledgers/{ledgerId}/postings/batch

Posts many transactions as one atomic unit, in request order: every transaction commits or none does, under a single Idempotency-Key whose stored result covers the whole batch. Accounts are locked in sorted id order across the batch to keep the lock order discipline the single-posting path uses. A batch member may not carry post_pending_id - consuming a pending takes a lock the batch's ordering cannot safely acquire, so that posting goes on its own and the batch refuses with invalid. An empty batch or one past the size limit is also invalid.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

ledgerId*string
Formatuuid

Header Parameters

Idempotency-Key*string

Replays return the original response byte-identically within the retention window.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/ledgers/497f6eca-6276-4993-bfeb-53cbbbba6f08/postings/batch" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "postings": [      {        "type": "string",        "legs": [          {            "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",            "direction": "credit",            "amount": 1,            "commodity": "string"          },          {            "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",            "direction": "credit",            "amount": 1,            "commodity": "string"          }        ]      }    ]  }'
[  {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "type": "string",    "status": "string",    "reference_id": "97c1ff22-6e4f-4821-b1d3-5236781d37b8",    "metadata": {      "property1": "string",      "property2": "string"    },    "exchange_id": "6e73ee7b-fdf3-44c2-947d-260c3ee72506",    "reverses_txn_id": "5b70dad8-f43f-45eb-afbd-821f57facc93",    "reversed_by": "69b6d93a-63e5-4842-b5ef-0ace8f62b2a4",    "legs": [      {        "owner_type": "string",        "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05",        "purpose": "string",        "direction": "credit",        "amount": 0,        "commodity": "string"      }    ],    "effective_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  }]