Skip to content

Public APIs


Depth

Gives the market depth for the given trading pair.
GET /market/depth

Params

Name Type Required Description Sample Value
symbol String Yes Trading Coin Pair BTC_ETH

Example

curl -X GET 'https://exchange.moonx.pro/market/depth?symbol=BTC_ETH'


{
    "sell": [
        [
            0.027983,
            49.768
        ],
        [
            0.027985,
            0.219
        ]
    ],
    "buy": [
        [
            0.027965,
            0.26
        ],
        [
            0.027963,
            7.198
        ],
        [
            0.027961,
            2.958
        ]
    ]
}


24 Hours Info

Gives the 24 Hrs summary and trade history (last 60 trades) for the given trading pair.
GET /market/history/trade

Params

Name Type Required Description Sample Value
symbol String Yes Trading Coin Pair BTC_ETH

Example

curl -X GET 'https://exchange.moonx.pro/market/history/trade?symbol=BTC_ETH'


{
    "24high": "0.02775800000000000000",
    "24low": "0.02510000000000000000",
    "24Total": "77775.6000000000000000",
    "order": [
        {
            "time": "1544418339",
            "type": "SELL",
            "num": 0.322,
            "price": 0.026011
        },
        {
            "time": "1544418337",
            "type": "BUY",
            "num": 0.03,
            "price": 0.026024
        },
        {
            "time": "1544418337",
            "type": "BUY",
            "num": 2.902,
            "price": 0.026024
        }
    ],
    "24Price": "0.02560000000000000000"
}


Tickers

Gives the trade summary for all the available trading pairs.
GET /market/tickers

Example

curl -X GET https://exchange.moonx.pro/market/tickers


{
    "BTC_ETH": {
        "24high": "0.02775800000000000000",
        "24low": "0.02510000000000000000",
        "24Total": "77775.6000000000000000",
        "newPrice": 0.02610,
        "24Price": "0.02560000000000000000"
    },
    "BTC_USDT": {
        "24high": "3887.20000000000000000000",
        "24low": "3624.23000000000000000000",
        "24Total": "5651.23000000000000000000",
        "newPrice": 3736.55,
        "24Price": "3736.23000000000000000000"
    }
}


Klines

Gives the Candlestick Data
GET /dataload/kline-query/pages

Params

Name Type Required Description Sample Value
symbol String Yes Trading Coin Pair BTC_ETH
startTime long Yes Start Time 1543919400
endTime long Yes End Time 1544005800
pageSize long Yes Page Size(max=300) 100
kline String Yes kline (1m, 5m, 15m, 30m, 1h, 1d) 30m

Example

curl -X GET \
  'https://exchange.moonx.pro/dataload/kline-query/pages?symbol=BTC_ETH&startTime=1543919400&endTime=1544005800&pageSize=300&kline=30m'



{
   "code":"100200",
   "data":{
      "pages":{
         "list":[
            {
               "amount":1236.469,
               "close":0.02778,
               "klineType":"MIN30",
               "lowPrice":0.027726,
               "maxPrice":0.027812,
               "open":0.027795,
               "symbol":"BTC_ETH",
               "time":1544004000
            },
            {
               "amount":1202.537,
               "close":0.027782,
               "klineType":"MIN30",
               "lowPrice":0.027724,
               "maxPrice":0.027812,
               "open":0.027785,
               "symbol":"BTC_ETH",
               "time":1544002200
            }
         ],
         "pageNum":1,
         "pageSize":100,
         "pages":1,
         "size":48,
         "startIndex":0,
         "total":100
      }
   },
   "msg":"Success"
}