MetaPath API
  • API Introduction
    • General Instruction
    • Major Blockchain Name Conventions
  • Cross-platform Aggregator Interface
    • Token Swap Flow
    • Get <The Token List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <BlackList> Interface
  • Upload gas free orders
  • Aggregate NFTs Interface V1.0
    • Get <Basic Information> Interface
    • Get <NFT List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • Get <NFT List Held by User> Interface
  • Aggregate NFTs Interface V2.0
    • Get <Latest Collections> Interface
    • Get <Top NFT Collections> Interface
    • <List Page> Interface
    • Get <NFT Details> Interface
    • Get <NFT Details> Other Related Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <Batch Purchase> Interface
  • List Related Interface
    • Get <User's NFT> Interface
    • Get <Listed NFT List (My List)> Interface
    • <Create/Update Listing> Interface
    • <Create/Update Listing in the Backend> Interface
    • <Cancel Listing> Interface
    • <Change Listing> Interface
  • Swap Information Related Interface
    • <Add Swap Information> Interface
    • <Get Swap Information List> Interface
    • <Get Detailed Transation Infromation > Interface
Powered by GitBook
On this page
  1. Swap Information Related Interface

<Get Detailed Transation Infromation > Interface

Get transaction detail through checking transaction hash

Previous<Get Swap Information List> Interface

Last updated 9 months ago

Request Address: /api/exchangeRecord/getTransDetail

API Address:

Request Method: POST

Request Parameter:

Field Name
Field Description
Type
Required or not
Notes

hash

Transaction hash

string

Y

Original chain hash I

Output Parameter:

Field Name
Field Description
Type

txHash

Transaction hash

string

fromTokenAddress

Original token contract address

string

fromTokenSymbol

Original token symbol

string

fromTokenUrl

Original token logo address

string

toTokenAddress

Target contract address

string

toTokenSymbol

Target token symbol

string

toTokenUrl

Target token logo address

string

fromAmount

Original token amount, divided by decimal

decimal

toTokenAmount

Target token amount, divided by decimal

decimal

finalStatus

Current status: pending:Processing, success:Succeed, fail: failed,wait_kyc:wait for kyc, wait_refund: wait for return, refund_complete: Return tokens, wait_deposit_send_fail: Deposit coin failure, timeout: Coins were not deposit at the specified time, wait_for_information: Abnormal order

string

createTime

Create time

string

status

Swap status, first element is the original chain swap status, second element is the target chain swap status

array

Input Example:

https://api-swap.paths.finance/api/exchangeRecord/getTransDetail
{
    "hash":"0xb299ba2f7fb2c038244b76c227b70deaf8706ce88bec3732f6833ce92a457696"
}

Output Example:

{
    "data": {
        "estimatedTime": 1,
        "finalStatus": "success",
        "isNoGas": "0",
        "fromTokenSymbol": "BNB",
        "receiveAddress": "0xf5a4170c83d9267b9344eb284d3fc31329e72843",
        "fromAmount": "0.02",
        "fromTokenUrl": "https://images.swft.pro/inch1/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c.png",
        "dexName": "Aggregator",
        "logoUrl": "https://images.swft.pro/dex/path.png",
        "toTokenAddress": "0x55d398326f99059ff775485246999027b3197955",
        "toTokenAmount": "6.083530525158479",
        "refundAddress": "0xf5a4170c83d9267b9344eb284d3fc31329e72843",
        "toTokenSymbol": "USDT",
        "toTokenUrl": "https://images.swft.pro/inch1/0xdac17f958d2ee523a2206206994597c13d831ec7.png",
        "toTokenChain": "BSC",
        "createTime": "2024-01-09 17:14:32",
        "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "txHash": "0xb299ba2f7fb2c038244b76c227b70deaf8706ce88bec3732f6833ce92a457696",
        "fromTokenChain": "BSC",
        "createTimeT": 1704791672000,
        "status": [
            {
                "chain": "BSC",
                "txHash": "0xb299ba2f7fb2c038244b76c227b70deaf8706ce88bec3732f6833ce92a457696",
                "url": "https://bscscan.com/tx/0xb299ba2f7fb2c038244b76c227b70deaf8706ce88bec3732f6833ce92a457696",
                "status": "success"
            }
        ]
    },
    "resCode": 100,
    "resMsg": "success"
}
```

Postman Call Example

https://api-swap.paths.finance