Skip to main content
GET
GET /transactions/{hash} returns the on-chain status of a transaction on the chain you name in ?chainId=: pending, success, reverted or not_found, with its block number, confirmations and gas used once it’s mined. It works for any transaction on a chain from GET /chains, not only Olympex swaps: use it to confirm an approval, or a swap you sent with calldata from POST /swap. For the bridge leg of a cross-chain transfer, use POST /tx-status.

When to use it

For a cross-chain transfer, use both: confirm the source transaction here, then poll POST /tx-status until the transfer is final.

Read the status

blockNumber and gasUsed are null, and confirmations is 0, until the transaction is mined. confirmations counts the block that included the transaction. gasUsed is a decimal string, and hash comes back in lowercase.

Poll after you broadcast

  • Start right away. An unknown hash returns 200 with not_found, not an error, so you can poll as soon as you broadcast.
  • Poll at a steady pace, for example every 5 to 15 seconds depending on the chain’s block time. Results are cached for a few seconds, so polling faster returns the same answer.
  • Sign every attempt again. Nonces are single-use, and the reference clients sign each call for you.
  • Retry 500 TX_STATUS_ERROR with backoff. It means the request to the chain’s RPC failed, not that the transaction failed. Stop on a 400: fix the hash or the chainId instead of retrying.
  • Set a deadline that fits the chain. If the status is still pending or not_found when it passes, check the transaction in a block explorer and in your wallet.
The endpoint reads only the chain you name. A hash sent with another chain’s chainId returns not_found, exactly like a transaction that was never broadcast, so always send the chain you broadcast on. It reports only the receipt status: it doesn’t check which contract the transaction called, so success doesn’t prove that the transaction was an Olympex swap.

Authorizations

x-api-key-id
string
header
required

Your API key ID (UUID). See Sign requests.

x-value-info
string
header
required

Base64 of timestamp + "\n" + nonce + "\n" + bodyHash, where timestamp is Unix seconds, nonce is 24 new hexadecimal characters and bodyHash is the unpadded base64url SHA-256 of the canonical body.

x-passphrase
string
header
required

Your account passphrase. Treat it like the secret key.

x-signature
string
header
required

Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with \n, with no trailing newline: OLPX-HMAC-SHA256-V2, timestamp, nonce, the uppercase method, path, canonicalQuery and bodyHash. path is the request path including /api/v1, without the query string, for example /api/v1/limit-order/<id>. canonicalQuery is the query parameters decoded (+ is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with &, or the empty string when there is no query. Headers signed for one request are rejected on any other. See Sign requests.

Path Parameters

hash
string
required

Transaction hash: 0x and 64 hexadecimal characters.

Pattern: ^0x[0-9a-fA-F]{64}$

Query Parameters

chainId
integer
required

Chain ID, for example 137. It must be one of the chains from GET /chains.

Required range: x >= 1

Response

Transaction status. An unknown hash returns not_found, not an error.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required