# FlashSwap API
Field | Value |
---|---|
HTTP_SERVER_ENDPOINT | https://ex.movapi.com/flashswap |
# FlashSwap market depth
# Request
GET /v3/market-depth
# Params
Parameter | Required | Type | Description |
---|---|---|---|
symbol | yes | String | Trading pair |
# Response
Field | Type | Description |
---|---|---|
symbol | String | Trading pair |
fee_rate | String | Fee rate |
bids | Array | Specifies the depth of the purchase price and quantity |
asks | Array | Specifies the depth of the sell order price and quantity |
Example:
# Request
GET https://ex.movapi.com/flashswap/v3/market-depth?symbol=BTM/USDT
# Response
{
"code": 200,
"msg": "",
"data": {
"symbol": "BTM/USDT",
"fee_rate": "0.003000",
"asks": [
[
"0.0597",
"47690.22"
],
[
"0.0598",
"140120.65"
]
],
"bids": [
[
"0.0596",
"37857.85"
],
[
"0.0595",
"158661.60"
]
]
}
}
# Submit orders
Submit orders to MOV Server by calling the local Dealer's RESTful API
# Request
POST /api/v1/place-order
# Body
Field | Required | Type | Description |
---|---|---|---|
symbol | yes | String | Trading pair, ex: btc_usdt |
side | yes | String | buy / sell |
price | yes | String | Order price |
amount | yes | String | Amount |
# Response
Field | Type | Description |
---|---|---|
code | Int | Status code |
msg | String | Message returned |
result | Object | The object of result |
data | Object | The object of data |
order_id | Int | Order ID |
order | Object | Order |
symbol | String | Trading pair |
side | String | buy / sell |
price | String | Order price |
amount | String | Amount |
address | String | The side chain address |
Example:
# Request
POST http://127.0.0.1:1024/api/v1/place-order
{
'symbol': 'btm_usdt',
'side': 'sell'
'price': '5',
'amount': '0.3'
}
# Response
{
'code': 200,
'msg': '',
'result': {
'data': {
'order_id': 1340936,
'order': {
'symbol': 'BTM/USDT',
'side': 'sell',
'price': '5',
'amount': '0.3'
},
'address': 'vp1quxu2u2m04stfc82v3ucgpr00vr0w8xuc2zqgu5'
}
}
}
# Cancel order
Cancel the order from MOV Server by calling the local Dealer's RESTful API
# Request
GET /api/v1/cancel-orde
# Params
Field | Required | Type | Description |
---|---|---|---|
order_id | yes | String | Order ID |
# Response
Field | Type | Description |
---|---|---|
code | Int | Status code |
msg | String | Message returned |
result | Object | Result |
data | Object | Data of result |
Example:
# Request
GET http://127.0.0.1:1024/api/v1/cancel-order?order_id=1340936
# Response
{
'code': 200,
'msg': '',
'result': {
'data': None
}
}
# Query order
Query the order from MOV Server by calling the local RESTful API to start Dealer
# Request
GET /api/v1/orders
# Params
Parameter | Required | Type | Description |
---|---|---|---|
symbol | yes | String | The trade pairs to be queried |
side | yes | String | The trade direction, buy or sell |
# Response
名称 | 类型 | 描述 |
---|---|---|
code | Int | Status code |
msg | String | Message returned |
result | Object | The object of result |
data | Object | The object of data |
order_id | Int | Order ID |
order | Object | Order |
symbol | String | Trading pair |
side | String | buy / sell |
price | String | Order price |
amount | String | Amount |
address | String | The side chain address |
Example:
# Request
GET http://127.0.0.1:1024/api/v1/cancel-order?order_id=1340936
# Response
{
'code': 200,
'msg': '',
'result': {
'data': [{
'order_id': 1340936,
'order': {
'symbol': 'BTM/USDT',
'side': 'sell',
'price': '5',
'amount': '0.3'
},
'address': 'vp1quxu2u2m04stfc82v3ucgpr00vr0w8xuc2zqgu5'
}]
}
}