NAV

Introduction

Welcome to the CoinAmount API! You can use our API to access CoinAmount API endpoints, which can get information on pairs, tickers, orderbook and historical trades in our database.

Public API

Assets

This endpoint retrieves all assets.

HTTP Request

GET https://coinamount.com/api/v1/assets

The above command returns JSON structured like this:

{  
   "BTC":{  
      "name": "Bitcoin",
      "unified_cryptoasset_id": 1,
      "can_withdraw": true,
      "can_deposit": true,
      "min_withdraw": "0.01",
      "max_withdraw ": "100",
      "maker_fee": "0.01",
      "taker_fee": "0.01",
   },
   "ETH":{  
      "name": "Ethereum",
      "unified_cryptoasset_id": 1027,
      "can_withdraw": false,
      "can_deposit": false,
      "min_withdraw": "0.01",
      "max_withdraw ": "100" 
      "maker_fee": "0.01",
      "taker_fee": "0.01",
   }
}

Pairs

This endpoint retrieves all pairs.

HTTP Request

GET https://coinamount.com/api/v1/pairs

The above command returns JSON structured like this:

{
    "BTCUSDT": {
        "ticker_id": "BTC_USDT",
        "base": "BTC",
        "target":"USDT",
        "base_id": 1,
        "target_id": 825
    },
    "ETHBTC": {
        "ticker_id": "ETH_BTC",
        "base": "ETH",
        "target": "BTC",
        "base_id": 1027,
        "target_id": 1
    }
    ...
}

Tickers

This endpoint retrieves ticker data for all pairs.

HTTP Request

GET https://coinamount.com/api/v1/tickers

The above command returns JSON structured like this:

{
    "BTCUSDT": {
        "ticker_id": "BTC_USDT",
        "base_currency": "BTC",
        "target_currency": "USDT",
        "base_id": 1,
        "target_id": 825,
        "last_price": "48485.62",
        "price_change_percent": "1.23456789",
        "base_volume": "6.080",
        "target_volume": "290411.96",
        "bid":"48486.62",
        "ask":"48490.13",
        "high":"48773.31",
        "low":"46786.87"
    },
    "ETHUSDT": {
        "ticker_id": "ETH_USDT",
        "base_currency": "ETH",
        "target_currency": "USDT",
        "base_id": 1027,
        "target_id": 825,
        "last_price": "3482.10",
        "price_change_percent": "-1.23456789",
        "base_volume": "28.682",
        "target_volume": "98587.20",
        "bid": "3482.10",
        "ask": "3483.17",
        "high": "3540.59",
        "low":"3353.48"
    }
    ...
}

Orderbook

This endpoint retrieves the orderbook of a single pair.

HTTP Request

GET https://coinamount.com/api/v1/orderbook?ticker_id=BTC_USDT

Query Parameters

Parameter Description
ticker_id Ticker ID for the pair to retrieve the orderbook on.

The above command returns JSON structured like this:

{
    "ticker_id": "BTC_USDT",
    "timestamp": "1631978575",
    "bids":[
        ["48476.62", "0.000790"],
        ["48476.52", "0.000840"],
        ...
    ],
    "asks":[
        ["48487.66", "0.000362"],
        ["48494.09", "0.000775"],
        ...
    ]
}

Historical trades

This endpoint retrieves all trades for a single pair.

HTTP Request

GET https://coinamount.com/api/v1/historical_trades?ticker_id=BTC_USDT&limit=50

Query Parameters

Parameter Description
ticker_id Ticker ID for the pair to retrieve the historical trades on.
limit Number of trades to retrieve. Allowed values are between 1 and 500.

The above command returns JSON structured like this:

[
    {
        "trade_id": 2440070,
        "price": "48474.85643235",
        "base_volume": "0.00066644",
        "target_volume": "48474.85643235",
        "trade_timestamp": 1631978687,
        "type":"buy"
    },
    {
        "trade_id": 2439853,
        "price": "48477.36251472",
        "base_volume": "0.00034097",
        "target_volume": "48477.36251472",
        "trade_timestamp": 1631978272,
        "type": "sell"
    },
    ...
]

