# MOV超导兑换API

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

# 获取市场所有交易对

返回MOV超导兑换的所有的交易对信息

# Request

GET /v1/symbols

# Response

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

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "price_decimal":4,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"c4644dd6643475d57ed624f63129ab815f282b61f4bb07646d73423a6e1a1563",
            "symbol":"USDC"
         },
         "quote_asset":{
            "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol":"USDT"
         }
      },
      {
         "price_decimal":4,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"25f2069140fa3ff4d6e0dc1d0fcaa11ace01eb721f115f0f1a5a3782db597fb1",
            "symbol":"DAI"
         },
         "quote_asset":{
            "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol":"USDT"
         }
      },
      {
         "price_decimal":4,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"25f2069140fa3ff4d6e0dc1d0fcaa11ace01eb721f115f0f1a5a3782db597fb1",
            "symbol":"DAI"
         },
         "quote_asset":{
            "asset_id":"c4644dd6643475d57ed624f63129ab815f282b61f4bb07646d73423a6e1a1563",
            "symbol":"USDC"
         }
      }
   ]
}
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

# 获取交易对兑换价格

返回超导交易交易对兑换的价格

# Request

GET /v1/exchange-rate

# Params

  • String- symbol:查询深度的交易对,比如DAI/USDT
  • String- amount:查询的兑换金额
  • String- side:查询的兑换方向

# Response

  • Int- price_decimal:交易对报价的精度(小数点后位数)

  • Int- amount_decimal:交易对数量的精度(小数点后位数)

  • Object- base_asset:基础货币的对象

    • String- asset_id:基础货币的ID
    • String- symbol:基础货币的名称
  • Object- quote_asset:基础货币的对象

    • String- asset_id:基础货币的ID
    • String- symbol:基础货币的名称
  • String- amount:交易金额

  • String- exchange_rate:实际兑换汇率

  • String- base_exchange_rate:参考兑换汇率

  • String- oracle_exchange_rate:预言机汇率

# Request
POST https://ex.movapi.com/superconducting/v1/exchange-rate

# Response
{
   "code":200,
   "msg":"",
   "data":{
      "amount":"500",
      "exchange_rate":"0.998817",
      "base_exchange_rate":"0.999323",
      "oracle_exchange_rate":"1"
   }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

# 获取交易所存币总金额

返回超导池子里,各个交易对有多少钱

# Request

GET /v1/pool-info

# Response

  • String- symbol:交易对
  • String- base_amount:基本币对
  • String- quote_amount:报价币对
  • String- total_amount:总金额
# Request
POST https://ex.movapi.com/superconducting/v1/pool-info

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "symbol":"USDC/USDT",
         "base_amount":"510487.766162",
         "quote_amount":"563948.740743",
         "total_amount":"1074436.506905"
      },
      {
         "symbol":"DAI/USDT",
         "base_amount":"174766.143552",
         "quote_amount":"808404.879614",
         "total_amount":"983171.023166"
      },
      {
         "symbol":"DAI/USDC",
         "base_amount":"91427.196482",
         "quote_amount":"445954.744501",
         "total_amount":"537381.940983"
      }
   ]
}
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

# 构造超导兑换请求

构造超导交易兑换的请求

# Request

GET /v1/build-exchange

# Params

  • String- address:账户地址

# Body

  • String- pubkey:公钥
  • String- symbol:基本币对
  • String- side:报价方向
  • String- amount:报价总金额
  • String- exchange_rate:报价汇率

# 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/superconducting/v1/build-exchange?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3

