# MOV磁力兑换API

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

# 获取市场所有交易对

返回MOV所有的交易对信息

# Request

GET /v3/common/symbols

# Response

  • String- price_decimal:交易对报价的精度(小数点后位数)
  • String- amount_decimal:交易对数量的精度(小数点后位数)
  • Object- base_asset:基础货币的对象
    • String- asset_id:基础货币的ID
    • String- symbol:基础货币的名称
  • Object- quote_asset:基础货币的对象
    • String- asset_id:基础货币的ID
    • String- symbol:基础货币的名称
  • 示例:
# Request
GET https://ex.movapi.com/magnet/v3/common/symbols

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "price_decimal":4,
         "amount_decimal":2,
         "base_asset":{
            "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "symbol":"BTM"
         },
         "quote_asset":{
            "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol":"USDT"
         }
      },
      {
         "price_decimal":2,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"78de44ffa1bce37b757c9eae8925b5f199dc4621b412ef0f3f46168865284a93",
            "symbol":"ETH"
         },
         "quote_asset":{
            "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol":"USDT"
         }
      },
      {
         "price_decimal":8,
         "amount_decimal":2,
         "base_asset":{
            "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "symbol":"BTM"
         },
         "quote_asset":{
            "asset_id":"78de44ffa1bce37b757c9eae8925b5f199dc4621b412ef0f3f46168865284a93",
            "symbol":"ETH"
         }
      },
      {
         "price_decimal":8,
         "amount_decimal":2,
         "base_asset":{
            "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
            "symbol":"BTM"
         },
         "quote_asset":{
            "asset_id":"bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
            "symbol":"BTC"
         }
      },
      {
         "price_decimal":2,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
            "symbol":"BTC"
         },
         "quote_asset":{
            "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol":"USDT"
         }
      },
      {
         "price_decimal":6,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"78de44ffa1bce37b757c9eae8925b5f199dc4621b412ef0f3f46168865284a93",
            "symbol":"ETH"
         },
         "quote_asset":{
            "asset_id":"bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742",
            "symbol":"BTC"
         }
      }
   ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

# 获取市场深度

获取市场指定交易对的深度

# Request

GET /v3/market/depth

# Params

  • String- symbol:查询深度的交易对,比如BTM/USDT
  • Int- depth:查询的市场深度

# Response

  • String- symbol:交易对
  • String- fee_rate:交易手续费费率
  • Int64 - timestamp:服务器时间戳
  • Array - bids:指定深度的买单的价格和数量
  • Array - asks:指定深度的卖单的价格和数量
  • 示例:
# Request
GET https://ex.movapi.com/magnet/v3/market/depth?symbol=BTM/USDT&depth=5