Trade API

API Key and Signature

Trade endpoints require an additional parameters, api key and signature, to be sent in the query string or request body.

Create your api key and secret key in your CoinAmount profile page.

Endpoints use HMAC SHA256 signatures. Use your secret key and query string concatenated with the request body as the value for the HMAC operation.

Account information

This endpoint retrieves your trade account information.

HTTP Request

GET https://coinamount.com/api/v1/account

The above command returns JSON structured like this:

{
    "commision": {
        "maker": 10,
        "taker": 10,
        "buyer": 0,
        "seller": 0,
    }
    "can_trade": true,
    "can_withdraw": true,
    "can_deposit": true,
    "balances": [
      {
        "asset": "BTC",
        "amount": "123456.7890"
      },
      {
        "asset": "ETH",
        "amount": "123456.7890"
      },
      ...
    ],
}

List orders

This endpoint retrieves your orders list.

HTTP Request

GET https://coinamount.com/api/v1/orders

The above command returns JSON structured like this:

[
    {
        "ticker_id": "BTC_USDT",
        "order_id": 123456,
        "price": "123456.78",
        "target_price": "0.00",
        "quantity": "123.456",
        "filled_quantity": "0.00",
        "status": "ACTIVE",
        "type": "LIMIT",
        "side": "BUY",
        "time": 1622494800,
        "last_updated_time": 1622494800
    },
    {
        "ticker_id": "BTC_USDT",
        "order_id": 123457,
        "price": "123456.78",
        "target_price": "0.00",
        "quantity": "123.456",
        "filled_quantity": "78.90",
        "status": "FILLED",
        "type": "MARKET",
        "side": "SELL",
        "time": 1622494800,
        "last_updated_time": 1622494800
    },
    ...
]

Create order

This endpoint creates a new order.

HTTP Request

POST https://coinamount.com/api/v1/orders

JSON Parameters

Parameter Description
ticker_id Ticker to create the order on.
type LIMIT, MARKET, STOP_LOSS, TAKE_PROFIT
side BUY, SELL
price Price of the order.
quantity Quantity of the order.
target_price Used with STOP_LOSS or TAKE_PROFIT

The above command returns JSON structured like this:

{
    "ticker_id": "BTC_USDT",
    "order_id": 123456,
    "price": "123456.78",
    "target_price": "0.00",
    "quantity": "123.456",
    "filled_quantity": "0.00",
    "status": "NEW",
    "type": "LIMIT",
    "side": "SELL",
    "time": 1622494800,
    "last_updated_time": 1622494800
}

Get order

This endpoint retrieves information for a specific order.

HTTP Request

GET https://coinamount.com/api/v1/orders/{id}

The above command returns JSON structured like this:

{
    "ticker_id": "BTC_USDT",
    "order_id": 123456,
    "price": "123456.78",
    "target_price": "0.00",
    "quantity": "123.456",
    "filled_quantity": "0.00",
    "status": "NEW",
    "type": "MARKET",
    "side": "SELL",
    "time": 1622494800,
    "last_updated_time": 1622494800
}

Cancel order

This endpoint cancels an order.

HTTP Request

DELETE https://coinamount.com/api/v1/orders/{id}

The above command returns an empty response with status code 204.

List trades

This endpoint retrieves your trade list.

HTTP Request

GET https://coinamount.com/api/v1/trades

The above command returns JSON structured like this:

[
    {
        "id": 123456,
        "ticker_id": "BTC_USDT",
        "order_id": 123456,
        "price": "123456.78",
        "quantity": "123.456",
        "quote_quantity": "78.90",
        "commission": "12345.67",
        "time": 1622494800,
        "is_buyer": true,
        "is_maker": false
    },

    {
        "id": 123457,
        "ticker_id": "BTC_USDT",
        "order_id": 123457,
        "price": "123456.78",
        "quantity": "123.456",
        "quote_quantity": "78.90",
        "commission": "12345.67",
        "time": 1622494800,
        "is_buyer": true,
        "is_maker": false
    },
    ...
]