Skip to content

REST API Documentation

Please read the Introduction first.

For now, the REST API does only offer methods to query market data, for order management and personal methods please use the Websocket API.

REST Endpoint

The REST APIs endpoint is api.dex.blue/rest

API limits

5 requests per second.

Querying Market Data

GET ticker

returns all market tickers.

api.dex.blue/rest/ticker

To get a ticker for a single or multiple markets, use the markets argument. Markets are separated with a comma:

api.dex.blue/rest/ticker?markets=OMGETH,MKRETH

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
    "OMGETH" : {
        rate      : RATE,
        change    : CHANGE_24H,
        tradedVol : TRADED_VOLUME_24H,
        priceVol  : PRICE_VOLUME_24H,
        high      : HIGH_24H,
        low       : LOW_24H
    },
    ...
}

Argument: market

GET listed

returns all listed token pairs.

api.dex.blue/rest/listed

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{
    tokens : {
        "OMG" : {
            name     : "OmiseGo",
            contract : "0x000000000...",
            decimals : 18
        },
        ...
    },
    markets : {
        "OMGETH" : {
            traded : "OMG",
            price  : "ETH"
        },
        ...
    }
}

GET orderBookSnapshot

returns a snapshot of the orderbook for a specific market. The orderbook snapshot length can be defined with the optional length parameter.

Possible values for length: 20, 100. Omitting the length parameter returns th unlimited orderbook snapshot.

api.dex.blue/rest/orderBookSnapshot?market=OMGETH&length=20

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
    "bids" : [
        {
            "rate"   : RATE,
            "amount" : AMOUNT,
            "orders" : ORDER_COUNT
        },
        ...
    ],
    "asks" : [
        {
            "rate"   : RATE,
            "amount" : AMOUNT,
            "orders" : ORDER_COUNT
        },
        ...
    ]
}

Argument: market

GET tradeSnapshot

returns a snapshot of the last trades of a specific market.

api.dex.blue/rest/tradeSnapshot?market=OMGETH

1
2
3
4
5
6
7
8
9
[
    {
        time      : TIMESTAMP,
        rate      : RATE,
        amount    : AMOUNT,
        direction : DIRECTION // "buy" or "sell"
    },
    ...
]

Argument: market