# BlockCenter-MOV API

BaseURL:https://ex.movapi.com


# 查询余额

查询指定地址中的余额

# Request

GET /vapor/v3/account/address

# Params

  • String-address:地址

# Response

  • String - address, 地址
  • Sstring - label, 账户标签
  • String - asset, 资产ID
  • String - balance, 账户资产余额
  • String - available_balance, 账户可用余额
  • String - total_received, 总接收资产余额
  • String - total_sent, 总发送资产余额
  • String - name, 资产名称
  • String - symbol, 资产标识
  • String - in_usd, 账户资产余额换算成usd的价格
  • String - in_cny, 账户资产余额换算成cny的价格
  • String - in_btc, 账户资产余额换算成btc的价格
  • String - vote, 投票
  • String - total, 投票BTM数量
  • String - locked, 锁定BTM数量

示例:

# Request
GET https://ex.movapi.com/vapor/v3/account/address?address=vp1qjzjd9fqsdl5a2ft4gwm526kene8pddnw6kakhn

# Response
{
    "code": 200,
    "msg": "",
    "data": {
        "address": "vp1qjzjd9fqsdl5a2ft4gwm526kene8pddnw6kakhn",
        "label": "",
        "balances": [
            {
                "asset": {
                    "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                    "symbol": "BTM",
                    "name": "Bytom"
                },
                "balance": "0.92816",
                "available_balance": "0.92816",
                "total_received": "6",
                "total_sent": "5.07184",
                "in_usd": "0.06",
                "in_cny": "0.41",
                "in_btc": "0.000006"
            },
            {
                "asset": {
                    "asset_id": "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
                    "symbol": "BTC"
                },
                "balance": "21.50020531",
                "available_balance": "21.50020531",
                "total_received": "41.50020531",
                "total_sent": "20",
                "in_usd": "193291.15",
                "in_cny": "1364635.49",
                "in_btc": "21.500205"
            },
            {
                "asset": {
                    "asset_id": "78de44ffa1bce37b757c9eae8925b5f199dc4621b412ef0f3f46168865284a93",
                    "symbol": "ETH"
                },
                "balance": "1.1410665",
                "available_balance": "1.1410665",
                "total_received": "1.1410665",
                "total_sent": "0",
                "in_usd": "217.76",
                "in_cny": "1537.39",
                "in_btc": "0.024213"
            },
            {
                "asset": {
                    "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                    "symbol": "USDT"
                },
                "balance": "0.015655",
                "available_balance": "0.015655",
                "total_received": "67724.673754",
                "total_sent": "67724.658099",
                "in_usd": "0.02",
                "in_cny": "0.11",
                "in_btc": "0.000002"
            }
        ],
        "votes": []
    }
}

# 查询资产价格

查询指定资产的资产价格

# Request

GET /vapor/v3/q/asset

# Params

  • String - id,资产ID

# Response

  • String - asset_id,资产ID
  • String - symbol,资产标识
  • String - name,资产名称
  • String - description,资产描述
  • String - in_usd,单位资产换算成usd的价格
  • String - in_cny,单位资产换算成cny的价格
  • String - in_btc,单位资产换算成btc的价格

示例:

# Request
GET http://ex.movapi.com/vapor/v3/q/asset?id=184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46


# Response
{
    "code": 200,
    "msg": "",
    "data": {
        "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
        "symbol": "USDT",
        "name": "USDT-ERC20",
        "description": "",
        "usd_price": 1.0001,
        "cny_price": 7.060706,
        "btc_price": 0.0001112756
    }
}

# 列出资产类型

获取支持的资产类型

# Request

POST /vapor/v3/q/list-assets

# Body

Optional(可选):

  • Bool - cross_chain,是否是跨链资产
  • Bool - ofmf,是否是通过ofmf跨入的资产
{
    "filter":{
        "cross_chain":true,
        "ofmf": true
    }
}

# Response

  • String - asset_id,资产ID
  • String - symbol,资产标识
  • String - name,资产名称
  • String - description,资产描述
  • String - in_usd,单位资产换算成usd的价格
  • String - in_cny,单位资产换算成cny的价格
  • String - in_btc,单位资产换算成btc的价格

示例:

# Request
POST http://ex.movapi.com/vapor/v3/q/list-assets

# Body
{
    "filter":{
        "cross_chain":true,
        "ofmf": true
    }
}

# Response
{
    "code": 200,
    "msg": "",
    "data": [
        {
            "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol": "USDT",
            "name": "USDT-ERC20",
            "description": "",
            "usd_price": "1.0001",
            "cny_price": "7.060706",
            "btc_price": "0.0001112892"
        },
        {
            "asset_id": "78de44ffa1bce37b757c9eae8925b5f199dc4621b412ef0f3f46168865284a93",
            "symbol": "ETH",
            "name": "Ethereum",
            "description": "",
            "usd_price": "190.71",
            "cny_price": "1346.4126",
            "btc_price": 0.02123
        },
        {
            "asset_id": "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
            "symbol": "BTC",
            "name": "Bitcoin",
            "description": "",
            "usd_price": "8985.7",
            "cny_price": "63439.042",
            "btc_price": "1"
        }
    ]
}

# 查询交易

通过交易ID查询交易

# Request

GET /vapor/v3/merchant/transaction

# Params

  • String - tx_hash,交易hash

Optional(可选):

  • String - address,交易账户地址

# Response

  • String - hash,交易ID
  • Bool - status,交易状态
  • Int- size,交易体积所占字节数
  • Int - submission_timestamp,交易提交时间
  • Int - block_height,交易所在区块高度
  • Int - block_timestamp,区块时间
  • String - memo,交易备注
  • Array - inputs,输入信息
    • String - script,control program合约
    • String - address,地址
    • Array - asset,关联资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,input或的金额
    • String - type,input的类型
  • Array - outputs,输出信息
    • String - utxo_id,utxo id
    • String - script,control program合约
    • String - address,地址
    • Array - asset,关联资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,output或的金额
    • String - type,output的类型
  • String - fee,手续费
  • Array - balances,包含资产的余额
    • Array - asset,资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,余额
  • String - types,交易类型

示例:

# Request
GET https://ex.movapi.com/vapor/v3/merchant/transaction?tx_id=a466f8e64ea55ea1eb8b45e33cd7af7781cc5285baa917ddc8416b2c31239994&address=vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9

