» UfoDex Public API (Poloniex compatible), version 0.1

UfoDex Public API (Poloniex compatible), version 0.1

This section describes public UfoDex HTTP API in Poloniex-compatible output format, version 0.1.

Table of contents

Get Orderbook (Poloniex style)

  https://ufodex.io/dexsrv/mainnet/api/v1/public?command=returnOrderBook&currencyPair=all&depth=DEPTH_VALUE

Returns the order book in Poloniex-compatible format for a given market, as well as a sequence number used by websockets for synchronization of book updates and an indicator specifying whether the market is frozen. You may set currencyPair to “all” to get the order books of all markets.

Request Parameter Description
currencyPair A pair like UFO_BTC or all
depth (optional) Default depth is 50. Max depth is 100.


Field Description
asks An array of price aggregated offers in the book ordered from low to high price.
bids An array of price aggregated bids in the book ordered from high to low price.
isFrozen Indicates if trading the market is currently disabled or not.
seq An always-incrementing sequence number for this market.


Call example:

Response example:

{
  "BTC_USDT": {
      "asks": [],
      "bids": [
                ["5170.00000000",51.7],
                ["5165.00000000",51.65],
                ["5055.00000000",10110],
                ["3800.00000000",30],
                ["2700.00000000",540]
              ],
      "isFrozen": "0",
      "seq": 1560277915626097729
    },
    "UFO_BTC": {
      "asks": [
                ["0.00000012",9850920],
                ["0.00000018",40000],
                ["0.00000036",33000],
                ["0.00000049",49882.205712380004],
                ["0.00000220",5152.62281516]
              ],
      "bids": [
                ["0.00000003",0.06],
                ["0.00000002",0.06],
                ["0.00000001",0.04]
              ],
      "isFrozen": "0",
      "seq": 1560277915621654923
    }
}


Get Trade History (Poloniex style)

  https://ufodex.io/dexsrv/mainnet/api/v1/public?command=returnTradeHistory&currencyPair=CUR1_CUR2

Returns trade history in Poloniex-compatible format in a range specified in UNIX timestamps by the “start” and “end” GET parameters.

Fields include:

Field Description
globalTradeID The globally unique ID associated with this trade.
tradeID The ID unique only to this currency pair associated with this trade.
date The UTC date and time of the trade execution.
type Designates this trade as a buy or a sell from the side of the taker.
rate The price in base currency for this asset.
amount The number of units transacted in this trade.
total The total price in base units for this trade.


Call example:

Response example:

[
  {
    "globalTradeID": "452b70717a7b8c15.c5bf1e246cb30c3e3ed3504090cef49d24932c2d96de55fdbce6e35551b9a568",
    "tradeID":       "452b70717a7b8c15.c5bf1e246cb30c3e3ed3504090cef49d24932c2d96de55fdbce6e35551b9a568",
    "date":          "2019-03-16 16:11:38",
    "type":          "sell",
    "rate":          "3997.25000000",
    "amount":        "0.00200000",
    "total":         "7.99450000"
  },
  {
    "globalTradeID": "bd22a08570019615.c636ad129c01b26eb23832277a30b73c823e4b9e1c8705dee51fc73e1cc3e9fc",
    "tradeID":       "bd22a08570019615.c636ad129c01b26eb23832277a30b73c823e4b9e1c8705dee51fc73e1cc3e9fc",
    "date":          "2019-04-16 18:06:06",
    "type":          "buy",
    "rate":          "5015.00000000",
    "amount":        "0.01000000",
    "total":         "50.15000000"
  }
]