Get Started

Source Code

Python Sample Code

API ACCESS

https://www.coins-e.com/api/v3/

API Methods

/markets/list/
/coins/list/
/markets/data/
/market/market_pair/depth/
/market/market_pair/trades/
/wallet/all/
/wallet/coin/
/market/market_pair/

Overview

Coins-E trade API lets you to trade over 100 coins.

To get started get your public/private keys

Important:

  • All times are returned in unix epoch format
  • Rates and quantity are returned as strings with maximum of 8 decimal places.
  • Understand the order workflow

The response from the server is in standard JSON format. There are three params which are returned with every request.

  • status [true/false] the value is true if the request successfully performed what was intended, returns false if it did not.
  • message If the status is false, 'message' carries the error information.
  • systime Unix epoch system time corresponding to when the request was proceesed.

Public Data

$ curl https://www.coins-e.com/api/v2/markets/list/
{
  "status": true,
  "message": "success",
  "systime": 1372852975,
  "markets": [
    {
      "status": "healthy",
      "c2": "BTC",
      "c1": "WDC",
      "trade_fee": "0.00300000",
      "coin2": "bitcoin",
      "coin1": "worldcoin",
      "pair": "WDC_BTC"
    }
  ]
}

List Of Markets

GET https://www.coins-e.com/api/v2/markets/list/

List of all markets available including the status and the trade fee. Trading is allowed only if the status of the market is healthy

$ curl https://www.coins-e.com/api/v2/coins/list/
{
  "status": true,
  "message": "success",
  "systime": 1372852975,
  "coins": [
    {
      "confirmations": 4,
      "trade_fee_percent": "0.30",
      "trade_fee": "0.003",
      "status": "maintanance",
      "tier": 1,
      "name": "bitcoin",
      "block_time": 600,
      "withdrawal_fee": "0.00050000",
      "coin": "BTC",
      "confirmation_time": 2400,
      "folder_name": "bitcoin"
    },
    {
      "confirmations": 5,
      "trade_fee_percent": "0.30",
      "trade_fee": "0.00300000",
      "status": "healthy",
      "tier": 1,
      "name": "digitalcoin",
      "block_time": 20,
      "withdrawal_fee": "0.20000000",
      "coin": "DGC",
      "confirmation_time": 100,
      "folder_name": "digitalcoin"
    }
  ]
}

List Of Coins

GET https://www.coins-e.com/api/v2/coins/list/

List of all coins listed on the exchange including the status and the trade fee. Withdrawals and deposits are processed only if the coin is healthy.