# Response
{
    "code": 200,
    "msg": "",
    "data": {
        "hash": "a466f8e64ea55ea1eb8b45e33cd7af7781cc5285baa917ddc8416b2c31239994",
        "status": true,
        "size": 1385,
        "submission_timestamp": 1587037376,
        "block_height": 46394090,
        "block_timestamp": 1587037377,
        "memo": "",
        "inputs": [
            {
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                    "symbol": "USDT"
                },
                "amount": "0.00058",
                "type": "spend"
            },
            {
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                    "symbol": "USDT"
                },
                "amount": "0.000568",
                "type": "spend"
            },
            {
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                    "symbol": "BTM"
                },
                "amount": "0.01241",
                "type": "spend"
            },
            {
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                    "symbol": "BTM"
                },
                "amount": "0.001",
                "type": "spend"
            },
            {
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                    "symbol": "BTM"
                },
                "amount": "0.00013085",
                "type": "spend"
            },
            {
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                    "symbol": "BTM"
                },
                "amount": "1.66499",
                "type": "spend"
            }
        ],
        "outputs": [
            {
                "utxo_id": "2d797747ff9ecfaa77eb0443630f0a808bae7e827936d5475d60662bbfd1710c",
                "script": "002092e39076ccadc9c1fef1928de7b0ca3803e1f13241e05d7cf1d4c78516cfd5d7",
                "address": "vp1qjt3eqakv4hyurlh3j2x70vx28qp7rufjg8s96l836nrc29k06htsqz0mh4",
                "asset": {
                    "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                    "symbol": "USDT"
                },
                "amount": "0.001",
                "type": "control"
            },
            {
                "utxo_id": "f5444ae8ac88634ee4cb17af1ae044103a7e5c1edd57a99abd671755042bf13a",
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                    "symbol": "USDT"
                },
                "amount": "0.000148",
                "type": "control"
            },
            {
                "utxo_id": "03f6f94021bd873ff8f1d53dec2ac598dad39d8131792d6865bd119d05400446",
                "script": "00147591aa659e6303ab40ff53efc5d7f173b650d444",
                "address": "vp1qwkg65ev7vvp6ks8l20hut4l3wwm9p4zyg6u2r9",
                "asset": {
                    "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                    "symbol": "BTM"
                },
                "amount": "1.65159085",
                "type": "control"
            }
        ],
        "fee": "0.02694",
        "balances": [
            {
                "asset": {
                    "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                    "symbol": "USDT"
                },
                "amount": "-0.001"
            }
        ],
        "types": [
            "ordinary"
        ]
    }
}

# 查询交易

列出和当前地址有关的所有交易

# Request

POST /vapor/v3/merchant/list-transactions

# Params

  • String - start,起始交易序号
  • String - limit,每次请求交易的数量
  • String - address,账户地址

# Body

  • String - asset_id,资产ID
  • Array - tx_types,交易类型
  • String - by,排序字段
  • String - order,排序方式
{
    "filter":{
        "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
        "tx_types": ["veto"] // 支持"veto", "vote", "in_crosschain", "out_crosschain","mov_matched_tx","mov_place_order","mov_cancel_order,transfer_in""transfer_out"
    },
    "sort":{
        "by":"amount",
        "order":"desc"
    }
}

# Response

  • String - hash,交易ID
  • Bool - status,交易状态
  • Int- size,交易体积所占字节数
  • Int - submission_timestamp,交易提交时间
  • Int - block_height,交易所在区块高度
  • Int - block_timestamp,区块时间
  • String - memo,交易备注
  • Array - inputs,输入信息
    • String - script,control program合约
    • String - address,地址
    • Array - asset,关联资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,input或的金额
    • String - type,input的类型
  • Array - outputs,输出信息
    • String - utxo_id,utxo id
    • String - script,control program合约
    • String - address,地址
    • Array - asset,关联资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,output或的金额
    • String - type,output的类型
  • String - fee,手续费
  • Array - balances,包含资产的余额
    • Array - asset,资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,余额
  • String - types,交易类型

示例:

# Request
POST https://ex.movapi.com/vapor/v3/merchant/list-transactions?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3&start=1&limit=2

# Body
{
    "filter":{
        "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
        "tx_types": ["mov_matched_tx"] // 支持"veto", "vote", "in_crosschain", "out_crosschain","mov_matched_tx","mov_place_order","mov_cancel_order,transfer_in","transfer_out"
    },
    "sort":{
        "by":"amount",
        "order":"desc"
    }
}

