Msgport API
    Msgport API
    • API v2 - ORMP
      POST

      API v2 - ORMP

      POST
      https://api.msgport.xyz/v2/fee_with_options
      The Msgport ORMP API facilitates message sending and delivery. Users can obtain the estimated cross-chain fee and necessary parameters required for sending cross-chain messages with Msgport.

      Request

      Body Params application/json
      fromChainId
      integer 
      required
      fromAddress
      string 
      required
      toChainId
      integer 
      required
      toAddress
      string 
      required
      message
      string 
      required
      ormp
      object 
      required
      refundAddress
      string 
      required
      gasLimit
      string 
      optional
      Example
      {
        "fromChainId": 701,
        "fromAddress": "0xB83DfEF3e748cc2cb89Da1016fB39dDF86743602",
        "toChainId": 11155111,
        "toAddress": "0xB5B87E611C742118B7e6d998458d08BB7EC54867",
        "message": "0x5b4ef819",
        "ormp": {
          "refundAddress": "0x6Bc9543094D17f52CF6b419FB692797E48d275d0"
        }
      }

      Request samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.msgport.xyz/v2/fee_with_options' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "fromChainId": 701,
          "fromAddress": "0xB83DfEF3e748cc2cb89Da1016fB39dDF86743602",
          "toChainId": 11155111,
          "toAddress": "0xB5B87E611C742118B7e6d998458d08BB7EC54867",
          "message": "0x5b4ef819",
          "ormp": {
              "refundAddress": "0x6Bc9543094D17f52CF6b419FB692797E48d275d0"
          }
      }'

      Responses

      🟢200Success
      application/json
      Body
      code
      integer 
      required
      data
      object 
      required
      fee
      string 
      required
      params
      string 
      required
      gas
      object 
      required
      Example
      {
        "code": 0,
        "data": {
          "fee": "5339556000000000000000",
          "params": "0x000000000000000000000000000000000000000000000000000000000000c6120000000000000000000000009f33a4809aa708d7a399fedba514e0a0d15efa8500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
          "gas": {
            "protocol": "0",
            "msgport": "42255",
            "total": "50706"
          }
        }
      }
      Modified at 2024-07-01 07:33:37
      Built with