# MOV General API

Field Value
HTTP_SERVER_ENDPOINT https://ex.movapi.com/vapor

# Gets the Utxo of account

Get all Utxo by account

# Request

POST /v3/q/utxos

# Params

Parameter Required Type Description
start no Int default 0
limit no Int default 10

# Body

Field Required Type Description
filter no Object The filter
script no String Assets in an account
asset no String buy or sell
sort no Object Sort Object
by no String The sort of key
order no String Lifting sequence, desc or asc

# Response

Field Type Description
hash String hash
asset String Asset code
amount Int The amount of asset
# Request
POST https://ex.movapi.com/vapor/v3/q/utxos?limit=2
{
    "filter":{
        "script":"00147a6cfb076a560b9a37c4fd6ca2acc66f85b64a21",
        "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
    },
    "sort":{
        "by":"amount",
        "order":"desc"
    }
}

# Response
{
    "code": 200,
    "msg": "",
    "data": [
        {
            "hash": "f26d6ca7ebdbecd302cb70a7c5b3b26e47880241a505946a111bbdbeb91151f7",
            "asset": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "amount": 336000
        },
        {
            "hash": "0a418603b0fa5c5dc207b2c27a40845b25f2d42c1481dea30c634216d1384512",
            "asset": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "amount": 10000000
        }
    ],
    "pagination": {
        "start": 0,
        "limit": 2,
        "_links": {
            "next": "/bytom/v3/q/utxos?limit=10&start=10"
        }
    }
}

# Access to account information

Get account information based on account address

# Request

GET /v3/account/address

# Params

Parameter Required Type Description
address yes String The account address

# Response

Field Type Description
asset Object hash
asset_id String Asset code
symbol String The name of asset
balance String Assets balance
available_balance String Asset available balance
total_received String The number of assets received
total_sent String The number of assets sent
in_usd String The total value of the assets in USD
in_cny String The total value of the assets in RMB
in_btc String The total value of the assets in Bitcoins
# Request
GET https://ex.movapi.com/vapor/v3/account/address?address=vp1qjzjd9fqsdl5a2ft4gwm526kene8pddnw6kakhn

# Response
{
   "code":200,
   "msg":"",
   "data":{
      "address":"vp1qhg8qjtd5e3thlem569fmt8l8uc6xyd2nmsscks",
      "label":"",
      "balances":[
         {
            "asset":{
               "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
               "symbol":"BTM"
            },
            "balance":"18.67621",
            "available_balance":"18.67621",
            "total_received":"7997.10581",
            "total_sent":"7978.4296",
            "in_usd":"1.15",
            "in_cny":"8.16",
            "in_btc":"0.000132"
         },
         {
            "asset":{
               "asset_id":"bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
               "symbol":"BTC"
            },
            "balance":"0",
            "available_balance":"0",
            "total_received":"0.01",
            "total_sent":"0.01",
            "in_usd":"0.00",
            "in_cny":"0.00",
            "in_btc":"0.000000"
         },
         {
            "asset":{
               "asset_id":"78de44ffa1bce37b757c9eae8925b5f199dc4621b412ef0f3f46168865284a93",
               "symbol":"ETH"
            },
            "balance":"0",
            "available_balance":"0",
            "total_received":"0.1",
            "total_sent":"0.1",
            "in_usd":"0.00",
            "in_cny":"0.00",
            "in_btc":"0.000000"
         },
         {
            "asset":{
               "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
               "symbol":"USDT"
            },
            "balance":"0.037415",
            "available_balance":"0.037415",
            "total_received":"147.690972",
            "total_sent":"147.653557",
            "in_usd":"0.04",
            "in_cny":"0.26",
            "in_btc":"0.000004"
         }
      ],
      "votes":[

      ]
   }
}

# Build payment

Construct a transfer transaction

# Request

POST /vapor/v3/merchant/build-payment

# Params

Parameter Required Type Description
address yes String The account address

# Body

Field Required Type Description
asset yes String Asset id
recipients yes Array Receiver array
address yes String Receiving address
amount yes String Amount received
confirmations yes Int Confirmation number
memo no String Additional information
forbid_chain_tx no Boolean Ban chain trading

# Response

Field Type Description
tx Object The object of transaction
hash String Transaction hash
status_fail Bool Whether the transaction is an invalid transaction with an exhausted fee
size Int Transaction size
submission_timestamp Int The timestamp of the transaction submission
memo String Memo message
inputs Array UTXO input
script String Script address
address String address
asset String asset ID
amount Int The amount of assets
type String UTXO type
outputs Array UTXO output
script String Script address
address String address
asset String asset ID
amount Int The amount of assets
type String UTXO type
fee Int Transaction Fee
balances Array Change of asset amount
asset String asset ID
amount Int The amount of assets
types Array Transaction type
chain_tx: The deal to merge UTXO
mov_matched_tx: MagnEx contracts are traded
mov_place_order: MagnEx Contract Maker deal
mov_cancel_order: Cancel order
raw_transaction String Transaction information to be signed
signing_instructions Array The information required to sign the transaction
derivation_path Array The derived path
sign_data Array The signature data
pubkey String The public key
  • Example:
