Private API

Last update: 31.01.2015 09:00PM

Timezone

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

API authentication

To access private API methods you have to add three headers to your HTTP request

  1. apikey - your public key. You can get it in your profile.
  2. nonce - regular integer number. You should increase it every request. You are not required to start with 1. A common practice is to use unix time for that parameter. Maximum value: 2147483647
  3. sign - is a HMAC-SHA512 encoded with API secret key query string. For example: market_alias=ppc_ltc&offset=100&limit=100.

PHP example:

$query_string = http_build_query($_POST, '', '&');
$ethalon_sign = hash_hmac("sha512", $query_string, $api_secret_key);

Minimum order amount

Minimum order amount depends on order price. Order total should be greater or equal 1 satoshi (0.00000001). If price 0.001, then minimum order amount is 0.00001

Reference

  1. Get balance
  2. Get trades history
  3. Get account transactions
  4. Make sell order
  5. Make buy order
  6. Cancel order
  7. Get opened orders
  8. Get all opened orders
  9. Withdraw
  10. Get deposit address

Get balances

POST https://api.comkort.com/v1/private/user/balance

Get balance

Parameters

Parameter Required Description
key Optional Can be NULL, String or Array. If NULL - return all balances. If string - only one balance. IF array - return specified balances.

Response example

{
    "42": {
            "key": "42",
            "balance": "0.00000000",
            "reserve": "0.00000000"
    },
    "BTC": {
            "key": "BTC",
            "balance": "0.00000000",
            "reserve": "0.00000000"
    },
    "LTC": {
            "key": "LTC",
            "balance": "574.08487582",
            "reserve": "4.00800000"
    },
    …
}

Get trades history

POST https://api.comkort.com/v1/private/user/trades

Return list of trades for specified market alias.

Parameters

Parameter Required Description
market_alias Optional Specify market alias. Should be string only.
sort Optional Set sort direction by trade time. Can be “ASC” or “DESC” only.
limit Optional Limit response rows. Default value - 100. Maximum value: 100. Minimum value: 1.
offset Optional How many rows should be skipped the beginning. Default value - 0. Minimum value: 0.

Response example

{
    "market_alias": "ppc_ltc",
    "trades": [
        {
            "id": "7780",
            "amount": "1.00000000",
            "price": "1.00000000",
            "total": "1.00000000",
            "time": "2014-06-21T19:24:45+00:00",
            "type": "sell",
            "market_alias": "ppc_ltc"
        },
        {
            "id": "7781",
            "amount": "1.00000000",
            "price": "1.00000000",
            "total": "1.00000000",
            "time": "2014-06-21T19:24:45+00:00",
            "type": "sell",
            "market_alias": "ppc_ltc"
        },
        …
    ]
}

Get account transactions

POST https://api.comkort.com/v1/private/user/transactions

Return list of all deposits, withdrawals and transfers.

Parameters

Parameter Required Description
key Required Account key. For example: BTC
type Optional Possible values: deposit, withdrawal, transfer, NULL. Default value NULL.
sort Optional Set sort direction by transaction time. Can be “ASC” or “DESC” only.
limit Optional Limit response rows. Default value - 100. Maximum value: 100. Minimum value: 1.
offset Optional How many rows should be skipped the beginning. Default value - 0. Minimum value: 0.

Response example

{
    "key": "PPC",
    "transactions": [
        {
            "time": "2014-04-19T16:02:39+00:00",
            "amount": "-1188361.07403600",
            "fee": "0.00000000",
            "tx_confirmed": true,
            "type": "transfer",
            "txid": null
        },
        {
            "time": "2014-04-17T20:16:18+00:00",
            "amount": "-379992.76403600",
            "fee": "0.00000000",
            "tx_confirmed": true,
            "type": "transfer",
            "txid": null
        },
        …
    ]
}

Make sell order

POST https://api.comkort.com/v1/private/order/sell

Create limit sell order

Parameters

Parameter Required Description
market_alias Required Market where limit order will be placed
amount Required How many coins will be sold
price Required Price for 1 coin

Response example

{
    "order_id": 12998,
    "market_alias": "ppc_ltc",
    "type": "sell",
    "fee": "0.00200000",
    "price": "1.00000000",
    "amount": "1.00000000",
    "reserve_amount": "1.00200000",
    "fee_amount": "0.00200000"
}

Make buy order

POST https://api.comkort.com/v1/private/order/buy

Create limit buy order

Parameters

Parameter Required Description
market_alias Required Market where limit order will be placed
amount Required Amount of coins to buy
price Required Price for 1 coin

Response example

{
    "order_id": 12998,
    "market_alias": "ppc_ltc",
    "type": "buy",
    "fee": "0.00200000",
    "price": "1.00000000",
    "amount": "1.00000000",
    "reserve_amount": "1.00200000",
    "fee_amount": "0.00200000"
}

Cancel order

POST https://api.comkort.com/v1/private/order/cancel

Cancel order with specified ID

Parameters

Parameter Required Description
order_id Required Order ID you want to cancel

Response example

{
    "success": true,
    "order_id": "17038"
}

Get opened orders

POST https://api.comkort.com/v1/private/order/list

Return list of only your opened orders for specified market alias.

Parameters

Parameter Required Description
market_alias Required Market where limit order will be placed

Response example

{
    "market_alias": "ppc_ltc",
    "orders": [
        {
            "id": "12998",
            "type": "sell",
            "amount": "1.00000000",
            "start_amount": "1.00000000",
            "fee": "0.00200000",
            "price": "1.00000000"
        },
        {
            "id": "12997",
            "type": "sell",
            "amount": "1.00000000",
            "start_amount": "1.00000000",
            "fee": "0.00200000",
            "price": "1.00000000"
        },
        {
            "id": "12996",
            "type": "sell",
            "amount": "1.00000000",
            "start_amount": "1.00000000",
            "fee": "0.00200000",
            "price": "1.00000000"
        },
        …
    ]
}

Get all opened orders

POST https://api.comkort.com/v1/private/order/list_all

Return list of only your opened orders for all markets.

No parameters

Response example

{
    "orders": {
        "xxl_doge": [
            {
                "id": "1454798",
                "type": "buy",
                "amount": "10.00000000",
                "start_amount": "10.00000000",
                "fee": "0.20000000",
                "price": "0.00000649",
                "market_alias": "xxl_doge",
                "added": "1417509818.783052"
            }
        ],
        "ltc_btc": [
            {
                "id": "1454642",
                "type": "sell",
                "amount": "0.10000000",
                "start_amount": "0.10000000",
                "fee": "0.20000000",
                "price": "0.00999999",
                "market_alias": "ltc_btc",
                "added": "1417509124.443101"
            }
        ]
    }
}

Withdraw

POST https://api.comkort.com/v1/private/account/withdraw

Withdraw coins from specified account

Parameters

Parameter Required Description
key Required Fork key
amount Required Amount of coins to withdraw
address Required Destination address
amount_with_fee Optional Should we add fee to your amount (0) or fee should be subtracted from specified amount(1)
Default value - 0

Response example

{
    "transaction_id": "{txid}"
}

Get deposit address

POST https://api.comkort.com/v1/private/account/address

Get deposit address

Parameters

Parameter Required Description
key Required Fork key

Response example

{
    "address": "mifkM3jwMqZ6EAVX5GpDfmgqChH41yrZnD"
}