# Response
{
   "code":200,
   "msg":"",
   "data":{
      "symbol":"BTM/USDT",
      "fee_rate":"",
      "asks":[
         [
            "0.0620",
            "213.25"
         ],
         [
            "0.0621",
            "26791.91"
         ],
         [
            "0.0622",
            "3401.84"
         ],
         [
            "0.0623",
            "3875.55"
         ],
         [
            "0.0624",
            "27415.30"
         ]
      ],
      "bids":[
         [
            "0.0612",
            "6488.12"
         ],
         [
            "0.0611",
            "6362.57"
         ],
         [
            "0.0610",
            "1731.20"
         ],
         [
            "0.0608",
            "1818.76"
         ],
         [
            "0.0607",
            "299.48"
         ]
      ],
      "timestamp":1589273712400
   }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

# 构建订单

发送订单需要先构建交易,构建一笔订单可能产生多笔链上交易。
注意:MOV的挂单价格和数量是以交易对的前者为基准,比如BTC/USDT,是以BTC为基准,如果side为buy,则是用USDT买BTC,如果side为sell,则以BTC换USDT

# Request

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

# Params

  • String- address:账户地址

# Body

  • String- price:挂单的价格
  • String- amount:挂单的数量
  • String- side:买单/卖单
  • String- symbol:交易对,比如BTC/USDT
  • String- pubkey:账户公钥

# Response

  • Object- tx:交易
    • String- hash:交易哈希
    • Bool- status:交易是否为一笔手续费耗尽的无效交易
    • Int- size:交易体积
    • Int- submission_timestamp:交易提交的时间戳
    • String- memo:Memo信息
    • Array- inputs:UTXO输入
      • String- script:脚本地址
      • String- address:地址
      • Object- asset:资产ID
        • String- asset_id:资产ID
        • String- symbol:资产代码
      • String- amount:资产数量
      • String- type:UTXO类型
    • Array- outputs:UTXO输出
      • String- script:脚本地址
      • String- address:地址
      • Object- asset:资产ID
        • String- asset_id:资产ID
        • String- symbol:资产代码
      • String- amount:资产数量
      • String- type:UTXO类型
    • Int- fee:交易手续费
    • Array- balances:资产金额变动
      • String- asset:资产ID
      • Int- amount:资产数量
    • Array- types:交易类型
      • String- chain_type:订单类型
        • String- chain_tx:链式合并 UTXO 交易
        • String- mov_matched_tx:磁力合约成交交易
        • String- mov_place_order:磁力合约挂单交易
        • String- mov_cancel_order:磁力合约取消挂单交易
        • String- mov_cancel_order:闪兑交易
    • String- raw_transaction:待签名的交易信息
    • Array- signing_instructions:交易需要签名的信息
      • Object-
        • Array- derivation_path:派生路径
        • Array- sign_data:签名数据
        • String- pubkey:公钥
  • 示例:
# Request
POST https://ex.movapi.com/magnet/v3/merchant/build-place-order-tx?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3

# Body
{
    "price": "0.02033848",
    "amount": "3",
    "symbol": "BTM/USDT",
    "side": "buy",
    "pubkey":"00140e5b5f38718b477c2d08365de85a5db384767e72"
}

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "tx":{
            "hash":"0c6e42ff8f68e1a08eb76d0a162e2f64259cb0ba658161bd3e8ae642125d5ea5",
            "status":True,
            "size":272,
            "submission_timestamp":0,
            "memo":"",
            "inputs":[
               {
                  "script":"0014ba0e092db4cc577fe774d153b59fe7e634623553",
                  "address":"vp1qhg8qjtd5e3thlem569fmt8l8uc6xyd2nmsscks",
                  "asset":{
                     "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                     "symbol":"BTM"
                  },
                  "amount":"0.01",
                  "type":"spend"
               }
            ],
            "outputs":[
               {
                  "utxo_id":"8f2c9f6fb924c1d9cead9796a4c283d6897e24e4b687694b5221483ed4347fe8",
                  "script":"0020184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46515a160014ba0e092db4cc577fe774d153b59fe7e63462355320083b80e0259d963abbcd43d0195dfde3c03e50c6fb5e2ee13ff0429de091a2e2",
                  "address":"smart contract",
                  "asset":{
                     "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                     "symbol":"BTM"
                  },
                  "amount":"0.01",
                  "type":"control"
               }
            ],
            "fee":"0",
            "balances":[
               {
                  "asset":{
                     "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                     "symbol":"BTM"
                  },
                  "amount":"-0.01"
               }
            ],
            "types":[
               "mov_place_order"
            ]
         },
         "raw_transaction":"07010001015e015cadcdf015a12f29f653a4318c164382ffa9b9dc86e596aa0c6ed54d654f1cf553ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0843d0101160014ba0e092db4cc577fe774d153b59fe7e634623553220120083b80e0259d963abbcd43d0195dfde3c03e50c6fb5e2ee13ff0429de091a2e201018401008101ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0843d015c0020184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46515a160014ba0e092db4cc577fe774d153b59fe7e63462355320083b80e0259d963abbcd43d0195dfde3c03e50c6fb5e2ee13ff0429de091a2e200",
         "signing_instructions":[
            {
               "derivation_path":[
                  "2c000000",
                  "99000000",
                  "01000000",
                  "00000000",
                  "01000000"
               ],
               "sign_data":[
                  "23be0ff8daf64ef0ff3b98d577d664d55f6b69d8f91b2faf94f935db61804544"
               ],
               "pubkey":"083b80e0259d963abbcd43d0195dfde3c03e50c6fb5e2ee13ff0429de091a2e2"
            }
         ]
      }
   ]
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

# 提交订单

# Request

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

# Params

  • String- address:账户地址

# Body

  • String- raw_transaction:上一个build-place-order-tx接口返回的数据
  • Array- signatures:签名数据

