What is API?

Enso application programming interface (API) allows our clients to access and control their accounts, using custom written software.

Public data functions


Markets

Passing any GET parameters, will result in your request being rejected.

Request
GET https://ensoex.com/api/v2/markets
Returns all available markets.

Response (JSON)
id Market ID
name Market name

Tickers

Passing any GET parameters, will result in your request being rejected.

Request
GET https://ensoex.com/api/v2/tickers/{market}
Supported values for markets: bchbrl / bchbtc / bcheur / bchgbp / bchkzt / bchrub / bchuah / bchusd / btcbrl / btceur / btcgbp / btckzt / btcrub / btcuah / btcusd /
GET https://ensoex.com/api/v2/tickers
Get ticker of all markets.
Request parameters
market Unique market id

Response (JSON)
buy Buy order
sell Sell order
low Lowest order
high Highest order
last Last market price
vol Last market volume

API Authentication

All private API calls require authentication. For a successful authentication you need to provide your API key, a signature and a nonce parameter.

Access Token

Request
POST https://ensoex.com/api/v1/sessions
Returns bearer access token
Request parameters
application_id 76ffd7375055f64151dcee57b2dd
email User email
password User password

Response
bearer_token Bearer token is a string, which is generated in response to a login request. The client must send this token in the Authorization header when making requests to private resources.

Private data functions


Accounts

Passing any GET parameters, will result in your request being rejected.

Request
GET https://ensoex.com/api/v2/members/me
Get your profile and accounts info.

Response (JSON)
sn SN identifier
email User email
accounts Information about currency name and balance for each account

Deposits

Request
GET https://ensoex.com/api/v2/deposits
Get your deposits history.
Request parameters
currency Currency values
limit Set result limit
state Current state

Response (JSON)
id Identification number of deposit
currency Deposit currency
amount Amount of deposit
fee Fee for deposit service
txid Unique transaction id
created_at Deposit create time in iso8601 format.
confirmations Confirmation of deposit
completed_at Deposit completion time
state Current state of deposit (Accepted/Canceled/Pending)
Request
GET https://ensoex.com/api/v2/deposit
Get details of specific deposit.
Request parameters
txid Unique deposit id

Response (JSON)
id Identification number of deposit
currency Deposit currency
amount Amount of deposit
fee Fee for deposit service
txid Unique transaction id
created_at Deposit create time in iso8601 format.
confirmations Confirmation of deposit
completed_at Deposit completion time
state Current state of deposit (Accepted/Canceled/Pending)
Request
GET https://ensoex.com/api/v2/deposit_address
Where to deposit. The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case.
Request parameters
currency The account to which you want to deposit. Available values: aed / bch / brl / btc / cad / chf / cny / eur / gbp / gel / hkd / inr / jpy / kgs / krw / kzt / rub / try / uah / usd / uzs /

Response (JSON)
currency Current currency code
address Currency address

Orders

Request
POST https://ensoex.com/api/v2/orders/clear
Cancel all my orders.
Request parameters
side Either sell or buy

Response (JSON)
This call will cancel all open orders.Returns "true" if all orders have been canceled, "false" if it failed.
Request
POST https://ensoex.com/api/v2/orders
Create a Sell/Buy order.
GET https://ensoex.com/api/v2/orders
Get your orders, results are paginated.
Request parameters
market Unique market id
volume The amount user want to sell/buy
price Price for each unit
ord_type Order type

Response (JSON)
id Unique order id.
side Either 'sell' or 'buy'.
ord_type Type of order, either 'limit' or 'market'.
price Price for each unit. e.g. If you want to sell/buy 1 btc at 3000 usd, the price is '3000.0'
avg_price Average execution price, average of price in trades.
state One of 'wait', 'done', or 'cancel'. An order in 'wait' is an active order, waiting fulfillment; a 'done' order is an order fulfilled; 'cancel' means the order has been canceled.
market The market in which the order is placed, e.g. 'btcusd'. All available markets can be found at /api/v2/markets.
created_at Order create time in iso8601 format.
volume The amount user want to sell/buy. An order could be partially executed, e.g. an order sell 5 btc can be matched with a buy 3 btc order, left 2 btc to be sold; in this case the order's volume would be '5.0', its remaining_volume would be '2.0', its executed volume is '3.0'.
remaining_volume The remaining volume, see 'volume'.
executed_volume The executed volume, see 'volume'.
trades_count Number of trades for this market
Request
POST https://ensoex.com/api/v2/orders/multi
Create multiple sell/buy orders.
Request parameters
market Unique market id
orders[side] Either 'sell' or 'buy'
orders[volume] The amount user want to sell/buy
orders[price] Price for each unit
orders[ord_type] Order type

Response (JSON)
201 Create multiple sell/buy orders.
Request
POST https://ensoex.com/api/v2/order/delete
Cancel an order.
Request parameters
id Unique order id

Response (JSON)
201 Cancel an order.
Request
GET https://ensoex.com/api/v2/order
Get information of specified order.
Request parameters
id Unique order id