$ curl https://www.coins-e.com/api/v2/markets/data/
{
  "status": true,
  "message": "success",
  "markets": {
    "RED_BTC": {
      "status": "healthy",
      "c2": "BTC",
      "c1": "RED",
      "marketstat": {
        "ltq": "56.70000000",
        "ltp": "0.00000299",
        "total_bid_q": "1986391.93245100",
        "total_ask_q": "169909.00000000",
        "bid": "0.00000550",
        "24h": {
          "volume": "6396.70000000",
          "h": "0.00000299",
          "avg_rate": "0.00000056",
          "l": "0.00000054"
        },
        "bid_q": "2000.00000000",
        "ask": "0.00000900",
        "ask_q": "2000.00000000"
      },
      "marketdepth": {
        "bids": [
          {
            "q": "2000.00000000",
            "cq": "2000.00000000",
            "r": "0.00000550",
            "n": 1
          },
          {
            "q": "0.93245100",
            "cq": "2000.93245100",
            "r": "0.00000185",
            "n": 1
          },
          {
            "q": "3.00000000",
            "cq": "2003.93245100",
            "r": "0.00000129",
            "n": 1
          },
          {
            "q": "99.00000000",
            "cq": "2102.93245100",
            "r": "0.00000099",
            "n": 1
          },
          {
            "q": "114.00000000",
            "cq": "2216.93245100",
            "r": "0.00000067",
            "n": 1
          },
          {
            "q": "5000.00000000",
            "cq": "7216.93245100",
            "r": "0.00000051",
            "n": 1
          },
          {
            "q": "1000000.00000000",
            "cq": "1007216.93245100",
            "r": "0.00000002",
            "n": 1
          },
          {
            "q": "979175.00000000",
            "cq": "1986391.93245100",
            "r": "0.00000001",
            "n": 1
          }
        ],
        "asks": [
          {
            "q": "2000.00000000",
            "cq": "2000.00000000",
            "r": "0.00000900",
            "n": 1
          },
          {
            "q": "340.00000000",
            "cq": "2340.00000000",
            "r": "0.00001800",
            "n": 1
          },
          {
            "q": "149069.00000000",
            "cq": "151409.00000000",
            "r": "0.00002200",
            "n": 2
          },
          {
            "q": "2000.00000000",
            "cq": "153409.00000000",
            "r": "0.00003500",
            "n": 1
          },
          {
            "q": "2000.00000000",
            "cq": "155409.00000000",
            "r": "0.00003800",
            "n": 1
          },
          {
            "q": "2000.00000000",
            "cq": "157409.00000000",
            "r": "0.00004000",
            "n": 1
          },
          {
            "q": "500.00000000",
            "cq": "157909.00000000",
            "r": "0.00006660",
            "n": 1
          },
          {
            "q": "7000.00000000",
            "cq": "164909.00000000",
            "r": "0.00008980",
            "n": 1
          },
          {
            "q": "5000.00000000",
            "cq": "169909.00000000",
            "r": "0.00012000",
            "n": 1
          }
        ]
      }
    }
  },
  "systime": 1373345914
}

Consolidated Market Data

GET https://www.coins-e.com/api/v2/markets/data/

Returns a consolidated list of all markets. The return data includes market stats and also the market depth.

Response Fields

In the marketstat area
ltp
denotes Last traded price
ltq
denotes Last traded quantity
h
denotes High Price
l
denotes Low price
In the asks/bids list
n
denotes number of open orders
r
denotes rate (in terms of C2)
q
denotes quantity on offer (in terms of C1)
cq
denotes cummulative quantity, i.e total quantity available at this rate (in terms of C1)
$ curl https://www.coins-e.com/api/v2/market/WDC_BTC/depth/
{
  "message": "success",
  "status": true,
  "systime": 1372852975,
  "marketdepth": {
    "bids": [
      {
        "n": 1,
        "q": "4.28200000",
        "r": "1.52249000",
        "cq": "4.28200000"
      },
      {
        "n": 1,
        "q": "1.12300000",
        "r": "0.76124500",
        "cq": "5.40500000"
      },
      {
        "n": 1,
        "q": "11.00000000",
        "r": "0.12230000",
        "cq": "16.40500000"
      }
    ],
    "asks": [
      {
        "n": 1,
        "q": "8.98400000",
        "r": "2.92858000",
        "cq": "8.98400000"
      }
    ]
  }
}

Market Depth

GET https://www.coins-e.com/api/v2/market/market_pair/depth/

Returns lists of asks and bids corresponding to the given pair.

Request Parameters

market_pair
market_pair is in the format of C1_C2, where C1 is the first coin's three letter abbrevation and C2 is the second coin's three letter abbrevation. (eg. WDC_BTC)

Response Fields

In the asks/bids list
n
denotes number of open orders
r
denotes rate (in terms of C2)
q
denotes quantity on offer (in terms of C1)
cq
denotes cummulative quantity, i.e total quantity available at this rate (in terms of C1)
$ curl https://www.coins-e.com/api/v2/market/WDC_BTC/trades/
{
  "status": true,
  "message": "success",
  "trades": [
    {
      "pair": "WDC_BTC",
      "buy_order_no": "6402043891679232",
      "id": "0.76124500/5909462682435584-1.52249000/6402043891679232",
      "rate": "1.52249000",
      "created": 1372442273,
      "quantity": "2.45600000",
      "status": "settled",
      "sell_order_no": "5909462682435584"
    },
    {
      "pair": "WDC_BTC",
      "buy_order_no": "4994669008125952",
      "id": "2.19643500/5205775240658944-2.28373500/4994669008125952",
      "rate": "2.28373500",
      "created": 1372442270,
      "quantity": "5.61500000",
      "status": "settled",
      "sell_order_no": "5205775240658944"
    }
  ],
  "systime": 1372852975
}