# Request
POST https://ex.movapi.com/vapor/v3/merchant/build-payment?address=vp1qzftmh4ad5kzqrtsy4jfs088xyw5dyjagzyudcg
{
    "asset": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "recipients": {
        "vp1qzftmh4ad5kzqrtsy4jfs088xyw5dyjagzyudcg": 1,
    },
    "confirmations": 1,
    "memo": "中本聪",
    "forbid_chain_tx": False
}
    
# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "tx":{
            "hash":"6e404c158e6e74f2eac0940ab83b2b9ebebf6acdf9483f02c4d7604b60d84450",
            "status":True,
            "size":279,
            "submission_timestamp":0,
            "memo":"memo",
            "inputs":[
               {
                  "script":"00147e73cdef5ccfff19a41d6682b458dfc1702adef2",
                  "address":"bm1q0eeumm6uell3nfqav6ptgkxlc9cz4hhjjhazgl",
                  "asset":{
                     "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                     "symbol":"BTM"
                  },
                  "amount":"12.95061",
                  "type":"spend"
               }
            ],
            "outputs":[
               {
                  "utxo_id":"06f7ddb720414ca28adafb8f17a4c5e97353c0871f10832fdd05000172d98ea6",
                  "script":"0020f86826d640810eb08a2bfb706e0092273e05e9a7d3d71f9d53f4f6cc2e3d6c6a",
                  "address":"bm1qlp5zd4jqsy8tpz3tldcxuqyjyulqt6d860t3l82n7nmvct3ad34qfktwv7",
                  "asset":{
                     "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                     "symbol":"BTM"
                  },
                  "amount":"1",
                  "type":"crosschain_output"
               },
               {
                  "utxo_id":"a087fed1e5a85892d2629097c687f946417fd1caaeb7969054018166beb81bbd",
                  "script":"00147e73cdef5ccfff19a41d6682b458dfc1702adef2",
                  "address":"bm1q0eeumm6uell3nfqav6ptgkxlc9cz4hhjjhazgl",
                  "asset":{
                     "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                     "symbol":"BTM"
                  },
                  "amount":"11.94612",
                  "type":"control"
               }
            ],
            "fee":"0.00449",
            "balances":[
               {
                  "asset":{
                     "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                     "symbol":"BTM"
                  },
                  "amount":"-1"
               }
            ],
            "types":[
               "out_crosschain"
            ]
         },
         "raw_transaction":"0701b4ac1c010160015eacb38e7be05ca145e9f997b4a34dd2face5d281a7b0e98c4985c9c51c19166a8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88a0c4e90401011600147e73cdef5ccfff19a41d6682b458dfc1702adef2220120396e19350e81e4eb60bffa96cdac2e9485257a143bbd97b4535c3695d17a8428020148ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80c2d72f01220020f86826d640810eb08a2bfb706e0092273e05e9a7d3d71f9d53f4f6cc2e3d6c6a00013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0aad1b904011600147e73cdef5ccfff19a41d6682b458dfc1702adef200",
         "signing_instructions":[
            {
               "derivation_path":[
                  "2c000000",
                  "99000000",
                  "01000000",
                  "00000000",
                  "01000000"
               ],
               "sign_data":[
                  "9bbda8d1c79053169901a9c0f5f404064980a86c79775c3bd76e5f69330a811c"
               ],
               "pubkey":"396e19350e81e4eb60bffa96cdac2e9485257a143bbd97b4535c3695d17a8428"
            }
         ]
      }
   ]
}

# Submit transaction

Submit the signature information for the transaction

# Request

POST /v3/merchant/submit-payment

# Params

Parameter Required Type Description
address yes String The account address

# Body

Field Required Type Description
raw_transaction yes String The data returned by the Submittion-Payment interface
signatures yes Array The signature data
memo no String Transaction note

# Response

Field Type Description
tx_hash String Transaction hash
  • Example:
# Request
POST https://ex.movapi.com/magnet/v3/merchant/submit-payment?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3

# Body
{
    "raw_transaction":"070100010160015e26978b848afd77d559980e58db9b60559b716312bd1e24af7e44c6efa5c1605dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0a885fd0201011600140ff923ae0944af0cfdd3eb3671db354eaa6b5795220120c44537a8d397ee09315755cd77fd02d66db015f32ba358c3bfafe20d887d041202013cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80c2d72f011600141e03ad3233693b551be8c86f5db062bdbe0c9f6600013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8b292cd02011600140ff923ae0944af0cfdd3eb3671db354eaa6b579500",
    "signatures":[
        [
            "4f5e0b94f983ab6d98c230e7edf031951c93809af318d0bb6c362714794c38c5939df58e43ac1a45599d777386724354c0ced7bab54d19bac02c233fa9e2050a"
        ]
    ],
    "memo":"mock transaction"
}

