Public Methods


Server Time



1465845534 — unix timestamp



Recent Market Data


{
    "at": server time,
    "ticker": {
        "buy": BTC price for buy,
        "sell": BTC price for sale,
        "low": the lowest price of the trade in 24 hours,
        "high": the highest price of the trade in 24 hours,
        "last": price of the last trade,
        "vol": volume of trading in base currency for 24 hours,
        "amount": total price of trading in quote currency for 24 hours
    }
}



Order Book



{
    "timestamp": server time
    "asks": array of orders for sale
    [
        [price, volume]
    ],
    "bids": array of orders for buy
    [
        [price, volume]
    ]
}

Trades History


[{
    "id": trade ID,
    "price": price for 1 BTC,
    "volume": volume in BTC,
    "funds": volume in UAH,
    "market": market ID,
    "created_at": the time of trade,
    "side": always null
}]




User Methods


Used for user information and bidding. To use the required API-token that can be created at settings page.

All user requests should contain parameters: 'access_key', 'tonce' and 'signature'.

access_key — public part of API-token, which is displayed in a cabinet at API section
tonce — unix timestamp with milliseconds
signature — signature


Signature is generated by an algorithm HEX(HMAC-SHA256("HTTP-verb|URI|params", secret_key))

HTTP-verb — GET or POST
URI — the query string without the domain
params — assorted parameters, including access_key and tonce, but without signature
secret_key — secret part of API-token


For example, a request for user bidding history:

HEX(
    HMAC-SHA256(
        "GET|/api/v2/trades/my|access_key=dV6vEJe1CO&market=btcuah&tonce=1465850766246",
        "AYifzxC3Xo"
    )
)

The result of this function: 33a694498a2a70cb4ca9a7e28224321e20b41f10217604e9de80ff4ee8cf310e — it will be signed for this request


Information About the User and Assets


{
    "email": email,
    "activated": whether an account is activated,
    "accounts": an array of assets
    [{
        "currency": currency,
        "balance": the available amount,
        "locked": the locked amount,
    }]
}


Order Placing




Parameters:

side — buy or sell
volume — volume in BTC
market — btcuah
price — price for 1 BTC


Response:

{
    "id": order ID,
    "side": buy or sell,
    "ord_type": order type — limit or market,
    "price": price for 1 BTC,
    "avg_price": the average trade price for the order, for new order — 0,
    "state": orders state — always wait,
    "market": market ID,
    "created_at": the time of placing the order,
    "volume": volume of trading in BTC,
    "remaining_volume": unfilled amount of BTC,
    "executed_volume": sold amount of BTCs, for new order — 0,
    "trades_count": the number of the trades on the order, for new order — 0
}



Order Cancel




Parameters:

id — order ID


Response:

{
    "id": order ID,
    "side": buy or sell,
    "ord_type": order type — limit or market,
    "price": price for 1 BTC,
    "avg_price": the average trade price for the order,
    "state": order state — always wait,
    "market": market ID,
    "created_at": the time of placing the order,
    "volume": volume of trading in BTC,
    "remaining_volume": unfilled amount of BTC,
    "executed_volume": sold amount of BTC,
    "trades_count": the number of the trades on the order
}



Active User Orders



Parameters:

market — btcuah


Response:

[{
    "id": order ID,
    "side": buy or sell,
    "ord_type": order typ — limit or market,
    "price": price for 1 BTC,
    "avg_price": the average trade price for the order,
    "state": order state — always wait,
    "market": market ID,
    "created_at": the time of placing the order,
    "volume": volume of trading in BTC,
    "remaining_volume": unfilled amount of BTC,
    "executed_volume": sold amount of BTC,
    "trades_count": the number of the trades on the order
}]




User Trade History




Parameters:

market — btcuah


Response:

[{
    "id": trade ID,
    "price": price for 1 BTC,
    "volume": volume in BTC,
    "funds": amount in UAH,
    "market": market ID,
    "created_at": the time of trade,
    "side": bid or ask
}]