# Response
{
    "code": 200,
    "msg": "",
    "data": [
        {
            "hash": "d61657bd85beca14f677fa94bcadc42c2b03fd2d6836d963c425faec432ed0fb",
            "status": true,
            "size": 1713,
            "submission_timestamp": 1589366605,
            "block_height": 51050185,
            "block_timestamp": 1589366606,
            "memo": "",
            "inputs": [
                {
                    "script": "0014cb197bc57ff7dfd666165d51360be7c74e51c07a",
                    "address": "vp1qevvhh3tl7l0aveskt4gnvzl8ca89rsr6y7z6l5",
                    "asset": {
                        "asset_id": "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
                        "symbol": "BTC"
                    },
                    "amount": "0.00792831",
                    "type": "spend"
                },
                {
                    "script": "0014cb197bc57ff7dfd666165d51360be7c74e51c07a",
                    "address": "vp1qevvhh3tl7l0aveskt4gnvzl8ca89rsr6y7z6l5",
                    "asset": {
                        "asset_id": "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
                        "symbol": "BTC"
                    },
                    "amount": "0.00167536",
                    "type": "spend"
                },
                {
                    "script": "0014cb197bc57ff7dfd666165d51360be7c74e51c07a",
                    "address": "vp1qevvhh3tl7l0aveskt4gnvzl8ca89rsr6y7z6l5",
                    "asset": {
                        "asset_id": "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
                        "symbol": "BTC"
                    },
                    "amount": "0.00165389",
                    "type": "spend"
                },
                {
                    "script": "0014abd467fcd0ac947225abfed5b62343074b1751bf",
                    "address": "vp1q402x0lxs4j28yfdtlm2mvg6rqa93w5dl05ytlx",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "1000",
                    "type": "spend"
                },
                {
                    "script": "0014abd467fcd0ac947225abfed5b62343074b1751bf",
                    "address": "vp1q402x0lxs4j28yfdtlm2mvg6rqa93w5dl05ytlx",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "317.69653",
                    "type": "spend"
                },
                {
                    "script": "0014abd467fcd0ac947225abfed5b62343074b1751bf",
                    "address": "vp1q402x0lxs4j28yfdtlm2mvg6rqa93w5dl05ytlx",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "140",
                    "type": "spend"
                }
            ],
            "outputs": [
                {
                    "utxo_id": "e35171fc0993a05111c7af575876564b6fc0a86a778754ec8eb6307536a8def5",
                    "script": "0014cb197bc57ff7dfd666165d51360be7c74e51c07a",
                    "address": "vp1qevvhh3tl7l0aveskt4gnvzl8ca89rsr6y7z6l5",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "1424.28429",
                    "type": "control"
                },
                {
                    "utxo_id": "557f6d19d4b1119fcdc9c150594d71ae726055418eb3910d0f8d46c962693e7b",
                    "script": "0014abd467fcd0ac947225abfed5b62343074b1751bf",
                    "address": "vp1q402x0lxs4j28yfdtlm2mvg6rqa93w5dl05ytlx",
                    "asset": {
                        "asset_id": "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
                        "symbol": "BTC"
                    },
                    "amount": "0.00999999",
                    "type": "control"
                },
                {
                    "utxo_id": "c456abe9367ac040fa89fb0e45544ffe5cab79b34bed4318f5b142787a9c7d35",
                    "script": "001410765081310de68b30a09b3d15a16356c4d9982d",
                    "address": "vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "4.28571",
                    "type": "control"
                },
                {
                    "utxo_id": "4ca7b33f2384c6c8d92321da06c87d8efd4264ad67c7690843b52f63607b97a6",
                    "script": "0014abd467fcd0ac947225abfed5b62343074b1751bf",
                    "address": "vp1q402x0lxs4j28yfdtlm2mvg6rqa93w5dl05ytlx",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "29.12653",
                    "type": "control"
                },
                {
                    "utxo_id": "8131ff0769bf4744a1a3b78a0d10513a3f42f9ac54339f03cd6051707a7d2a77",
                    "script": "0014cb197bc57ff7dfd666165d51360be7c74e51c07a",
                    "address": "vp1qevvhh3tl7l0aveskt4gnvzl8ca89rsr6y7z6l5",
                    "asset": {
                        "asset_id": "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
                        "symbol": "BTC"
                    },
                    "amount": "0.00125757",
                    "type": "control"
                }
            ],
            "fee": "0",
            "balances": [
                {
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "4.28571"
                }
            ],
            "types": [
                "flash_swap_tx"
            ]
        },
        {
            "hash": "39a711d575eb93f51a7fe16ec7da538e6d8415888c956da82e0984a4de96526d",
            "status": true,
            "size": 983,
            "submission_timestamp": 1589356330,
            "block_height": 51029634,
            "block_timestamp": 1589356331,
            "memo": "",
            "inputs": [
                {
                    "script": "001411a1033f399279714d9653ed4b73c58145378ef3",
                    "address": "vp1qzxssx0eejfuhznvk20k5ku79s9zn0rhnzrlgdj",
                    "asset": {
                        "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                        "symbol": "USDT"
                    },
                    "amount": "0.15",
                    "type": "spend"
                },
                {
                    "script": "001411a1033f399279714d9653ed4b73c58145378ef3",
                    "address": "vp1qzxssx0eejfuhznvk20k5ku79s9zn0rhnzrlgdj",
                    "asset": {
                        "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                        "symbol": "USDT"
                    },
                    "amount": "0.1",
                    "type": "spend"
                },
                {
                    "script": "0014396979593a7014c38b5394b912e954b74a747670",
                    "address": "vp1q895hjkf6wq2v8z6njju39625ka98gansdh94et",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "4.66",
                    "type": "spend"
                }
            ],
            "outputs": [
                {
                    "utxo_id": "08f0dc01b9eb03da34b5bd75d753c81b301e3d4f4e86e7ae6a101f2e6c143a94",
                    "script": "001411a1033f399279714d9653ed4b73c58145378ef3",
                    "address": "vp1qzxssx0eejfuhznvk20k5ku79s9zn0rhnzrlgdj",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "3.97803",
                    "type": "control"
                },
                {
                    "utxo_id": "134e2d8790061c477b962e55e5492796458a16044faa61ca477ff3f11279bfb9",
                    "script": "0014396979593a7014c38b5394b912e954b74a747670",
                    "address": "vp1q895hjkf6wq2v8z6njju39625ka98gansdh94et",
                    "asset": {
                        "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                        "symbol": "USDT"
                    },
                    "amount": "0.249774",
                    "type": "control"
                },
                {
                    "utxo_id": "26d1262c6f9572c3dc94ce0a04bb3d5707bae146a92532e70228a27a525cb1ca",
                    "script": "001410765081310de68b30a09b3d15a16356c4d9982d",
                    "address": "vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "0.01197",
                    "type": "control"
                },
                {
                    "utxo_id": "86d8cea9d4cf0661a7e6ebb00acc330f17a048ce2f24faefb49b6cedb8f94c0b",
                    "script": "0014396979593a7014c38b5394b912e954b74a747670",
                    "address": "vp1q895hjkf6wq2v8z6njju39625ka98gansdh94et",
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "0.67",
                    "type": "control"
                },
                {
                    "utxo_id": "7ffd41ce53395b7a61ae29af637dca8897cb2f301247a4a456eeba6dcd735ce1",
                    "script": "001411a1033f399279714d9653ed4b73c58145378ef3",
                    "address": "vp1qzxssx0eejfuhznvk20k5ku79s9zn0rhnzrlgdj",
                    "asset": {
                        "asset_id": "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                        "symbol": "USDT"
                    },
                    "amount": "0.000226",
                    "type": "control"
                }
            ],
            "fee": "0",
            "balances": [
                {
                    "asset": {
                        "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                        "symbol": "BTM"
                    },
                    "amount": "0.01197"
                }
            ],
            "types": [
                "flash_swap_tx"
            ]
        }
    ],
    "pagination": {
        "start": 1,
        "limit": 2,
        "_links": {
            "next": "/vapor/v3/merchant/list-transactions?limit=2&start=3"
        }
    }
}

# 展示多签交易

展示钱包关联的多签交易

# Request

POST /vapor/v3/merchant/txproposals

# Params

  • String - start,开始的交易序号
  • String - limit,每次请求交易的数量
  • String - address,账户地址(地址必须有关联的wallet)

# Body

  • String - tx_hash,指定一个交易hash
  • Int - status,过滤proposal的状态
  • String - by,排序字段
  • String - order,排序方式
{
    "filter":{
        "tx_hash":"2d7cb30f8239af237f7e0eb959bc7dcc46f280744ce5794634709f05af999317",
        "status": 1, // 0:pending 1:completed 2:reject
    },
    "sort":{
        "by":"amount",
        "order":"desc"
    }
}

# Response

  • String - hash:交易ID
  • Bool - status:交易状态是否成功
  • Int- size:交易体积所占字节数
  • Int - submission_timestamp:交易提交时间
  • Int - block_height:交易所在区块高度
  • Int - block_timestamp:区块时间
  • String - memo:交易备注
  • Array - inputs,输入信息
    • String - script,control program合约
    • String - address,地址
    • Array - asset,关联资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,input或的金额
    • String - type,input的类型
  • Array - outputs,输出信息
    • String - utxo_id,utxo id
    • String - script,control program合约
    • String - address,地址
    • Array - asset,关联资产
      • String - asset_id,资产ID
      • String - symbol,资产名称
    • String - amount,output或的金额
    • String - type,output的类型
  • String - symbol:资产标识
  • String - amount:地址的资产变动金额,负数为地址减少的金额,正数为地址增加的金额
  • Array - types:交易类型

# 构建普通交易

# Request

POST /vapor/v3/merchant/build-payment

# Params

  • String - address:账户地址

# Body

  • String - asset,资产ID
  • Int - confirmations,区块确认数
  • String - memo,附加信息
  • Dictionary - recipients,接收者
    • Key: String - address,收款地址地址
    • Value: String - balance,转账金额
  • Boolean - forbid_chain_tx,是否禁止链式交易
{
    "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "confirmations":1,
    "memo":"mock",
    "recipients": {
      "vp1qwqerwpdchvfwjphte9qwmjur0rytk5krr70ct3": "1.3434"
    },
    "forbid_chain_tx": false,
}

# Response

  • Array - data,数据
    • Object - tx,交易信息
      • Array - inputs,输入
        • String - script,脚本
        • String - address,地址
        • String - asset,资产代号
        • String - amount,金额
        • String - type,输入类型
      • Array - outputs,输出
        • String - script,脚本
        • String - address,地址
        • String - asset,资产ID
        • String - amount,金额
        • String - type,输出类型
      • Int - fee,手续费
      • Array - balances,余额
        • String - asset,资产ID
        • String - amount,金额
      • String - hash,哈希
    • String - raw_transaction, 交易信息
    • Array - signing_instructions,签名指令
      • Array - sign_data,签名数据

示例:

# Request
POST https://ex.movapi.com/vapor/v3/merchant/build-payment

# Body
{ "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "confirmations":1,
    "memo":"mock",
    "recipients": {
      "vp1qwqerwpdchvfwjphte9qwmjur0rytk5krr70ct3": "1.3434"
    },
    "forbid_chain_tx": false,
}
    