# Response
{
    "code": 200,
    "msg": "",
    "data": {
      "tx_hash": "e629f2f3eca0627eae0167f22a4a5e24c1495932624c1bcbeff064d4eeb219f0"
    }
}

# Build advanced transaction

Build advanced transaction data

# Request

POST /v3/merchant/build-advanced-tx

# Params

Parameter Required Type Description
address yes String The account address

# Body

Field Required Type Description
confirmations yes Int Block confirmation number
inputs yes Array Input array
script yes String Transaction note
address yes String Address
asset yes String Asset code
amount yes String Amount of assets
type yes String Input type
spend_utxo
spend_wallet
spend_address
outputs yes Array Outputs array
script yes String Transaction note
address yes String Address
asset yes String Asset code
amount yes String Amount of assets
type yes String Output type
control_address
control_program
fee yes String Transaction fee
forbid_chain_tx yes Boolean Ban chain trading

# Response

Field Type Description
tx Object The object of transaction
hash String Transaction hash
status_fail Bool Whether the transaction is an invalid transaction with an exhausted fee
size Int Transaction size
submission_timestamp Int The timestamp of the transaction submission
memo String Memo message
inputs Array UTXO input
script String Script address
address String address
asset Object The object of asset
asset_id String The asset ID
symbol String The asset code
amount Int The amount of assets
type String UTXO type
outputs Array UTXO output
script String Script address
address String address
asset String asset ID
amount Int The amount of assets
type String UTXO type
fee Int Transaction Fee
balances Array Change of asset amount
asset String asset ID
amount Int The amount of assets
types Array Transaction type
chain_tx: The deal to merge UTXO
mov_matched_tx: MagnEx contracts are traded
mov_place_order: MagnEx Contract Maker deal
mov_cancel_order: Cancel order
raw_transaction String Transaction information to be signed
signing_instructions Array The information required to sign the transaction
derivation_path Array The derived path
sign_data Array The signature data
pubkey String The public key
# Request
POST https://ex.movapi.com/vapor/v3/merchant/build-advanced-tx?address=vp1qzftmh4ad5kzqrtsy4jfs088xyw5dyjagzyudcg
{
    "confirmations":1,
    "fee":"0.4",
    "inputs":[
        {
            "amount":"1",
            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "type":"spend_wallet"
        },
        {
            "amount":"0.1",
            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "type":"spend_wallet"
        }
    ],
    "outputs":[
        {
            "type":"control_address",
            "amount":"99",
            "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
            },
            "address":"bm1q50u3z8empm5ke0g3ngl2t3sqtr6sd7cepd3z68"
        },
        {
            "type":"control_program",
            "amount":"99",
            "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
             },
            "control_program":"bm1q50u3z8empm5ke0g3ngl2t3sqtr6sd7cepd3z68"
        }
    ],
}
    
# Response
{
    "code":200,
    "msg":"mock",
    "result":{
        "data":[
          {
                "tx":{
                    "inputs":[
                        {
                            "script":"00147a8a16c665568c2f52e33c5fb373a3bd1fb7f2c1",
                            "address":"tm1q029pd3n926xz75hr830mxuarh50m0ukpw8g27u",
                            "asset":"0000000000000000000000000000000000000000000000000000000000000000",
                            "amount":"0",
                            "type":"spend"
                        }
                    ],
                    "outputs":[
                        {
                            "script":"00147a8a16c665568c2f52e33c5fb373a3bd1fb7f2c1",
                            "address":"tm1q029pd3n926xz75hr830mxuarh50m0ukpw8g27u",
                            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                            "amount":"412.5",
                            "type":"control"
                        }
                    ],
                    "fee":"0",
                    "balances":[
                        {
                            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                            "amount":"412.5"
                        }
                    ],
                    "hash":"eb4daea5edc379b6ab024c0e4ef963feafe6affcfe581d66f7ad3ec6d1828463"
                },
                "raw_transaction":"070100010160015e5978c52e0508cbf1cd901919277e4dba80fb4440b4771bbaa3b6c483f9264d21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8094ebdc0301011600143c21d88332683d060ccf905a0f26ce82907ac132220120f3a597b7a1f8b7b210790d5ceef145ae8616d025a6fdb4aec67338bf937af6b9020139ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6401160014f0928dc5f8878a4289b981d7c66386ff74be7fc300013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb4dfcfdc03011600143c21d88332683d060ccf905a0f26ce82907ac13200",
                "signing_instructions":[
                    {
                        "sign_data":[
                            "b9fb5dc0e7b7ee0e9c252439ec32fe6b222e0d170aee6b562634dfad3638560e"
                        ]
                    }
                ]
          }
        ]
    }
}
Last Updated: 11/13/2020, 4:46:12 PM