# MOV闪兑API

基础URL:

Client URL
Base URL https://flashswap.blockmeta.com/api/

# API列表

  • 获取市场深度
  • 发送订单
  • 撤销订单

# 获取闪兑市场深度

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

# Request

GET /v1/market-depth

# Headers

  • String- symbol:需查询深度的交易对,比如BTM/USDT

# Response

  • String- symbol:交易对
  • array- bids:指定深度的买单的价格和数量
  • array- asks:指定深度的卖单的价格和数量
  • 示例:
# Request
GET http://flashswap.bystack.com/api/v1/market-depth?symbol=BTM/USDT

# Response
{
    "code": 200,
    "msg": "",
    "result": {
        "data": {
            "symbol": "BTM/USDT",
            "fee_rate": "0.003000",
            "asks": [
                [
                    "0.0579",
                    "6188.49"
                ],
                [
                    "0.0580",
                    "160.46"
                ]
            ],
            "bids": [
                [
                    "0.0566",
                    "20918.72"
                ],
                [
                    "0.0565",
                    "4352.27"
                ]
            ]
        }
    }
}

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

# 发送订单

闪兑需要本地启动一个Dealer,具体见MOV闪兑接入文档

# Request

POST http://127.0.0.1:1024/api/v1/place-order

# Body

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

# Response

  • Int- code:状态码,200为成功
  • String- msg:返回的消息
  • Object- result:结果信息
    • String- data:这里是空值
  • 示例
# Request
POST http://127.0.0.1:1024/api/v1/place-order

{
  'price': '6100',
  'amount': '0.01',
  'side': 'buy',
  'symbol': 'BTC/USDT'
}

# Response
{
  "code": 200,
  "msg": "",
  "result": {
    "data": ""
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# 撤销订单

闪兑需要本地启动一个Dealer,具体见MOV闪兑接入文档

# Request

POST http://127.0.0.1:1024/api/v1/cancel-order

# Body

  • String- symbol:挂单交易对
  • String- side:买或者卖

# Response

  • Int- code:状态码,200为成功
  • String- msg:返回的消息
  • Object- result:结果信息
    • String- data:这里是空值
  • 示例
# Request
POST http://127.0.0.1:1024/api/v1/cancel-order

{
  'symbol': 'BTC/USDT',
  'side': "buy"
}


# Response

{
  "code": 200,
  "msg": "",
  "result": {
    "data": ""
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Last Updated: 5/9/2020, 10:08:52 AM