# Response
{
    "code":200,
    "msg":"mock",
    "result":{
        "data":[
          {
                "tx":{
                    "inputs":[
                        {
                            "script":"00147a8a16c665568c2f52e33c5fb373a3bd1fb7f2c1",
                            "address":"tm1q029pd3n926xz75hr830mxuarh50m0ukpw8g27u",
                            "asset":"0000000000000000000000000000000000000000000000000000000000000000",
                            "amount":"412.5",
                            "type":"spend"
                        }
                    ],
                    "outputs":[
                        {
                            "script":"00147a8a16c665568c2f52e33c5fb373a3bd1fb7f2c1",
                            "address":"tm1q029pd3n926xz75hr830mxuarh50m0ukpw8g27u",
                            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                            "amount":"412.5",
                            "type":"control"
                        }
                    ],
                    "fee":"0",
                    "balances":[
                        {
                            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                            "amount":"0"
                        }
                    ],
                    "hash":"eb4daea5edc379b6ab024c0e4ef963feafe6affcfe581d66f7ad3ec6d1828463"
                },
                "raw_transaction":"070100010160015e5978c52e0508cbf1cd901919277e4dba80fb4440b4771bbaa3b6c483f9264d21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8094ebdc0301011600143c21d88332683d060ccf905a0f26ce82907ac132220120f3a597b7a1f8b7b210790d5ceef145ae8616d025a6fdb4aec67338bf937af6b9020139ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6401160014f0928dc5f8878a4289b981d7c66386ff74be7fc300013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb4dfcfdc03011600143c21d88332683d060ccf905a0f26ce82907ac13200",
                "signing_instructions":[
                    {
                        "sign_data":[
                            "b9fb5dc0e7b7ee0e9c252439ec32fe6b222e0d170aee6b562634dfad3638560e"
                        ]
                    }
                ]
          }
        ]
    }
}

# 构建投票交易

# Request

POST /vapor/v3/merchant/build-vote

# Params

  • String - address:账户地址

# Body

  • String - amount,金额
  • Int - confirmations,区块确认数
  • String - memo,附加信息
  • string - vote,投票节点公钥
  • Boolean - forbid_chain_tx,是否禁止链式交易
{
    "amount": "100.79",
    "confirmations":1,
    "memo":"mock",
    "vote":"50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1",
    "forbid_chain_tx": false,
}

# Response

  • Array - data,数据
    • Object - tx,交易信息
      • Array - inputs,输入
        • String - script,脚本
        • String - address,地址
        • String - asset,资产代号
        • String - amount,金额
        • String - type,输入类型
      • Array - outputs,输出
        • String - script,脚本
        • String - address,地址
        • String - asset,资产ID
        • String - amount,金额
        • String - type,输出类型
      • Int - fee,手续费
      • Array - balances,余额
        • String - asset,资产ID
        • String - amount,金额
      • String - hash,哈希
    • String - raw_transaction, 交易信息
    • Array - signing_instructions,签名指令
      • Array - sign_data,签名数据

示例:

# Request
POST https://ex.movapi.com/vapor/v3/merchant/build-vote

# Body
{
    "amount": "100.79",
    "confirmations":1,
    "memo":"mock",
    "vote":"50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1",
    "forbid_chain_tx": false,
}

# 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":"vote",
                            "vote":"50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1"
                        }
                    ],
                    "fee":0,
                    "balances":[
                        {
                            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                            "amount":"412.5"
                        }
                    ],
                    "hash":"eb4daea5edc379b6ab024c0e4ef963feafe6affcfe581d66f7ad3ec6d1828463"
                },
                "raw_transaction":"070100010160015e5978c52e0508cbf1cd901919277e4dba80fb4440b4771bbaa3b6c483f9264d21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8094ebdc0301011600143c21d88332683d060ccf905a0f26ce82907ac132220120f3a597b7a1f8b7b210790d5ceef145ae8616d025a6fdb4aec67338bf937af6b9020139ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6401160014f0928dc5f8878a4289b981d7c66386ff74be7fc300013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb4dfcfdc03011600143c21d88332683d060ccf905a0f26ce82907ac13200",
                "signing_instructions":[
                    {
                        "sign_data":[
                            "b9fb5dc0e7b7ee0e9c252439ec32fe6b222e0d170aee6b562634dfad3638560e"
                        ]
                    }
                ]
          }
        ]
    }
}

# 构建取消投票交易

# Request

POST /vapor/v3/merchant/build-veto

# Params

  • String - address:账户地址

# Body

  • String - amount,金额
  • Int - confirmations,区块确认数
  • String - memo,附加信息
  • string - vote,投票节点公钥
  • Boolean - forbid_chain_tx,是否禁止链式交易
{
    "amount":"100.75",
    "confirmations":1,
    "memo":"mock",
    "vote":"50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1",
    "forbid_chain_tx": false,
}

# Response

  • Array - data,数据
    • Object - tx,交易信息
      • Array - inputs,输入
        • String - script,脚本
        • String - address,地址
        • String - asset,资产代号
        • String - amount,金额
        • String - type,输入类型
      • Array - outputs,输出
        • String - script,脚本
        • String - address,地址
        • String - asset,资产ID
        • String - amount,金额
        • String - type,输出类型
      • Int - fee,手续费
      • Array - balances,余额
        • String - asset,资产ID
        • String - amount,金额
      • String - hash,哈希
    • String - raw_transaction, 交易信息
    • Array - signing_instructions,签名指令
      • Array - sign_data,签名数据

示例:

# Request
POST https://ex.movapi.com/vapor/v3/merchant/build-veto

# Body
{
    "amount":"100.75",
    "confirmations":1,
    "memo":"mock",
    "vote":"50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1",
    "forbid_chain_tx": false,
}

# Response
{
    "code":200,
    "msg":"mock",
    "result":{
        "data":[
          {
                "tx":{
                    "inputs":[
                        {
                            "script":"00147a8a16c665568c2f52e33c5fb373a3bd1fb7f2c1",
                            "address":"tm1q029pd3n926xz75hr830mxuarh50m0ukpw8g27u",
                            "asset":"0000000000000000000000000000000000000000000000000000000000000000",
                            "amount":"0",
                            "type":"veto",
                            "vote":"50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1"
                        }
                    ],
                    "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"
                        ]
                    }
                ]
          }
        ]
    }
}

# 构建跨链交易

# Request

POST /vapor/v3/merchant/build-crosschain

# Params

  • String - address:账户地址

# Body

  • String - amount,金额
  • Int - confirmations,区块确认数
  • Dictionary - recipients,接收者
    • Key: String - address,收款地址地址
    • Value: String - balance,转账金额
  • Boolean - forbid_chain_tx,是否禁止链式交易
{
    "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "confirmations":1,
    "recipients": {
      "bm1q2lm5c7ajtutcjzhr4cvuge385ygynupe90m7xj": "100"
    }
    "forbid_chain_tx": false
}

# Response

  • Array - data,数据
    • Object - tx,交易信息
      • Array - inputs,输入
        • String - script,脚本
        • String - address,地址
        • String - asset,资产代号
        • String - amount,金额
        • String - type,输入类型
      • Array - outputs,输出
        • String - script,脚本
        • String - address,地址
        • String - asset,资产ID
        • String - amount,金额
        • String - type,输出类型
      • Int - fee,手续费
      • Array - balances,余额
        • String - asset,资产ID
        • String - amount,金额
      • String - hash,哈希
    • String - raw_transaction, 交易信息
    • Array - signing_instructions,签名指令
      • Array - sign_data,签名数据

