Aptos · Example Payload

Wait_Transaction_By_Hash

Same as /transactions/by_hash, but will wait for a pending transaction to be committed. To be used as a long poll optimization by clients, to reduce latency caused by polling. The "long" poll is generally a second or less but dictated by the server; the client must deal with the result as if the request was a normal /transactions/by_hash request, e.g., by retrying if the transaction is pending.

Transactions

Wait_Transaction_By_Hash is an example object payload from Aptos, with 9 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

methodpathoperationIdsummarydescriptiontagsparametersrequestBodyresponses

Example Payload

Raw ↑
{
  "method": "GET",
  "path": "/transactions/wait_by_hash/{txn_hash}",
  "operationId": "wait_transaction_by_hash",
  "summary": "Wait for transaction by hash",
  "description": "Same as /transactions/by_hash, but will wait for a pending transaction to be committed. To be used as a long\npoll optimization by clients, to reduce latency caused by polling. The \"long\" poll is generally a second or\nless but dictated by the server; the client must deal with the result as if the request was a normal\n/transactions/by_hash request, e.g., by retrying if the transaction is pending.",
  "tags": [
    "Transactions"
  ],
  "parameters": [
    {
      "name": "txn_hash",
      "in": "path",
      "required": true,
      "description": "Hash of transaction to retrieve",
      "schema": {
        "$ref": "#/components/schemas/HashValue"
      }
    }
  ],
  "requestBody": null,
  "responses": {
    "200": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/Transaction"
      },
      "example": {}
    },
    "400": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "403": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "404": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "410": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "500": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "503": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    }
  }
}