> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dzap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Status

> Track a trade (swap or bridge) transaction - single or batch.

Returns step-level status for a trade. Cross-chain trades are async; poll until the status reaches a terminal state (`COMPLETED`, `FAILED`, `PARTIAL`, or `REFUNDED`).

### Query

Either `txHash` or `txId`, always paired with `chainId`:

<ParamField query="txHash" type="string">On-chain transaction hash from the executed trade.</ParamField>

<ParamField query="txId" type="string">The DZap transaction ID returned when building the trade.</ParamField>

<ParamField query="chainId" type="integer" required>Chain ID where the transaction was executed.</ParamField>

### Response

<ResponseField name="status" type="string">Overall status: `COMPLETED`, `FAILED`, `PENDING`, `PARTIAL`, or `REFUNDED`.</ResponseField>

<ResponseField name="gasless" type="boolean" />

<ResponseField name="txHash" type="string" />

<ResponseField name="chainId" type="integer" />

<ResponseField name="timestamp" type="integer">Unix timestamp.</ResponseField>

<ResponseField name="type" type="string">`swap`, `bridge`, or `zap`.</ResponseField>

<ResponseField name="transactions" type="object[]">
  One entry per leg of the trade.

  <Expandable title="transaction leg">
    <ResponseField name="status" type="string">`COMPLETED`, `FAILED`, `PENDING`, `PARTIAL`, or `REFUNDED`.</ResponseField>

    <ResponseField name="source" type="object">
      <Expandable title="source">
        <ResponseField name="asset" type="object">
          <Expandable title="asset">
            <ResponseField name="contract" type="string" />

            <ResponseField name="chainId" type="integer" />

            <ResponseField name="name" type="string" />

            <ResponseField name="symbol" type="string" />

            <ResponseField name="decimals" type="integer" />

            <ResponseField name="logo" type="string" />

            <ResponseField name="underlyingTokens" type="object[]">Present for LP/vault tokens: `{ chainId, address, name?, symbol, decimals, logo? }`.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="amount" type="string" />

        <ResponseField name="amountUSD" type="number" />

        <ResponseField name="txHash" type="string" />

        <ResponseField name="account" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="destination" type="object">Same shape as `source` above, plus an optional `timestamp`.</ResponseField>

    <ResponseField name="expected" type="object">Expected destination amount before execution (same shape as `source` above, minus `txHash`/`status`).</ResponseField>

    <ResponseField name="provider" type="object">`{ id, name, icon }`.</ResponseField>

    <ResponseField name="allowUserTxOnDestChain" type="boolean">Whether the user needs to take action on the destination chain.</ResponseField>

    <ResponseField name="message" type="string">Human-readable detail, especially on failure.</ResponseField>

    <ResponseField name="protocolExplorerLink" type="string">Link to the provider's own tracking page.</ResponseField>
  </Expandable>
</ResponseField>

## Batch status

```
GET https://api.dzap.io/v1/status/multi
```

Check several transactions in one call. Accepts comma-separated `txHashes`/`txIds` aligned positionally to comma-separated `chainIds`, and returns an **array** of the same response shape as above.

<ParamField query="txHashes" type="string">Comma-separated transaction hashes.</ParamField>

<ParamField query="txIds" type="string">Comma-separated DZap transaction IDs.</ParamField>

<ParamField query="chainIds" type="string" required>Comma-separated chain IDs, aligned to `txHashes`/`txIds`.</ParamField>

### Examples

<RequestExample>
  ```bash single theme={null}
  curl "https://api.dzap.io/v1/status?txHash=0xabc...&chainId=42161"
  ```

  ```bash batch theme={null}
  curl "https://api.dzap.io/v1/status/multi?txHashes=0x123...,0x456...&chainIds=1,42161"
  ```

  ```ts SDK theme={null}
  const status = await dzap.getTradeTxnStatus({
    txHash: '0xabc...',
    chainId: 42161,
  });

  const multiStatus = await dzap.getTradeMultiTxnStatus({
    txHashes: '0x123...,0x456...',
    chainIds: '1,42161',
  });
  ```
</RequestExample>

<ResponseExample>
  ```json single theme={null}
  {
    "status": "COMPLETED",
    "gasless": false,
    "txHash": "0xabc...",
    "chainId": 42161,
    "timestamp": 1714117200,
    "type": "bridge",
    "transactions": [
      {
        "status": "COMPLETED",
        "source": { "asset": { "contract": "0xaf88...", "chainId": 42161, "symbol": "USDC" }, "amount": "1000000", "amountUSD": 1.0, "txHash": "0xabc...", "account": "0x99BC..." },
        "destination": { "asset": { "contract": "0x4200...", "chainId": 8453, "symbol": "WETH" }, "amount": "300000000000000", "amountUSD": 0.99, "txHash": "0xdef...", "account": "0x99BC...", "timestamp": 1714117290 },
        "provider": { "id": "across", "name": "Across", "icon": "https://..." },
        "allowUserTxOnDestChain": false
      }
    ]
  }
  ```
</ResponseExample>