示例:

# Request
POST https://ex.movapi.com/vapor/v3/merchant/build-crosschain

# Body
{
    "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "confirmations":1,
    "recipients": {
      "bm1q2lm5c7ajtutcjzhr4cvuge385ygynupe90m7xj": "100"
    }
    "forbid_chain_tx": false
}

# Response
{
    "code":200,
    "msg":"mock",
    "result":{
        "data":[
          {
                "tx":{
                    "inputs":[
                        {
                            "script":"00147a8a16c665568c2f52e33c5fb373a3bd1fb7f2c1",
                            "address":"tm1q029pd3n926xz75hr830mxuarh50m0ukpw8g27u",
                            "asset":"0000000000000000000000000000000000000000000000000000000000000000",
                            "amount":"0",
                            "type":"spend"
                        }
                    ],
                    "outputs":[
                        {
                            "script":"00147a8a16c665568c2f52e33c5fb373a3bd1fb7f2c1",
                            "address":"bm1q2lm5c7ajtutcjzhr4cvuge385ygynupe90m7xj",
                            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                            "amount":"4125",
                            "type":"crosschain_output"
                        }
                    ],
                    "fee":0,
                    "balances":[
                        {
                            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                            "amount":"4125"
                        }
                    ],
                    "hash":"eb4daea5edc379b6ab024c0e4ef963feafe6affcfe581d66f7ad3ec6d1828463"
                },
                "raw_transaction":"070100010160015e5978c52e0508cbf1cd901919277e4dba80fb4440b4771bbaa3b6c483f9264d21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8094ebdc0301011600143c21d88332683d060ccf905a0f26ce82907ac132220120f3a597b7a1f8b7b210790d5ceef145ae8616d025a6fdb4aec67338bf937af6b9020139ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6401160014f0928dc5f8878a4289b981d7c66386ff74be7fc300013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb4dfcfdc03011600143c21d88332683d060ccf905a0f26ce82907ac13200",
                "signing_instructions":[
                    {
                        "sign_data":[
                            "b9fb5dc0e7b7ee0e9c252439ec32fe6b222e0d170aee6b562634dfad3638560e"
                        ]
                    }
                ]
          }
        ]
    }
}

# 构建高级交易

# Request

POST /vapor/v3/merchant/build-advanced-tx

# Params

  • String - address:账户地址

# Body

  • Int - confirmations,区块确认数
  • Array - inputs,输入
    • String - script,脚本
    • String - address,地址
    • String - asset,资产代号
    • String - amount,金额
    • String - type,输入类型
  • Array - outputs,输出
    • String - script,脚本
    • String - address,地址
    • String - asset,资产ID
    • String - amount,金额
    • String - type,输出类型
  • Int - fee,手续费
  • Boolean - forbid_chain_tx,是否禁止链式交易
{
    "fee":"1",
    "confirmations":1,
    "inputs":[
        {
            "type":"spend_utxo",
            "output_id":"37921eee9453d2598b6357dfeddd2cf351850f5be917bdac0d1cf208859ece06"
        },
        {
            "type":"spend_wallet",
            "guid": "xxxxxx-xxxxxxx-xxxxxxx-xxxxxx"
            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "amount":"100"
        },
      {
            "type":"spend_address",
            "address": "vp1q2lm5c7ajtutcjzhr4cvuge385ygynupe90m7xj"
            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "amount":"100"
        }
    ],
    "outputs":[
        {
            "type":"control_address",
            "amount":"99",
            "asset":"3152a15da72be51b330e1c0f8e1c0db669269809da4f16443ff266e07cc43680",
            "address":"bm1q50u3z8empm5ke0g3ngl2t3sqtr6sd7cepd3z68"
        },
        {
            "type":"control_program",
            "amount":"99",
            "asset":"3152a15da72be51b330e1c0f8e1c0db669269809da4f16443ff266e07cc43680",
            "control_program":"bm1q50u3z8empm5ke0g3ngl2t3sqtr6sd7cepd3z68"
        }
    ],
    "fee": "0.04",
    "forbid_chain_tx": false
}

# Response

  • Array - data,数据
    • Object - tx,交易信息
      • Array - inputs,输入
        • String - script,脚本
        • String - address,地址
        • String - asset,资产代号
        • String - amount,金额
        • String - type,输入类型
      • Array - outputs,输出
        • String - script,脚本
        • String - address,地址
        • String - asset,资产ID
        • String - amount,金额
        • String - type,输出类型
      • Int - fee,手续费
      • Array - balances,余额
        • String - asset,资产ID
        • String - amount,金额
      • String - hash,哈希
    • String - raw_transaction, 交易信息
    • Array - signing_instructions,签名指令
      • Array - sign_data,签名数据

示例:

# Request
POST https://ex.movapi.com/vapor/v3/merchant/build-advanced-tx

{
    "fee":"1",
    "confirmations":1,
    "inputs":[
        {
            "type":"spend_utxo",
            "output_id":"37921eee9453d2598b6357dfeddd2cf351850f5be917bdac0d1cf208859ece06"
        },
        {
            "type":"spend_wallet",
            "guid": "xxxxxx-xxxxxxx-xxxxxxx-xxxxxx"
            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "amount":"100"
        },
      {
            "type":"spend_address",
            "address": "vp1q2lm5c7ajtutcjzhr4cvuge385ygynupe90m7xj"
            "asset":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "amount":"100"
        }
    ],
    "outputs":[
        {
            "type":"control_address",
            "amount":"99",
            "asset":"3152a15da72be51b330e1c0f8e1c0db669269809da4f16443ff266e07cc43680",
            "address":"bm1q50u3z8empm5ke0g3ngl2t3sqtr6sd7cepd3z68"
        },
        {
            "type":"control_program",
            "amount":"99",
            "asset":"3152a15da72be51b330e1c0f8e1c0db669269809da4f16443ff266e07cc43680",
            "control_program":"bm1q50u3z8empm5ke0g3ngl2t3sqtr6sd7cepd3z68"
        }
    ],
    "fee": "0.04",
    "forbid_chain_tx": false
}

# 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"
                        ]
                    }
                ]
          }
        ]
    }
}

# 提交交易到链上

使用某个地址将交易提交到链上

# Request

POST /vapor/v3/merchant/submit-payment

# Params

  • String - address:账户地址

# Body

  • String - raw_transaction,原始交易
  • Array - signatures,签名数组
  • String - memo,备注信息
{
    "raw_transaction":"070100010160015e26978b848afd77d559980e58db9b60559b716312bd1e24af7e44c6efa5c1605dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0a885fd0201011600140ff923ae0944af0cfdd3eb3671db354eaa6b5795220120c44537a8d397ee09315755cd77fd02d66db015f32ba358c3bfafe20d887d041202013cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80c2d72f011600141e03ad3233693b551be8c86f5db062bdbe0c9f6600013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8b292cd02011600140ff923ae0944af0cfdd3eb3671db354eaa6b579500",
    "signatures":[
        [
            "4f5e0b94f983ab6d98c230e7edf031951c93809af318d0bb6c362714794c38c5939df58e43ac1a45599d777386724354c0ced7bab54d19bac02c233fa9e2050a"
        ]
    ],
    "memo":"mock"
}

# Response

  • String - transaction_hash,交易hash