# Sign Response

  • String- tx_hash:交易哈希
  • Object- order:订单
    • String- symbol:交易对,比如BTC/USDT
    • String- side:
      • String - buy:买单
      • String - sell:卖单
    • Int - order_id:订单ID
    • String- open_price:下单价格
    • String- deal_price:下单价格
    • String- amount:下单数量
    • String- filled_amount:成交数量
    • String- fee_amount:手续费数量
    • String- status:订单状态
      • String- open:未成交
      • String- partial:部分成交
      • String- filled:完全成交
      • String- cancelled:已经取消
      • String- submitted:挂单但为上链
      • String- cancelling:取消但未上链
    • String- type:订单类型
    • Array - order_txs:订单包含的交易
      • Object -
        • String- hash:订单哈希
        • String- type:订单类型
          • String- chain_tx:链式合并 UTXO 交易
          • String- mov_matched_tx:磁力合约成交交易
          • String- mov_place_order:磁力合约挂单交易
          • String- mov_cancel_order:磁力合约取消挂单交易
          • String- mov_cancel_order:闪兑交易
        • Int64- type:订单下到数据库的时间戳
    • Int64 - order_timestamp:订单下单时间
    • Int64 - update_timestamp:订单更新时间
  • 示例:
# Request
POST https://ex.movapi.com/magnet/v3/merchant/submit-place-order-tx?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3

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

