Public API

Last update: 29.08.2014 11:00

Overview

Public REST API provides information about markets, their trades and orders. All responses for API are JSON encoded. Below you will find detailed description for general methods.

Caching

All GET requests cached for 1 minute. So all information updates every 60 seconds. Some method cache not the whole result, but its objects. You can use field ‘last_update” to determine when information was updated.

Timezone

All time fields formatted in ISO8601. Timezone for API is GMT.

Reference

  1. Markets list
  2. Market summary
  3. Market orders
  4. Market trades

Markets list

GET https://api.comkort.com/v1/public/market/list

Return list of all available markets.

No input parameters.

Response

{
    "markets": [
        {
            "alias": "42_btc",
            "name": "42/BTC",
            "item": "42",
            "price_currency": "BTC"
        },
        {
            "alias": "ani_btc",
            "name": "ANI/BTC",
            "item": "ANI",
            "price_currency": "BTC"
        },
        …
    ]
}

Market summary

GET https://api.comkort.com/v1/public/market/summary?market_alias={param}

Return markets list with summary information for the last 24 hours about each market .

Parameters

Parameter Required Description
market_alias optional You can filter certain market defining input option “market_alias”. List of available markets can be received with “Market list” method.

Response

{
    "markets": {
        "PPC/LTC": {
            "id": "5",
            "alias": "ppc_ltc",
            "name": "PPC/LTC",
            "last_price": "0.16471260",
            "last_trade_time": "2014-03-26T19:54:15+00:00",
            "volume": "6688.31865200",
            "currency_volume": "1130.41055639",
            "item_code": "PPC",
            "currency_code": "LTC",
            "low": "0.16471111",
            "high": "0.17030072",
	    "item_wallet_status": 1,
            "currency_wallet_status": 1,
            "can_trade": true,
            "recent_trades": [
                {
                    "id": "7092",
                    "amount": "0.00100000",
                    "price": "0.16471260",
                    "total": "0.00016471",
                    "time": "2014-03-26T19:54:15+00:00",
                    "type": "buy"
                }
            // Maximum 50 items
            ],
            "sell_orders": [
                {
                    "price": "0.16471260",
                    "type": "sell",
                    "item": "PPC",
                    "total_price": "21.14035193",
                    "price_currency": "LTC",
                    "amount": "128.34690200"
                }
            // Maximum 20 items
            ],
            "buy_orders": [
                {
                    "price": "0.16471111",
                    "type": "buy",
                    "item": "PPC",
                    "total_price": "9.61912882",
                    "price_currency": "LTC",
                    "amount": "58.40000000"
                }
            // Maximum 20 items
            ],
            "last_update": "2014-03-26T21:39:46+00:00"
        }
    }
}

Market orders

GET https://api.comkort.com/v1/public/order/list?market_alias={param}

Return sell and buy orders stack for a given market.

Parameters

Parameter Required Description
market_alias required List of available markets can be received with “Market list” method.

Response

{
    "orders": {
        "sell": [
            {
                "price": "0.16471260",
                "type": "sell",
                "item": "PPC",
                "total_price": "21.14035193",
                "price_currency": "LTC",
                "amount": "128.34690200"
            },
            …
        ],
        "buy": [
            {
                "price": "0.16471111",
                "type": "buy",
                "item": "PPC",
                "total_price": "9.61912882",
                "price_currency": "LTC",
                "amount": "58.40000000"
            },
            …
        ],
        "last_update": "2014-03-26T21:53:05+00:00"
    }
}

Market trades

GET https://api.comkort.com/v1/public/trade/list?market_alias={market_alias}&period={12h|24h|7d|14d}

Return recent trades for a given market.

Parameters

Parameter Required Description
market_alias required List of available markets can be received with “Market list” method.
period optional Available options: 12h = 12 hours (default), 24h = 24 hours, 7d = 7 days, 14d = 14 days

Response

{
    "trades": [
        {
            "id": "7093",
            "amount": "0.00100000",
            "price": "0.16471111",
            "total": "0.00016471",
            "time": "2014-03-26T22:03:17+00:00",
            "type": "sell"
        },
        {
            "id": "7092",
            "amount": "0.00100000",
            "price": "0.16471260",
            "total": "0.00016471",
            "time": "2014-03-26T19:54:15+00:00",
            "type": "buy"
        }
    ],
    "last_update": "2014-03-26T22:05:41+00:00",
    "market_alias": "ppc_ltc"
}