示例:

# Request
POST https://ex.movapi.com/vapor/v3/merchant/submit-payment?address=vp1qcmcyhjzmg77ec5lrph4n5q9nj8423phhwfq7hu

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

# Response
{
    "code":200,
    "msg":"mock",
    "result":{
        "data":{
            "transaction_hash":"9287dfe438f2387a02f6812b2f769ed85498ff59376c60b6d79d2506329330ee"
        }
    }
}

# 获取投票状态

获取所有共识节点的投票信息

# Request

GET /q/vote-status

# Params

Optional(可选):

  • Int- start, 起始记录的序号
  • Int- limit, 分页内包含的数量

# Response

  • Object-result
    • Object-data
      • Object-consensus_nodes,节点信息
        • String- pub_key,节点公钥
        • String- vote_num,该节点投票的数量
        • String- ratio,年化收益率
        • String- name,节点名称
        • String- name_en,节点英文名称
        • String- location,节点所在地区
        • String- homepage,节点主页
        • String- logo,节点logo
        • String- declaration,节点描述
        • Int- role,出块节点,备选节点或非正式节点(投票未超过100万)

示例

# Request
GET https://ex.movapi.com/vapor/v3/q/vote-status

# Response
{   
    "code":200,
    "msg":"",
    "result":{
        "data":{
            "consensus_nodes": [
                {
                    "pub_key": "74248234dd0f57f505dae45168987b205f8423e882ad44fe5cfa2b055b9308e2c5a09e2abd6635204f312ded4b61ab7aa563ad743523ca7bec4c4ba8fe5a657d",
                    "vote_num": "12000000.7",
                  	"ratio": "4.2",
                    "name": "name4",
                    "name_en": "",
                    "location": "中国",
                    "homepage": "homepage4",
                    "logo": "logo4",
                    "declaration": "declaration4",
                    "role": 0
                },
                {
                    "pub_key": "74248234dd0f57f505dae45168987b205f8423e882ad44fe5cfa2b055b9308e2c5a09e2abd6635204f312ded4b61ab7aa563ad743523ca7bec4c4ba8fe5a657c",
                    "vote_num": "8000000",
                    "name": "name3",
                    "name_en": "",
                    "location": "中国",
                    "homepage": "homepage3",
                    "logo": "logo3",
                    "declaration": "declaration3",
                    "role": 0
                },
                {
                    "pub_key": "74248234dd0f57f505dae45168987b205f8423e882ad44fe5cfa2b055b9308e2c5a09e2abd6635204f312ded4b61ab7aa563ad743523ca7bec4c4ba8fe5a657b",
                    "vote_num": "1000000",
                    "name": "name2",
                    "name_en": "",
                    "location": "中国",
                    "homepage": "homepage2",
                    "logo": "logo2",
                    "declaration": "declaration2",
                    "role": 0
                }
            ],
            "total_vote_num": "21000000.7"
        }
    }
}

# 构建磁力兑换订单

构建磁力兑换订单,未上链

# Request

POST /magnet/v3/merchant/build-place-order-tx

# Params

  • String - address:账户地址

# Body

  • String - price,价格
  • String - amount,数量
  • String - symbol,交易对
  • String - side,买卖方向
  • String - pubkey,公钥(没有guid 的必填)
{
    "price": "0.02033848",
    "amount": "3",
    "symbol": "ETH/BTC",
    "side": "buy",
    "pubkey" "04e45006b32c7914e" // 没有wallet的地址必填,否则返回错误
}

# Response

  • Array - data,数据
    • Object - tx,交易信息
      • String - raw_transaction, 交易信息
      • Array - signing_instructions,签名
        • Array - sign_data,签名数据

示例:

# Request
POST https://ex.movapi.com/magnet/v3/merchant/build-place-order-tx

# Body
{
    "price": "0.02033848",
    "amount": "3",
    "symbol": "ETH/BTC",
    "side": "buy",
    "pubkey" "04e45006b32c7914e" // 没有wallet的地址必填,否则返回错误
}

# Response
{
  'code': 200,
  'msg': '',
  'result': {
    'data': [{
        "raw_transaction": "070100010160015ef90fd46c6d84fd9ab5820ebd4176cdc3cac71f561f8525c9198a9dc05584b9ded50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4928094ebdc030201160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee22012040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9002018f01008c01d50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4920301690020a0889e1080999e59ed552865a1d3ee677202796222141ccc3552041708aad76c07a796525ff92e020600480f625e0b160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee2040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9000013f003dd50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d492fd93ebdc0301160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee00",
        "signing_instructions": [
            {
                "sign_data": [
                    "db8852076826ec000bf9ad04453b3877b54bf96a16d936aaffeb366afa06c8e3"
                ]
            }
        ]
    },
    {
        "raw_transaction": "070100010160015ef90fd46c6d84fd9ab5820ebd4176cdc3cac71f561f8525c9198a9dc05584b9ded50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4928094ebdc030201160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee22012040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9002018f01008c01d50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4920301690020a0889e1080999e59ed552865a1d3ee677202796222141ccc3552041708aad76c07a796525ff92e020600480f625e0b160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee2040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9000013f003dd50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d492fd93ebdc0301160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee00",
        "signing_instructions": [
            {
                "sign_data": [
                    "db8852076826ec000bf9ad04453b3877b54bf96a16d936aaffeb366afa06c8e3"
                ]
            }
        ]
    }
    ]
  }
}

# 取消磁力兑换订单

取消磁力兑换订单,未上链

# Request

POST /magnet/v3/merchant/build-cancel-order-tx

# Params

  • String - address:账户地址

# Body

  • Int - order_id,订单号
{
    "order_id": 1
}

# Response

  • Array - data,数据
    • Object - tx,交易信息
      • String - raw_transaction, 交易信息
      • Array - signing_instructions,签名
        • Array - sign_data,签名数据

示例:

# Request
POST https://ex.movapi.com/magnet/v3/merchant/build-cancel-order-tx

# Body
{
    "order_id": 1
}

# Response
{
  'code': 200,
  'msg': '',
  'result': {
    'data': [{
        "raw_transaction": "070100010160015ef90fd46c6d84fd9ab5820ebd4176cdc3cac71f561f8525c9198a9dc05584b9ded50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4928094ebdc030201160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee22012040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9002018f01008c01d50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4920301690020a0889e1080999e59ed552865a1d3ee677202796222141ccc3552041708aad76c07a796525ff92e020600480f625e0b160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee2040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9000013f003dd50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d492fd93ebdc0301160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee00",
        "signing_instructions": [
            {
                "sign_data": [
                    "db8852076826ec000bf9ad04453b3877b54bf96a16d936aaffeb366afa06c8e3"
                ]
            }
        ]
    },
    {
        "raw_transaction": "070100010160015ef90fd46c6d84fd9ab5820ebd4176cdc3cac71f561f8525c9198a9dc05584b9ded50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4928094ebdc030201160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee22012040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9002018f01008c01d50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4920301690020a0889e1080999e59ed552865a1d3ee677202796222141ccc3552041708aad76c07a796525ff92e020600480f625e0b160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee2040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9000013f003dd50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d492fd93ebdc0301160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee00",
        "signing_instructions": [
            {
                "sign_data": [
                    "db8852076826ec000bf9ad04453b3877b54bf96a16d936aaffeb366afa06c8e3"
                ]
            }
        ]
    }
    ]
  }
}

