Butter Network
Github
  • 🌈About Butter Network
  • 🔥ZK Light Client
    • Understanding Light Client
    • Refactored ZK Light Client
  • 🔥Omnichain Development
    • Omnichain Isomorphism
    • More Possibilities
  • 🌈Butter Omnichain Messaging Integration
    • Introduction
    • Integration Guide
      • Message
      • Message with Ton
      • CALLDATA
      • Message And Relay
    • Contract Interface
    • Fee
    • Deployed Contracts
    • 👨‍💻API for Omnichain Message
      • GET Message History by Source Address
      • GET Message Info by Id
      • GET Message Info by Source Hash
  • 🔥Butter Bridge Integration
    • Integration Guide
    • Contract Interface
    • Fee
    • Deployed Contracts
  • 💰Butter Swap Integration
    • Introduction
    • 🟢Integration Guide
      • Contract Interface
      • Fee
    • Deployed Contracts
      • v2.1
    • 👩‍💻API for Routing
      • Integration Guide
      • GET /route
      • GET /swap
      • GET /routeAndSwap
      • GET /supportedChainList
      • GET /findToken
      • 🔴Error Code List
    • 👨‍💻API for Swap Data
      • GET Swap History by Source Hash
      • GET Swap History by Source Address
      • GET Swap Info by Order ID
      • GET Supported Chain Detail List
      • GET Supported Token Detail List
  • 💰Butter Swap User Guide
    • 🫂User Guide
  • Butter Swap SDK
    • Install
    • Config SDK
    • Request Routes
    • Execute Route
    • Others
  • Butter Swap Widget
    • Usage
  • 📢Resources
    • 🏠Website
    • 🫂Telegram
    • 📄X
Powered by GitBook
On this page
  1. Butter Swap Integration
  2. API for Swap Data

GET Swap Info by Order ID

PreviousGET Swap History by Source AddressNextGET Supported Chain Detail List

Last updated 11 months ago

GET /api/queryCrossInfoByOrderId

Complete Query Example

Request Params

Name

Location

Type

Required

Description

orderId

query

string

yes

order id

Responses

HTTP Status Code

Meaning

Description

Data schema

200

成功

Inline

Responses Data

Name

Type

Description

info

JSONObject

Result data info.

Responses Params

Name

Type

Description

fromChain

JSONObject

Source Chain Info.

- chainId

String

Chain Id.

- chainName

String

Chain name.

- scanUrl

String

Explorer Url.

- chainImg

String

Chain Icon Url.

relayerChain

JSONObject

Relayer Chain Info.

- chainId

String

Chain Id.

- chainName

String

Chain name.

- scanUrl

String

Explorer Url.

- chainImg

String

Chain Icon Url.

toChain

JSONObject

Destination Chain Info.

- chainId

String

Chain Id.

- chainName

String

Chain name.

- scanUrl

String

Explorer Url.

- chainImg

String

Chain Icon Url.

tokenAddress

String

Source Token Address.

tokenSymbol

String

Source Token Symbol.

timestamp

String

Source Transfer Time.

completeTime

String

Cross chain completion time.

amount

decimal

Cross amount.

inAmount

decimal

Receive amount.

fee

decimal

Fee amount.

state

Integer

Cross state, 0: crossing, 1: completed

sourceHash

String

Source Chain Transaction Hash.

relayerHash

String

Relayer Chain Transaction Hash, null if no relay chain is required

toHash

String

Destination Chain Transaction Hash,When not completed, the destination chain hash is null.

sourceAddress

String

Cross address.

toAddress

String

Receive address.

sourceToken

JSONObject

Source Token Info.

- chainId

BigInteger

Chain Id.

- address

String

Token address.

- name

String

Token name.

- symbol

String

Token symbol.

- decimal

Integer

Token decimal.

- icon

String

Token icon url.

destinationToken

JSONObject

Destination Token Info.

- chainId

BigInteger

Chain Id.

- address

String

Token address.

- name

String

Token name.

- symbol

String

Token symbol.

- decimal

Integer

Token decimal.

- icon

String

Token icon url.

feeToken

JSONObject

Fee Token Info.

- chainId

BigInteger

Chain Id.

- address

String

Token address.

- name

String

Token name.

- symbol

String

Token symbol.

- decimal

Integer

Token decimal.

- icon

String

Token icon url.

Response Examples

200 Response

{
  "code": 200,
  "message": "success",
  "data": {
    "info": {
      "fromChain": {
        "id": 3,
        "chainId": "56",
        "chainName": "BNB Chain",
        "scanUrl": "https://bscscan.com/",
        "chainImg": "https://files.maplabs.io/bridge/bsc.png"
      },
      "relayerChain": {
        "id": 1,
        "chainId": "22776",
        "chainName": "MAP Relayer Chain",
        "scanUrl": "https://mapscan.io/",
        "chainImg": "https://cdn.befiwalletdao.com/image/icon_local_map_checked_3gfyyv.png"
      },
      "toChain": {
        "id": 1,
        "chainId": "22776",
        "chainName": "MAP Relayer Chain",
        "scanUrl": "https://mapscan.io/",
        "chainImg": "https://cdn.befiwalletdao.com/image/icon_local_map_checked_3gfyyv.png"
      },
      "tokenAddress": "0x55d398326f99059fF775485246999027B3197955",
      "tokenSymbol": "USDT",
      "timestamp": "2023-07-27T12:21:22.000+00:00",
      "completeTime": "2023-07-27T12:23:58.000+00:00",
      "amount": 793.9679079533888,
      "inAmount": 793.1739400454354,
      "fee": "0.793967907953388772USDT",
      "state": 1,
      "sourceHash": "0xfa26d7abef03d57a938b675a46e9fb2edc15003cf50c99c73eeac2de0183d166",
      "relayerHash": null,
      "toHash": "0xf56080d26a008eaecba32e3f99ee38016554cc0ba2a20127b24b81b33dc0d36a",
      "sourceAddress": "0xecef0d873d909730da0f446d3afac15ef19b45b1",
      "toAddress": "0xa06e0f8851438115628c5780480c53017d405e4e",
      "fromTokenDecimal": 18,
      "sourceToken": {
        "id": 37,
        "chainId": 56,
        "address": "0x55d398326f99059fF775485246999027B3197955",
        "name": "USDT",
        "symbol": "USDT",
        "icon": null,
        "decimal": 18,
        "isMainCurrency": 0
      },
      "destinationToken": {
        "id": 36,
        "chainId": 22776,
        "address": "0x33daba9618a75a7aff103e53afe530fbacf4a3dd",
        "name": "USDT",
        "symbol": "USDT",
        "icon": null,
        "decimal": 18,
        "isMainCurrency": 0
      },
      "feeToken": {
        "id": 36,
        "chainId": 22776,
        "address": "0x33daba9618a75a7aff103e53afe530fbacf4a3dd",
        "name": "USDT",
        "symbol": "USDT",
        "icon": null,
        "decimal": 18,
        "isMainCurrency": 0
      }
    }
  }
}

💰
👨‍💻
https://bs-app-api.chainservice.io/api/queryCrossInfoByOrderId?orderId=0x77bff147b48d8e01349aa4e8c0d494674620890a1f340471a08fe795b0eb290e
OK