Response (JSON)
id Unique order id.
side Either 'sell' or 'buy'.
ord_type Type of order, either 'limit' or 'market'.
price Price for each unit. e.g. If you want to sell/buy 1 btc at 3000 usd, the price is '3000.0'
avg_price Average execution price, average of price in trades.
state One of 'wait', 'done', or 'cancel'. An order in 'wait' is an active order, waiting fulfillment; a 'done' order is an order fulfilled; 'cancel' means the order has been canceled.
market The market in which the order is placed, e.g. 'btcusd'. All available markets can be found at /api/v2/markets.
created_at Order create time in iso8601 format.
volume The amount user want to sell/buy. An order could be partially executed, e.g. an order sell 5 btc can be matched with a buy 3 btc order, left 2 btc to be sold; in this case the order's volume would be '5.0', its remaining_volume would be '2.0', its executed volume is '3.0'.
remaining_volume The remaining volume, see 'volume'.
executed_volume The executed volume, see 'volume'.
trades_count Number of trades for this market
Request
GET https://ensoex.com/api/v2/order_book
Get the order book of specified market.
Request parameters
market Unique market id
asks_limit Limit the number of returned sell orders
bids_limit Limit the number of returned buy orders

Response (JSON)
Returns a JSON dictionary with "bids" and "asks". Each is a list of open orders and each order is represented as a list holding the price and the amount.

Trades

Request
GET https://ensoex.com/api/v2/depth
Get depth or specified market. Both asks and bids are sorted from highest price to lowest.
Request parameters
market Unique market id

Response (JSON)
timestamp Current time converted to integer
Returns a JSON dictionary with "bids" and "asks". Each is a list of open orders and each order is sorted from highest price to lowest.
Request
GET https://ensoex.com/api/v2/trades/my
Get your executed trades. Trades are sorted in reverse creation order.
GET https://ensoex.com/api/v2/trades
Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.
Request parameters
market Unique market id

Response (JSON)
id Unique trade id
price Trade price
volume The amount user want to sell/buy.
funds User funds
market Market id
created_at Order create time in iso8601 format.
side Either 'sell' or 'buy'
Request
GET https://ensoex.com/api/v2/k
Get OHLC(k line) of specific market.
Request parameters
market Unique market id

Response (JSON)
Returns a JSON dictionary with k line of specific market

Request
GET https://ensoex.com/api/v2/k_with_pending_trades
Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator.

Request parameters
market Unique market id
trade_id Unique trade id

Response (JSON)
Returns a JSON dictionary with k data of specific market with pending trades.

Timestamp

Passing any GET parameters, will result in your request being rejected.

Request
GET https://ensoex.com/api/v2/timestamp
Get server current time, in seconds since Unix epoch.

Response (JSON)
Returns a server current time, in seconds since Unix epoch.

Withdraws

Request
GET https://ensoex.com/api/v2/withdraws
List your withdraws as paginated collection.
Request parameters
currency Withdraw currency code

Response (JSON)
id Unique withdraw id
currency Withdraw currency
type Currency type
amount Withdraw amount
fee Withdraw fee
blockchain_txid Blockchain transaction id
rid Recipient id
state Withdraw state
created_at Withdraw create time in iso8601 format.
updated_at Withdraw update time in iso8601 format.
completed_at Withdraw completion time in iso8601 format.
done_at Withdraw executed time in iso8601 format.

User sessions

Passing any GET parameters, will result in your request being rejected.

Request
DELETE https://ensoex.com/api/v2/sessions
Delete all user sessions.

Response (JSON)
204 Delete all user sessions.
Request
POST https://ensoex.com/api/v2/sessions
Create new user session.

Response (JSON)
201 Create new user session.

Solvency

Request
GET https://ensoex.com/api/v2/solvency/liability_proofs/partial_tree/mine
Returns newest partial tree record for member account of specified currency.
Request parameters
currency Unique currency id

Response (JSON)
id Solvency id
partial_tree Partial tree json
sum Solvency sum
created_at Solvency partial tree create time in iso8601 format.

Request
GET https://ensoex.com/api/v2/solvency/liability_proofs/latest
Returns newest liability proof record for given currency.
Request parameters
currency Unique currency id

Response (JSON)
id Solvency id
currency Currency code
type Currency type
sum Solvency sum
addresses Liability proof addresses
balance Current currency balance
created_at Liability proof create time in iso8601 format.

Fees

Passing any GET parameters, will result in your request being rejected.

Request
GET https://ensoex.com/api/v2/fees/trading
Returns trading fees for markets.
GET https://ensoex.com/api/v2/fees/deposit
Returns deposit fees for currencies.
GET https://ensoex.com/api/v2/fees/withdraw
Returns withdraw fees for currencies.

Response (JSON)
market Trading market id
ask_fee Ask fee
bid_fee Bid fee
currency Currency code
type Currency type
fee Fee

Member levels

Passing any GET parameters, will result in your request being rejected.

Request
POST https://ensoex.com/api/v2/pusher/auth
Returns the credentials used to subscribe to private Pusher channel. IMPORTANT: Pusher events are not part of Enso public interface. The events may be changed or removed in further releases. Use this on your own risk.
GET https://ensoex.com/api/v2/member_levels
Returns list of member levels and the privileges they provide.

Response (JSON)
deposit Minimum level of user to deposit
withdraw Minimum level of user to withdraw
trading Minimum level of user to trade