# 查询订单

通过订单ID查询订单,一次查询的订单数量不要超过500

# Request

POST /mov/merchant/search-orders

# Body

  • Array- order_ids, 待查询的订单ID数组,可以一次查询多条
{
    "order_ids": [4]
}

# Response

  • Object- result, 返回结果
    • Object- data,
      • String- symbol, 交易对
      • String- side, 买入或者卖出方向
      • Int- order_id, 订单ID
      • String-open_price,挂单价格
      • String-deal_price,成交价格
      • String- amount, 金额
      • String-filled_amount,已成交的数量
      • String-fee_amount,手续费
      • String-status,订单状态,打开,部分成交,已成交,已取消
      • String-type,交易类型,磁力兑换或者闪电兑换
      • String-client_id,追踪订单
      • Object- order_txs, 订单关联的交易
        • String- hash, 交易哈希
        • String- type, 交易类型,下单,撮合或者取消
        • Int-timestamp,交易的时间戳
      • Int-_update_timestamp_订单更新的时间戳
# Request
POST https://ex.movapi.com/magnet/v3/merchant/search-orders

# Body
{
    "order_ids": [4]
}

# Response
{
    "code": 200,
    "msg": "",
    "result": {
        "data":  [
            {
                "symbol": "usdt/btm",
                "side": "sell",
                "order_id": 4,
                "open_price": "7600.0000000000",
                "deal_price": "7500.0000000000",
                "amount": "1000.00",
                "filled_amount": "1.00",
                "fee_amount": "7.60000000",
                "status": "canceled",
                "type": "mov",
                "client_id": "",
                "order_txs": [
                    {
                        "hash": "27dad6d060ebd2171b2af018ef61bce4b46b9f209d4c00d2a56f664b1ecdf202",
                        "type": "mov_place_order",
                        "timestamp": 1587712560
                    }
                ],
                "update_timestamp":1575367734
            }
        ]
    }
}

# 提交磁力兑换订单上链

用指定的地址向链上提交一笔磁力兑换订单

# Request

POST /magnet/v3/merchant/submit-place-order-tx

# Params

  • String - address:账户地址

# Body

  • String - raw_transaction,关联的原始交易信息
  • Array - signatures,签名信息
  • String - client_id,用户附加信息,用于订单策略
{
    "raw_transaction": "070100010160015ef90fd46c6d84fd9ab5820ebd4176cdc3cac71f561f8525c9198a9dc05584b9ded50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4928094ebdc030201160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee22012040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9002018f01008c01d50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4920301690020a0889e1080999e59ed552865a1d3ee677202796222141ccc3552041708aad76c07a796525ff92e020600480f625e0b160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee2040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9000013f003dd50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d492fd93ebdc0301160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee00",
    "signatures": [
        [
            "d4f5a8e88fd49d46ff1298abcb546405e98949e5c8905cd80359976e7f998216d9c6fbf86e1a44ccdc04dbd8fc026d3b3ceb3b61e290fb9403ce20082a6fed06"
        ]
    ],
    "client_id": "123"
}

# Response

  • String - transaction_hash,关联的交易hash
  • Array - order,订单信息
    • String - symbol, 交易对
    • String - side, 交易方向
    • Int - order_id,订单ID
    • String - open_price, 挂单价格
    • String - deal_price, 成交价格
    • String - amount, 挂单数量
    • String - filled_amount, 成交数量
    • String - fee_amount, 手续费
    • String - status, 订单状态,包含提交状态,挂单状态,完全成交,部分成交,取消中,已取消状态
    • String - type,订单类型,磁力兑换或者闪电兑换
    • Array - order_txs,订单关联交易
      • String - hash,关联的交易hash
      • String - type,交易类型,包括匹配,挂单,取消
      • Int - timestamp,交易时间戳
    • Int - order_timestamp,订单的产生时间戳
    • Int - update_timestamp,订单更新的时间戳

示例:

# Request
POST https://ex.movapi.com/magnet/v3/merchant/submit-place-order-tx?address=vp1qcmcyhjzmg77ec5lrph4n5q9nj8423phhwfq7hu

# Body
{
    "raw_transaction": "070100010160015ef90fd46c6d84fd9ab5820ebd4176cdc3cac71f561f8525c9198a9dc05584b9ded50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4928094ebdc030201160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee22012040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9002018f01008c01d50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4920301690020a0889e1080999e59ed552865a1d3ee677202796222141ccc3552041708aad76c07a796525ff92e020600480f625e0b160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee2040c7dec75fbfeec1de6f63d3f46a1298509609b3a88f8e63f52bbaf3a7c5de9000013f003dd50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d492fd93ebdc0301160014aaaa55bb767bfe0190f69ef641555f7e6f8d7cee00",
    "signatures": [
        [
            "d4f5a8e88fd49d46ff1298abcb546405e98949e5c8905cd80359976e7f998216d9c6fbf86e1a44ccdc04dbd8fc026d3b3ceb3b61e290fb9403ce20082a6fed06"
        ]
    ],
    "client_id": "123"
}

