Blockend
HomeLive Demo
BlockEnd Labs
BlockEnd Labs
  • About BlockEnd
    • Overview
    • 🎯Thesis
    • 🧭Compass
    • 🌊LEX Protocol
  • ⚡Compass Widgets
    • Widget Pro
      • Install Widget Pro
      • Customise Widget Pro
    • Widget Lite
  • 👨‍💻Compass API
    • API Reference
      • Getting Started
      • Authentication
      • Fetching Quotes
      • Create Transaction
      • Get Raw Transaction To Execute
      • Check Transaction Status
      • Gasless Swaps
      • Type Definations
      • Get Supported Chains & Tokens
    • Quick Swap API
    • SDK
      • Getting Started
      • Configuration
      • Core Methods
        • getQuotes
        • Create Transaction
        • getNextTxn
        • Check Status
        • pollTransactionStatus
        • executeQuote
        • executeTransaction
      • Gasless Transactions
      • Tokens and Chains
    • Supported Chains
    • Liquidity Sources
  • Code Examples
    • EVM Swaps
    • EVM to SOL Bridge
    • SOLANA Swaps
    • Solana to EVM Bridge
  • Resources
    • Brand Assets
  • Troubleshooting
    • React issues
    • Next js issues
Powered by GitBook
On this page
  • Endpoint: GET /status
  • Query params
  • Response:
  • Example

Was this helpful?

  1. Compass API
  2. API Reference

Check Transaction Status

After user signs and submits the transaction on chain, check the status of the transaction by passing in the signature hash of the transaction. You need to keep polling this api to get the status of the transaction. Once the status response is success, you can proceed to the next step of the transaction (if any).

Endpoint: GET /status

Query params

/status?
    routeId=
    &stepId=
    &txnHash=

Response:

{
    routeId: string;
    stepId: string;
    status: TxnStatus;
    srcTxnHash?: string;
    srcTxnUrl?: string;
    destTxnHash?: string;
    destTxnUrl?: string;
    points?: number;
}

Example

Now, let check the status of the transaction we fetched in the previous step.

Request:

https://api2.blockend.com/v1/status
    ?routeId=01J2WB2ZTWAWXN9K48899CSSVN
    &stepId=01J2WB3JEB34B0A1SXHT1E3B63
    &txnHash=0x3d7bdcfac0062b3c9ae1e4045bc43600c2c55c560dde7eebd2a15afb5ba1c390

Response:

{
    "status": "success",
    "data": {
        "routeId": "01J2WB2ZTWAWXN9K48899CSSVN",
        "stepId": "01J2WB3JEB34B0A1SXHT1E3B63",
        "status": "success",
        "srcTxnHash": "0x3d7bdcfac0062b3c9ae1e4045bc43600c2c55c560dde7eebd2a15afb5ba1c390",
        "srcTxnUrl": "https://polygonscan.com/tx/0x3d7bdcfac0062b3c9ae1e4045bc43600c2c55c560dde7eebd2a15afb5ba1c390"
    }
}
PreviousGet Raw Transaction To ExecuteNextGasless Swaps

Last updated 3 months ago

Was this helpful?

👨‍💻