# Response
{
   "code":200,
   "msg":"",
   "data":{
      "tx_hash":"0c6e42ff8f68e1a08eb76d0a162e2f64259cb0ba658161bd3e8ae642125d5ea5",
      "order":{
         "symbol":"BTM/USDT",
         "side":"sell",
         "order_id":881934,
         "open_price":"10.00000000000000000000",
         "deal_price":"0",
         "amount":"0.01",
         "filled_amount":"0.00",
         "fee_amount":"0.000000",
         "status":"submitted",
         "type":"mov",
         "client_id":"",
         "order_txs":[
            {
               "hash":"0c6e42ff8f68e1a08eb76d0a162e2f64259cb0ba658161bd3e8ae642125d5ea5",
               "type":"mov_place_order",
               "timestamp":1590371988
            }
         ],
         "order_timestamp":1590371988,
         "update_timestamp":1590371988
      }
   }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

# 构建取消订单

# Request

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

# Body

  • Int- order_id:待取消的订单

# Response

  • Object- tx:交易
    • String- hash:交易哈希
    • Bool- status_fail:交易是否为一笔手续费耗尽的无效交易
    • Int- size:交易体积
    • Int- submission_timestamp:交易提交的时间戳
    • Array- inputs:UTXO输入
      • String- script:脚本地址
      • String- address:地址
      • Object- asset:资产对象
        • String- asset_id:资产ID
        • String- symbol:资产名称
      • Int- amount:资产数量
      • String- type:UTXO类型
    • Array- outputs:UTXO输出
      • String- script:脚本地址
      • String- address:地址
      • Object- asset:资产对象
        • String- asset_id:资产ID
        • String- symbol:资产名称
      • Int- amount:资产数量
      • String- type:UTXO类型
    • Int- fee:交易手续费
    • Array- balances:资产金额变动
    • Array- types:交易类型
    • String- raw_transaction:待签名的交易信息
    • Array- signing_instructions:非交易相关待签名的信息
      • Object-
        • Array- derivation_path:派生路径
        • Array- sign_data:签名数据
  • 示例:
# Request
POST https://ex.movapi.com/magnet/v3/merchant/build-cancel-order-tx

# Body
{
    "order_id": 1
}

# Response
{
   "code":200,
   "msg":"",
   "data":{
      "tx":{
         "hash":"10ad8602b5a8f71459394ed076a9f520a7fa54cbf35233febf0f5171fdc14aa2",
         "status":True,
         "size":239,
         "submission_timestamp":0,
         "memo":"",
         "inputs":[
            {
               "script":"0020184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46515a160014ba0e092db4cc577fe774d153b59fe7e63462355320083b80e0259d963abbcd43d0195dfde3c03e50c6fb5e2ee13ff0429de091a2e2",
               "address":"smart contract",
               "asset":{
                  "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                  "symbol":"BTM"
               },
               "amount":"0.01",
               "type":"spend"
            }
         ],
         "outputs":[
            {
               "utxo_id":"964e1ba5f502ab6e4303887f61df76f84793811c19c657c0731f2d643a16379c",
               "script":"0014ba0e092db4cc577fe774d153b59fe7e634623553",
               "address":"vp1qhg8qjtd5e3thlem569fmt8l8uc6xyd2nmsscks",
               "asset":{
                  "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                  "symbol":"BTM"
               },
               "amount":"0.01",
               "type":"control"
            }
         ],
         "fee":"0",
         "balances":[
            {
               "asset":{
                  "asset_id":"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                  "symbol":"BTM"
               },
               "amount":"0.01"
            }
         ],
         "types":[
            "ordinary"
         ]
      },
      "raw_transaction":"0701000101a50101a2019830463b7e4019a65788edb1cd946fd3de127eda867f04beac81d3a4a05a8ae3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0843d00015c0020184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46515a160014ba0e092db4cc577fe774d153b59fe7e63462355320083b80e0259d963abbcd43d0195dfde3c03e50c6fb5e2ee13ff0429de091a2e2010001013d003bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0843d01160014ba0e092db4cc577fe774d153b59fe7e63462355300",
      "signing_instructions":[
         {
            "derivation_path":[
               "2c000000",
               "99000000",
               "01000000",
               "00000000",
               "01000000"
            ],
            "sign_data":[
               "d95058d693b7968bb97c22147ac29029267ccf9fd7c0ccf5b35781ac4760db28"
            ]
         }
      ]
   }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

# 提交取消订单

# Request

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

# Body

  • String- raw_transaction:上一个cancel-place-order-tx接口返回的数据
  • Array- signatures:签名数据

# Response

  • String- tx_hash:交易哈希
  • 示例:
# Request

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

{
  'raw_transaction': '070100050160015ea36a32db05dde6387a1af256e59dbf549e3388b6e5fe76aec90ad3bc5375673b4483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f570383fa9ad104010116001449f9cb425163e24791f39e9189a7ef3126a0fe0a22012066fb66a351b651ad70de9bdb1cafa3c95c10fc28d19d627cc3c3e34c090eb4350160015e9e6916db156b3bdeb1053080841967cbfc6ef86ac933667fbb04ca5427b551604483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f5703e1d4a8ce04010116001449f9cb425163e24791f39e9189a7ef3126a0fe0a22012066fb66a351b651ad70de9bdb1cafa3c95c10fc28d19d627cc3c3e34c090eb4350160015e34fb4bfeb7e6cd6a3ab6d59139783748cec60408f91c7ce296a39d01c5bb29974483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f5703a9b6b6c004010116001449f9cb425163e24791f39e9189a7ef3126a0fe0a22012066fb66a351b651ad70de9bdb1cafa3c95c10fc28d19d627cc3c3e34c090eb4350160015e4fdb42acd18b165e1622ba3249f6c45cb06b66d2082545b8902c6000f2c02f2a4483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f5703cdeca9bf04010116001449f9cb425163e24791f39e9189a7ef3126a0fe0a22012066fb66a351b651ad70de9bdb1cafa3c95c10fc28d19d627cc3c3e34c090eb4350160015e2255d1f1b3967ce291c42f020d302b4a3e2b1ad11b45cabe2e5da8ca94fdb8c64483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f5703c0f79cbe04010116001449f9cb425163e24791f39e9189a7ef3126a0fe0a22012066fb66a351b651ad70de9bdb1cafa3c95c10fc28d19d627cc3c3e34c090eb435020188010085014483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f570380badadc16015e0020d50a426bdaaf1458d161aba4d8c3ebdd095eac7e1bbeb4a0252a3737ccf2d4925102d41716001449f9cb425163e24791f39e9189a7ef3126a0fe0a2066fb66a351b651ad70de9bdb1cafa3c95c10fc28d19d627cc3c3e34c090eb43500013d003b4483893ef7d9aac788c0e9e49a12398c1d35a2172adb1c8dc551fd169a6f57039aaf660116001449f9cb425163e24791f39e9189a7ef3126a0fe0a00',
  'signatures': [
    ['718a54649e43dcccf3b4e855fd9bf4ea23d5bd05517540eea09e2eb96ebc5b59dcfa4741b3280ec8aae003b276482cb51e2b967087d7821cae5e2d469c245100'],
    ['57032992d83e998325a385d247670175d8fc031e117c54d7b14fb887f276947907321d4cef2a592fb25737092353b96252a9dcb943ab4588a9fde42df32a470e'],
    ['0f521a9fc08b32053cac86e845fae332928d6588aa1039a72c41fe1d9f5418d6a333be2754e83405eed4303ebcb2ddc908792fb3761cd12dcd3154354f64670c'],
    ['8a30dc5d085f701466f3918a88eb5322835860956e33cd8fbb1c3e1afffb8695fe0bc2eac83cd43f365422cdf9e8358af611b3b031b99eb233c984c93fc0c40d'],
    ['7e2d41ddd5b2d15b32375c46cb6807dba4d3d6e6cedb36fef04d4e11a971c1e4495cb0d633738d6113cacc7adb004ab1703f76954d2c952408a509d78d439e0a']
  ],
}

# Response
{
  "code": 200,
  "msg": "",
  "data": {
    "tx_hash": "9c4d0e3da8b473695a59891329bc2aa92c37d889e4f1c162b8403b691b25c2db"
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# 查询订单

通过指定的参数查询满足条件的订单

# Request

POST /v3/merchant/list-orders

# Params

  • String- address:账户地址
  • Int - start:查询交易的开始序号
  • Int - limit:查询交易的数量

# Body

  • String- symbol:交易对
  • String- side:买或者卖,不填表示所有订单
  • String- order_type:订单类型
    • String- mov:磁力合约交易
    • String- swap:闪兑交易
  • String- filter:过滤器,具体选项如下
    • open:未成交的订单
    • partial:部分成交的订单
    • filled:全部成交的订单
    • cancelled:已撤销的订单
    • cancelling:正在撤销的订单
    • submitted:已提交,但还未上链,无法撤销的订单

# Response

  • Array-
    • String- symbol:交易对
    • String- side:买或者卖
    • Int- order_id:订单ID
    • String- amount:总金额
    • String- filled_amount:成交金额
    • String- open_price:挂单的价格
    • String- deal_price:成交的价格
    • String- status:订单状态
      • open:未成交的订单
      • partial:部分成交的订单
      • filled:全部成交的订单
      • cancelled:已撤销的订单
      • cancelling:正在撤销的订单
      • submitted:已提交,但还未上链,无法撤销的订单
    • String- client_id:附加的订单信息
    • Array- order_txs:订单哈希数组 Object- -String- hash:哈希
      • String- type:订单类型
        • String- chain_tx:链式合并 UTXO 交易
        • String- mov_matched_tx:磁力合约成交交易
        • String- mov_place_order:磁力合约挂单交易
        • String- mov_cancel_order:磁力合约取消挂单交易
        • String- mov_cancel_order:闪兑交易
      • Int64- timestamp:订单到数据库时间
    • Int64- order_timestamp:订单创建的时间戳
    • Int64- update_timestamp:订单更新的时间戳
  • 示例:
# Request
POST https://ex.movapi.com/magnet/v3/merchant/list-orders?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3&start=10&limit=10

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

# Response
{
   "code":200,
   "msg":"",
   "data":[a
      {
         "symbol":"BTM/USDT",
         "side":"sell",
         "order_id":617158,
         "open_price":"10.0000000000",
         "deal_price":"0.0000000000",
         "amount":"0.01",
         "filled_amount":"0.00",
         "fee_amount":"0.000000",
         "status":"open",
         "type":"mov",
         "client_id":"123",
         "order_txs":[
            {
               "hash":"975188691f6e6f561f310bafaabe94b9b9d7355328249939012c9828e51cbfc8",
               "type":"mov_place_order",
               "timestamp":1589278879
            }
         ],
         "order_timestamp":1589278879,
         "update_timestamp":1589278881
      },
      {
         "symbol":"BTM/USDT",
         "side":"sell",
         "order_id":590412,
         "open_price":"10.0000000000",
         "deal_price":"0.0000000000",
         "amount":"1.00",
         "filled_amount":"0.00",
         "fee_amount":"0.000000",
         "status":"open",
         "type":"mov",
         "client_id":"123",
         "order_txs":[
            {
               "hash":"0d53d981f3c2c0721ead4ae7fea22f701b7e5f34b73ed7fb5b1ef8429ee39306",
               "type":"mov_place_order",
               "timestamp":1589182761
            }
         ],
         "order_timestamp":1589182761,
         "update_timestamp":1589182762
      }
   ],
   "pagination":{
      "start":0,
      "limit":1000,
      "_links":{

      }
   }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Last Updated: 5/28/2020, 3:25:52 PM