Market Trades

GET https://www.coins-e.com/api/v2/market/market_pair/trades/

Returns lists of recent trades corresponding to the given pair.

Request Parameters

market_pair
market_pair is in the format of C1_C2, where C1 is the first coin's three letter abbrevation and C2 is the second coin's three letter abbrevation. (eg. WDC_BTC)

Wallet


Authentication required

  • All authenticated requests should be POST requests.
  • All requests should carry a nonce parameter and it should be incremented for every subsequent request.
  • You can obtain your public/private keys required for authenticated requests from the API access page.
  • All requests should include 'key' as a query string parameter which is your public key
  • The POST data should be HMAC SHA-512 signed using your secret key obtained from API access page. The 'sign' should be included in the query string.

Wallet

  • Each Coin has a seperate wallet.
  • Currently withdrawals are not possible via the API.
  • Coin parameter used in the URL is a three letter abbrevation of the coin. Eg. BTC denotes Bitcoin, WDC denotes Worldcoin.
{
  "status": true,
  "message": "success",
  "wallets": {
    "DGC": {
      "a": "0.99800000",
      "h": "0.0",
      "u": "0.00000000"
    },
    "WDC": {
      "a": "83.99800000",
      "h": "0.00000000",
      "u": "0.00000000"
    },
    "BTC": {
      "a": "3.05354081",
      "h": "0.00000002",
      "u": "0.00000000"
    },
    "XPM": {
      "a": "1.99100000",
      "h": "0.00000000",
      "u": "0.0"
    },
    "ANC": {
      "a": "511.87400000",
      "h": "0.00000000",
      "u": "0.00000000"
    }
  },
  "systime": 1372852975
}

Get All Wallets

POST https://www.coins-e.com/api/v2/wallet/all/

Returns all wallets including funds available for trade, funds on hold and unconfimed funds.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
getwallets
nonce
A security integer, should be incremented for every subsequent request.
{
  "status": true,
  "message": "success",
  "wallet": {
    "available": "98.65045400",
    "onhold": "1.34954600",
    "unconfirmed": "0.0"
  },
  "systime": 1372852975
}

Get Wallet

POST https://www.coins-e.com/api/v2/wallet/coin/

Returns the wallet of the requested coin including funds available for trade, funds on hold and unconfimed funds.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
getwallet
nonce
A security integer, should be incremented for every subsequent request.
{
  "status": true,
  "message": "success",
  "deposit_address": "1Q1RaxqZipDgaUg4r7KYqgoftZGhba1CyV",
  "systime": 1372852975
}

Get Deposit Address

POST https://www.coins-e.com/api/v2/wallet/coin/

Returns a deposit address for the requested coin.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
getdepositaddress
nonce
A security integer, should be incremented for every subsequent request.
{
  "status": true,
  "message": "success",
  "systime": 1372852975
}

Update Wallet

POST https://www.coins-e.com/api/v2/wallet/coin/

If a deposit was made and if the deposit is yet to reflect in your wallet, requesting an 'updatewallet' forces the servers to check your wallet for new deposits.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
updatewallet
nonce
A security integer, should be incremented for every subsequent request.

Orders


Authentication required

  • All authenticated requests should be POST requests.
  • All requests should carry a nonce parameter and it should be incremented for every subsequent request.
  • You can obtain your public/private keys required for authenticated requests from the API access page.
  • All requests should include 'key' as a query string parameter which is your public key
  • The POST data should be HMAC SHA-512 signed using your secret key obtained from API access page. The 'sign' should be included in the query string.

Order Workflow

Market Pair: is in the format of C1_C2, where C1 is the first coin's three letter abbrevation and C2 is the second coin's three letter abbrevation. Eg. WDC_BTC denotes worldcoin vs bitcoin