# Response
{
    "code": 200,
    "msg": "",
    "result": {
        "data":  {
            "transaction_hash": "27dad6d060ebd2171b2af018ef61bce4b46b9f209d4c00d2a56f664b1ecdf202",
            "order": {
                "symbol": "BTM/CTM",
                "side": "sell",
                "order_id": 1,
                "open_price": "0.00000933000000000000",
                "deal_price": "0",
                "amount": "1.01",
                "filled_amount": "0.00",
                "fee_amount": "0.00000000",
                "status": "submitted",
                "type": "mov",
                "client_id": "123",
                "order_txs": [
                    {
                        "hash": "27dad6d060ebd2171b2af018ef61bce4b46b9f209d4c00d2a56f664b1ecdf202",
                        "type": "mov_place_order",
                        "timestamp": 1575367734
                    }
                ],
                "order_timestamp": 1575367734,
                "update_timestamp": 1575367734
            }
    }
}

# 提交闪电兑换订单上链

用指定的地址向链上提交一笔闪电兑换订单

# Request

POST /magnet/v3/merchant/submit-swap-order-tx

# Params

  • String - address:账户地址

# Body

  • String - raw_transaction,关联的原始交易信息
  • Array - signatures,签名信息
  • String - memo,备注信息
{
    "raw_transaction":"070100010160015e26978b848afd77d559980e58db9b60559b716312bd1e24af7e44c6efa5c1605dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0a885fd0201011600140ff923ae0944af0cfdd3eb3671db354eaa6b5795220120c44537a8d397ee09315755cd77fd02d66db015f32ba358c3bfafe20d887d041202013cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80c2d72f011600141e03ad3233693b551be8c86f5db062bdbe0c9f6600013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8b292cd02011600140ff923ae0944af0cfdd3eb3671db354eaa6b579500",
    "signatures":[
        [
            "4f5e0b94f983ab6d98c230e7edf031951c93809af318d0bb6c362714794c38c5939df58e43ac1a45599d777386724354c0ced7bab54d19bac02c233fa9e2050a"
        ]
    ],
    "memo":"mock"
}

# Response

  • String - transaction_hash,关联的交易hash
  • Array - order,订单信息
    • String - symbol, 交易对
    • String - side, 交易方向
    • Int - order_id,订单ID
    • String - open_price, 挂单价格
    • String - deal_price, 成交价格
    • String - amount, 挂单数量
    • String - filled_amount, 成交数量
    • String - fee_amount, 手续费
    • String - status, 订单状态,包含提交状态,挂单状态,完全成交,部分成交,取消中,已取消状态
    • String - type,订单类型,磁力兑换或者闪电兑换
    • Array - order_txs,订单关联交易
      • String - hash,关联的交易hash
      • String - type,交易类型,包括匹配,挂单,取消
      • Int - timestamp,交易时间戳
    • Int - order_timestamp,订单的产生时间戳
    • Int - update_timestamp,订单更新的时间戳

示例:

# Request
POST https://ex.movapi.com/magnet/v3/merchant/submit-swap-order-tx?address=vp1qcmcyhjzmg77ec5lrph4n5q9nj8423phhwfq7hu

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

# Response
{
    "code":200,
    "msg":"mock",
    "result":{
        "data":{
            "transaction_hash": "27dad6d060ebd2171b2af018ef61bce4b46b9f209d4c00d2a56f664b1ecdf202",
            "order": {
                "symbol": "BTM/CTM",
                "side": "sell",
                "order_id": 1,
                "open_price": "0.00000933000000000000",
                "deal_price": "0",
                "amount": "1.01",
                "filled_amount": "0.00",
                "fee_amount": "0.00000000",
                "status": "submitted",
                "type": "swap",
                "client_id": "123",
                "order_txs": [
                    {
                        "hash": "27dad6d060ebd2171b2af018ef61bce4b46b9f209d4c00d2a56f664b1ecdf202",
                        "type": "mov_place_order",
                        "timestamp": 1575367734
                    }
                ],
                "order_timestamp": 1575367734,
                "update_timestamp": 1575367734
            }
        }
    }
}

# 获取所有交易对信息

获取所有交易对

# Request

GET /magnet/v3/common/symbols

# Response

  • Int - price_decimal,价格精度
  • Int - amount_decimal,数量精度
  • Array - base_asset,基准资产
    • String - asset_id,基准资产id
    • String - symbol,基准资产名称
  • Array - quote_asset,报价资产
    • String - asset_id,报价资产id
    • String - symbol,报价资产名称

示例:

# Request
GET https://ex.movapi.com/magnet/v3/common/symbols

# Response
{
    "code": 200,
    "msg": "",
    "result": {
        "data":  [
          {
              "price_decimal": 5,
              "amount_decimal": 8,
              "base_asset": {
                  "asset_id": "4483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f5703",
                  "symbol": "BTC"
              },
              "quote_asset": {
                  "asset_id": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                  "symbol": "BTM"
              }
          }
      ] 
}

# 查询订单列表

查询某个地址下的所有订单

# Request

POST /magnet/v3/merchant/list-orders

# Params

  • String - address,账户地址
  • Int - start,查询开始的位置(可选)
  • Int - limit,查询分页每页的数量(可选)

# Body

  • String - _symbol _,交易对
  • String - side,交易方向
  • Array - filter,订单状态筛选器
    • Array - states,订单状态, 可多选,包括"open","partial","filled","canceled","cancelling","submitted"
  • String - order_type,订单类型,磁力兑换或者闪电兑换
{
    "symbol": "ETH/BTC",
    "side": "buy",
    "filter":{
       "states": [
      	 "open",
      	 "partial",
      	 "filled",
      	 "canceled",
         "cancelling",
      	 "submitted"
     	],
      "order_type": "mov",
    }
}

# Response

  • String - symbol, 交易对
  • String - sell, 交易方向
  • Int - order_id,订单ID
  • String - open_price, 挂单价格
  • String - deal_price, 成交价格
  • String - amount, 挂单数量
  • String - filled_amount, 成交数量
  • String - fee_amount, 手续费
  • String - status, 订单状态,包含提交状态,挂单状态,完全成交,部分成交,取消中,已取消状态
  • String - type,订单类型,磁力兑换或者闪电兑换
  • Array - order_txs,订单关联交易
    • String - hash,关联的交易hash
    • String - type,交易类型,包括匹配,挂单,取消
    • Int - timestamp,交易时间戳
  • Int - order_timestamp,订单的产生时间戳
  • Int - update_timestamp,订单更新的时间戳

示例:

# Request
POST https://ex.movapi.com/magnet/v3/merchant/list-orders?address=vp1qcmcyhjzmg77ec5lrph4n5q9nj8423phhwfq7hu&limit=2&start=4

# Body
{
    "symbol": "ETH/BTC",
    "side": "buy",
    "filter":{
       "states": [
      	 "open",
      	 "partial",
      	 "filled",
      	 "canceled",
         "cancelling",
      	 "submitted"
     	],
      "order_type": "mov",
    }
}

# Response
{
    "code": 200,
    "msg": "",
    "result": {
        "data": [
            {
                "symbol": "usdt/btm",
                "side": "sell",
                "order_id": 2,
                "open_price": "7400.0000000000",
                "deal_price": "7300.0000000000",
                "amount": "100.00",
                "filled_amount": "10.00",
                "fee_amount": "74.00000000",
                "status": "partial",
                "type": "mov",
                "client_id": "",
                "order_txs": [],
                "order_timestamp": 0,
                "update_timestamp": 0
            },
            {
                "symbol": "usdt/btm",
                "side": "sell",
                "order_id": 1,
                "open_price": "7200.0000000000",
                "deal_price": "7100.0000000000",
                "amount": "10.00",
                "filled_amount": "1.00",
                "fee_amount": "7.20000000",
                "status": "open",
                "type": "mov",
                "client_id": "",
                "order_txs": [],
                "order_timestamp": 0,
                "update_timestamp": 0
            }
        ] ,
        "limit": 2,
        "start": 2
    }
}

# 取消磁力兑换订单

取消磁力兑换的挂单

# Request

POST /magnet/v3/merchant/submit-cancel-order-tx

# Params

  • String - address:账户地址

# Body

  • String - raw_transaction,关联的原始交易信息
  • Array - signatures,签名信息
  • String - memo,备注信息
{
    "raw_transaction":"070100010160015e26978b848afd77d559980e58db9b60559b716312bd1e24af7e44c6efa5c1605dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0a885fd0201011600140ff923ae0944af0cfdd3eb3671db354eaa6b5795220120c44537a8d397ee09315755cd77fd02d66db015f32ba358c3bfafe20d887d041202013cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80c2d72f011600141e03ad3233693b551be8c86f5db062bdbe0c9f6600013dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8b292cd02011600140ff923ae0944af0cfdd3eb3671db354eaa6b579500",
    "signatures":[
        [
            "4f5e0b94f983ab6d98c230e7edf031951c93809af318d0bb6c362714794c38c5939df58e43ac1a45599d777386724354c0ced7bab54d19bac02c233fa9e2050a"
        ]
    ],
    "memo":"mock"
}

# Response

  • String - transaction_hash,取消的交易hash

示例:

# Request
POST https://ex.movapi.com/magnet/v3/merchant/submit-cancel-order-tx?address=vp1qcmcyhjzmg77ec5lrph4n5q9nj8423phhwfq7hu

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

# Response
{
    "code":200,
    "msg":"mock",
    "result":{
        "data":{
            "transaction_hash":"9287dfe438f2387a02f6812b2f769ed85498ff59376c60b6d79d2506329330ee"
        }
    }
}
Last Updated: 12/16/2020, 1:49:21 PM