{
   "pubkey":"b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf",
   "symbol":"DAI/USDT",
   "side":"buy",
   "amount":"0.1",
   "exchange_rate":"0.977421"
}

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "tx":{
            "hash":"2ee2299dfdff9e26a5a0eb12733202ad959a86f76fa65693a850a6229a00cb2c",
            "status":True,
            "size":263,
            "submission_timestamp":0,
            "memo":"",
            "inputs":[
               {
                  "script":"0014fe0b2ba5ef7176083702e2b67cdf37b862e4375f",
                  "address":"vp1qlc9jhf00w9mqsdczu2m8ehehhp3wgd6lfvyluc",
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"0.112687",
                  "type":"spend"
               }
            ],
            "outputs":[
               {
                  "utxo_id":"77122548d46a644e7e941587bde15d12c5bfa5e51467ee79c09cf8cf01d9d503",
                  "script":"0014e45c93204670591cf4568bb53024225987d2bd9c",
                  "address":"vp1qu3wfxgzxwpv3eazk3w6nqfpztxra90vuvh3v56",
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"0.1",
                  "type":"control"
               },
               {
                  "utxo_id":"77762e1a08d5359677306f1c169772eb115115e039afa1f12ae0ab4fb61d4395",
                  "script":"0014fe0b2ba5ef7176083702e2b67cdf37b862e4375f",
                  "address":"vp1qlc9jhf00w9mqsdczu2m8ehehhp3wgd6lfvyluc",
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"0.012687",
                  "type":"control"
               }
            ],
            "fee":"0",
            "balances":[
               {
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"-0.1"
               }
            ],
            "types":[
               "ordinary"
            ]
         },
         "raw_transaction":"07010001015e015c0bb26ace224218e8e782adcbd90e72f787c1a84d31cfc3014fa06bc87361eed6184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46aff0060201160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f220120b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf02013d003b184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46a08d0601160014e45c93204670591cf4568bb53024225987d2bd9c00013c003a184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd468f6301160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f00",
         "signing_instructions":[
            {
               "derivation_path":[
                  "2c000000",
                  "99000000",
                  "01000000",
                  "00000000",
                  "01000000"
               ],
               "sign_data":[
                  "73e3000f7f6eb98ad2fcce58ad0479f22845aca9d74c3b42b54787fa1819496f"
               ],
               "pubkey":"b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf"
            }
         ]
      }
   ]
}
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
84
85
86
87
88
89
90
91
92

# 构造超导兑换请求

构造超导交易兑换的请求

# Request

GET /v1/submit-exchange

# Params

  • String- address:账户地址

# Body

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

# Response

  • String- tx_hash:交易哈希
  • Object- order:订单
    • String- symbol:交易对,比如DAI/USDT
    • String- side:
      • String - buy:买单
      • String - sell:卖单
    • String - base_amount:基础金额
    • String - quote_amount:报价金额
    • String - build_exchange_rate:兑换汇率
    • String - tx_hash:交易哈希
    • String - fee:交易费率
    • Int64 - timestamp:订单更新时间
# Request
POST https://ex.movapi.com/superconducting/v1/submit-exchange?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3

{
   "raw_transaction":"07010001015e015ce590d63398cccf34b9005689c2b608c7609baf7fe06a57b1370abb7aa983a992184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46f8f0060001160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f220120b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf02013d003b184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46a08d0601160014e45c93204670591cf4568bb53024225987d2bd9c00013c003a184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46d86301160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f00",
   "signatures":[
      [
         "3f9c28bd3b883fae75ec60fb3b381767d5671a73ffa0e1cc44debfca828395574816d0da27879be2990ef5abf742ac1f905f3dd0a643f745ac253f5189101c01"
      ]
   ]
}

# Response

{
   "code":200,
   "msg":"",
   "data":{
      "tx_hash":"2ee2299dfdff9e26a5a0eb12733202ad959a86f76fa65693a850a6229a00cb2c",
      "order":{
         "order_id":227695,
         "symbol":"DAI/USDT",
         "side":"buy",
         "base_amount":"0.097672",
         "quote_amount":"0.100000",
         "build_exchange_rate":"0.9767210000",
         "tx_hash":"2ee2299dfdff9e26a5a0eb12733202ad959a86f76fa65693a850a6229a00cb2c",
         "fee":"0.000048",
         "type":"superconducting_swap",
         "timestamp":1595498532
      }
   }
}
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
Last Updated: 7/23/2020, 6:24:29 PM