Understand the order workflow. Please understand that orders are not executed immiediately when the order is placed, they are placed in a queue and executed using a FIFO model.

{
  "status": true,
  "message": "B/0.00212300/5517761665040384 received",
  "order": {
    "status": "queued",
    "order_type": "buy",
    "quantity_remaining": "1.00000000",
    "created": 1372846830,
    "id": "B/0.00212300/5517761665040384",
    "quantity": "1.00000000",
    "rate": "0.00212300",
    "is_open": true,
    "pair": "WDC_BTC",
    "fee_rate": "0.00300000"
  },
  "systime": 1372846830
}

New Order

POST https://www.coins-e.com/api/v2/market/market_pair/

Submit a new order to the market.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
neworder
nonce
A security integer, should be incremented for every subsequent request.
order_type
[ buy/sell ]
rate
Eg. 0.002312 (max 8 decimals) (in terms of C2)
quantity
Eg. 0.002312 (max 8 decimals) (in terms of C1)
{
  "status": true,
  "message": "success",
  "order": {
    "status": "queued",
    "order_type": "buy",
    "quantity_remaining": "1.00000000",
    "created": 1372846830,
    "id": "B/0.00212300/5517761665040384",
    "quantity": "1.00000000",
    "rate": "0.00212300",
    "is_open": true,
    "pair": "WDC_BTC",
    "fee_rate": "0.00300000"
  },
  "systime": 1372846830
}

Get Order

POST https://www.coins-e.com/api/v2/market/market_pair/

Returns a single order corresponding to the order id.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
getorder
nonce
A security integer, should be incremented for every subsequent request.
order_id
Eg. B/0.00212300/5517761665040384
{
  "status": true,
  "message": "success",
  "order": {
    "status": "cancel requested",
    "order_type": "buy",
    "quantity_remaining": "1.00000000",
    "created": 1372846830,
    "id": "B/0.00212300/5517761665040384",
    "quantity": "1.00000000",
    "rate": "0.00212300",
    "is_open": true,
    "pair": "WDC_BTC",
    "fee_rate": "0.00300000"
  },
  "systime": 1372846830
}

Cancel Order

POST https://www.coins-e.com/api/v2/market/market_pair/

Requests the order corresponding to the order id to be cancelled.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
cancelorder
nonce
A security integer, should be incremented for every subsequent request.
order_id
Eg. B/0.00212300/5517761665040384
{
  "status": true,
  "message": "success",
  "next_cursor": "E-ABAOsB8gEHY3JlYXRlZPoBCQiI-ab9jJO4AuwBggJiagtkZXZ-Qw",
  "orders": [
    {
      "status": "cancelled",
      "order_type": "buy",
      "created": 1372847281,
      "quantity_remaining": "0.0",
      "fee_rate": "0.00300000",
      "rate": "0.00212300",
      "is_open": false,
      "pair": "WDC_BTC",
      "id": "B/0.00212300/6643661571883008",
      "quantity": "1.00000000"
    },
    {
      "status": "cancelled",
      "order_type": "buy",
      "created": 1372846830,
      "quantity_remaining": "0.0",
      "fee_rate": "0.00300000",
      "rate": "0.00212300",
      "is_open": false,
      "pair": "WDC_BTC",
      "id": "B/0.00212300/5517761665040384",
      "quantity": "1.00000000"
    }
  ],
  "systime": 1372859011
}

List Orders

POST https://www.coins-e.com/api/v2/market/market_pair/

Returns a list of orders assosiated with your account on the specified market.

Header Fields

key
Your public key
sign
HMAC SHA-512 POST data signature

POST Fields

method
listorders
nonce
A security integer, should be incremented for every subsequent request.
filter

[ active/all ] Defaults to active

active:Returns orders that are active (cancelled and fully executed orders are not returned.

all:Returns all orders.

cursor
List traversal is implemented using a cursor, a cursor is returned with the request if there are more orders than that have been returned. Use the cursor in the subsequent request to get the next set of orders.
limit
Defaults to 20. Number of orders to be returned in the request. (Maximum is 100)