API

РУС

The RESTful API at eXion.IO allows to access market data and manage trades using the custom-written software.

PUBLIC API

API is available to all users without registration. It contains public information about trading on the site.


RATE

Returns rates for all trade pairs on the exchange.

https://exion.io/api/rate


    [
    {
    "currFrom":"BTC",
    "currTo":"EUR",
    "rate":2185.3325
    },
    {
    "currFrom":"BTC",
    "currTo":"GBP",
    "rate":2040.9796
    }
    ]

Returns the exchange rate for a given trading pair.

https://exion.io/api/rate/ltc:uah


    [
    {
    "currFrom":"LTC",
    "currTo":"UAH",
    "rate":939.2329
    }
    ]


PRICE

Returns the price of the last transaction for a given trading pair.

https://exion.io/api/lastprice/ltc:uah


    [
    {
    "currFrom":"LTC",
    "currTo":"UAH",
    "price":940.14
    }
    ]


HISTORY OF DEALS

Returns the deals history for the last 24 hours for a given trading pair.

https://exion.io/api/tradehistory/ltc:uah


    [
    {
    "currFrom":"LTC",
    "currTo":"UAH",
    "type":"BUY",
    "date":"31.05.2017 08:16:43",
    "amount":0.0050000000,
    "price":938.87
    },
    {
    "currFrom":"LTC",
    "currTo":"UAH",
    "type":"BUY",
    "date":"31.05.2017 08:19:04",
    "amount":0.0020000000,
    "price":940.14
    }
    ]


ORDER BOOK

Returns a list of open orders for a given trading pair.

https://exion.io/api/orderbook/ltc:uah


    [
    {"orderid":1500,"pair":"LTC:UAH","opentime":1514392266216,"amount":0.00150000,"price":554555.35000000,"cost":831.84000000,"type":"BUY"},
    {"orderid":1501,"pair":"LTC:UAH","opentime":1514392274270,"amount":0.01250000,"price":258654.30000000,"cost":3233.18000000,"type":"BUY"},
    {"orderid":1509,"pair":"LTC:UAH","opentime":1514392340630,"amount":0.00100000,"price":125699.99000000,"cost":125.70000000,"type":"BUY"},
    {"orderid":1511,"pair":"LTC:UAH","opentime":1514392347640,"amount":0.00150000,"price":369458.66000000,"cost":554.19000000,"type":"BUY"},
    {"orderid":1678,"pair":"LTC:UAH","opentime":1514445037976,"amount":0.02158000,"price":458963.25000000,"cost":9904.43000000,"type":"BUY"},
    {"orderid":1488,"pair":"LTC:UAH","opentime":1514392012006,"amount":0.02400000,"price":458935.64000000,"cost":11014.46000000,"type":"SELL"},
    {"orderid":1491,"pair":"LTC:UAH","opentime":1514392056430,"amount":0.02100000,"price":528396.00000000,"cost":11096.32000000,"type":"SELL"}
    ]


PRIVATE API

API is available only registered users. It contains private information about trading on the website.


ACCOUNT BALANCE

Returns the account balance for all currencies.

POST https://exion.io/api/balance

Parameters


    {
    "key": "kjhJiyB85Fdyljd7smVjY",
    "signature": "NWQ2NJNlMTVMTMxNJOTI3OWIODU1Y2ZYTY3ODlOGVYRODJNDAZTA2YU5MRhNKJRDV",
    "nonce": "143920564"
    }

Return: application/json


    {
    "username": "exion@gmail.com",
    "timestamp": 1516959970435,
    "balance": [
    {
    "currency": "BTC",
    "value": 0.0099905
    },
    {
    "currency": "UAH",
    "value": 5444576.86
    },
    {
    "currency": "LTC",
    "value": 0.023723
    }
    ]
    }

Returns the account balance for the specified currency.

POST https://exion.io/api/balance/btc

Return: application/json


    {
    "username": "exion@gmail.com",
    "timestamp": 1516959970435,
    "balance": [
    {
    "currency": "BTC",
    "value": 0.0099905
    }
    ]
    }

OPEN ORDERS

Returns open orders for all trading pairs.

POST https://exion.io/api/activeorders

Parameters


    {
    "key": "kjhJiyB85Fdyljd7smVjY",
    "signature": "NWQ2NJNlMTVMTMxNJOTI3OWIODU1Y2ZYTY3ODlOGVYRODJNDAZTA2YU5MRhNKJRDV",
    "nonce": "143920564"
    }

Return: application/json


    {
    "username": "exion@gmail.com",
    "timestamp": 1516959970435,
    "orders": [
    {
    "orderid": 1719,
    "pair": "BTC:UAH",
    "opentime": 1516970931560,
    "amount": 1,
    "balance": 1,
    "price": 156000,
    "cost": 156000,
    "type": "BUY"
    }
    ]
    }

Returns open orders for the specified trading pair.

POST https://exion.io/api/activeorders/btc:uah

Return: application/json


    {
    "username": "exion@gmail.com",
    "timestamp": 1516959970435,
    "orders": [
    {
    "orderid": 1719,
    "pair": "BTC:UAH",
    "opentime": 1516970931560,
    "amount": 1,
    "balance": 1,
    "price": 156000,
    "cost": 156000,
    "type": "BUY"
    }
    ]
    }

PLACE ORDER

Places a user order for the specified trading pair.

POST https://exion.io/api/addorder/btc:uah

Parameters


    {
    "key": "kjhJiyB85Fdyljd7smVjY",
    "signature": "NWQ2NJNlMTVMTMxNJOTI3OWIODU1Y2ZYTY3ODlOGVYRODJNDAZTA2YU5MRhNKJRDV",
    "nonce": "143920564"
    "type": "BUY"
    "amount": "1.252"
    "price": "258412.25"
    }

Return: application/json


    {
    "ok": "ok",
    "timestamp": 1517904036766
    }


CANCEL ORDER

Cancel an open order.

POST https://exion.io/api/cancelorder

Parameters


    {
    "key": "kjhJiyB85Fdyljd7smVjY",
    "signature": "NWQ2NJNlMTVMTMxNJOTI3OWIODU1Y2ZYTY3ODlOGVYRODJNDAZTA2YU5MRhNKJRDV",
    "nonce": "143920564"
    "orderid": "5126955"
    }

Return: application/json


    {
    "ok": "ok",
    "timestamp": 1517904036766
    }


DEFINITIONS

An API key is required to work with a Private API. Each private call should contain API key, signature and nonce in request body.


API KEY

Your own API key. To get an API key, go to Profile -> API. Set permissions and click "Generate key".

Type: string

NONCE

The nonce is a regular integer number. It must be increasing with every request you make. Read more about it here. Example - if you set nonce to 1 in your first request, you must set it to at least 2 in your second request. You are not required to start with 1. A common practice is to use unix time for that parameter.

Type: string

SIGNATURE

An HMAC-SHA256 encoded message containing - a nonce, username and API key. The HMAC-SHA256 code must be generated using a secret key that was generated with your API key. This code must be converted to its hexadecimal representation (64 uppercase characters).

Is formed: HMAC-SHA256(Concat(nonce, username, API key),secret key)

Type: string

API requests are limited to 500 requests per 10 minutes. If this limit is exceeded, it may result to the ban for 10 minutes. For example, if you perform 500 queries in the first minute, the next query is possible only after 9 minutes + 1 second.


You can email us all additional questions to support@exion.io.