Last updated on March, 1th, 2019
EXMO offers its users four ways to access API.
Public API
This API does not require authorization and can be accessed using the GET or POST methods.
General URL with API access looks like this: https://api.exmo.com/v1/{api_name}?{api_params} where ‘api_name’ is the name of API you are accessing and ‘api_params’ are the incoming request parameters (if necessary)
Method name: | trades |
Type of request: | POST or GET |
Incoming parameters: | pair - one or various currency pairs separated by commas (example: BTC_USD,BTC_EUR) |
Example of use: | https://api.exmo.com/v1/trades/?pair=BTC_USD |
Return value: |
{ "BTC_USD": [ { "trade_id": 3, "type": "sell", "price": "100", "quantity": "1", "amount": "100", "date": 1435488248 } ] } |
Fields description: |
trade_id - deal identifier
type - type of the deal
price - deal price
quantity - currency quantity
amount - total sum of the deal
date - date and time of the deal Unix
|
Method name: | order_book |
Type of request: | POST or GET |
Incoming parameters: |
pair - one or various currency pairs separated by commas (example: BTC_USD,BTC_EUR)
limit – the number of displayed positions (default: 100, max: 1000)
|
Example of use: | https://api.exmo.com/v1/order_book/?pair=BTC_USD |
Return value: |
{ "BTC_USD": { "ask_quantity": "3", "ask_amount": "500", "ask_top": "100", "bid_quantity": "1", "bid_amount": "99", "bid_top": "99", "ask": [[100,1,100],[200,2,400]], "bid": [[99,1,99]] ] } } |
Fields description: |
ask_quantity - the sum of all quantity values in sell orders
ask_amount - the sum of all total sum values in sell orders
ask_top - minimum sell price
bid_quantity - the sum of all quantity values in buy orders
bid_amount - the sum of all total sum values in buy orders
bid_top - maximum buy price
bid - the list of buy orders where every field is: price, quantity and amount
ask - the list of sell orders where every field is: price, quantity and amount
|
Method name: | ticker |
Type of request: | POST or GET |
Incoming parameters: | None |
Example of use: | https://api.exmo.com/v1/ticker/ |
Return value: |
{ "BTC_USD": { "buy_price": "589.06", "sell_price": "592", "last_trade": "591.221", "high": "602.082", "low": "584.51011695", "avg": "591.14698808", "vol": "167.59763535", "vol_curr": "99095.17162071", "updated": 1470250973 } } |
Fields description: |
high - maximum deal price within the last 24 hours
low - minimum deal price within the last 24 hours
avg - average deal price within the last 24 hours
vol - the volume of deals within the last 24 hours
vol_curr - the total value of all deals within the last 24 hours
last_trade - last deal price
buy_price - current maximum buy price
sell_price - current minimum sell price
updated - date and time of data update
|
Method name: | pair_settings |
Type of request: | POST or GET |
Incoming parameters: | None |
Example of use: | https://api.exmo.com/v1/pair_settings/ |
Return value: |
{ "BTC_USD": { "min_quantity": "0.001", "max_quantity": "100", "min_price": "1", "max_price": "10000", "max_amount": "30000", "min_amount": "1" } } |
Fields description: |
min_quantity - minimum quantity for the order
max_quantity - maximum quantity for the order
min_price - minimum price for the order
max_price - maximum price for the order
min_amount - minimum total sum for the order
max_amount - maximum total sum for the order
|
Method name: | currency |
Type of request: | POST or GET |
Incoming parameters: | None |
Example of use: | https://api.exmo.com/v1/currency/ |
Return value: |
["USD","EUR","RUB","BTC","DOGE","LTC"] |
Authenticated API
To access this API it is necessary to use the POST method.
URL — should be used the following address: https://api.exmo.com/v1/{api_name} where `api_name` is the name of API method
Authorization is realized by sending the following headers to the server:
Key — Public key that can be found in user’s profile settings
(example: K-7cc97c89aed2a2fd9ed7792d48d63f65800c447b)
Sign — POST data (param=val¶m1=val1) encrypted with method HMAC-SHA512 using secret key; the secret key also can be found in user’s profile settings
There’s a possibility to associate several keys with one account for API access.Please contact the technical support team for more details.
All the requests should also include the obligatory POST parameter ‘nonce’ with incremental numerical value (>0). The incremental numerical value should never reiterate or decrease.
To access API you can use the already existing code in the following languages:
Getting information about user's account
Method name: | user_info |
Type of request: | POST |
Incoming parameters: | None |
Example of use: | api_query("user_info", Array()); |
Return value: |
{ "uid": 10542, "server_date": 1435518576, "balances": { "BTC": "970.994", "USD": "949.47" }, "reserved": { "BTC": "3", "USD": "0.5" } } |
Fields description: |
uid - user identifier server_date - server date and time balances - user's available balance reserved - user's balance in orders |
Order creation
Method name: | order_create |
Type of request: | POST |
Incoming parameters: |
pair - currency pair quantity - quantity for the order price - price for the order type - type of order, can have the following values:
|
Return value: |
{ "result": true, "error": "", "order_id": 123456 } |
Fields description: |
result - 'true' in case of successful creation and 'false' in case of an error error - contains the text of the error order_id - order identifier |
Creation of an order to buy 3 BTC for 100 USD
api_query("order_create", Array( "pair"=>"BTC_USD", "quantity"=>3, "price"=>100, "type"=>"buy" ));
Creation of an order to sell 3 BTC at 100 USD
api_query("order_create", Array( "pair"=>"BTC_USD", "quantity"=>3, "price"=>100, "type"=>"sell" ));
Creation of a market order to buy 3 BTC
api_query("order_create", Array( "pair"=>"BTC_USD", "quantity"=>3, "price"=>0, "type"=>"market_buy" ));
Creation of a market order to sell 3 BTC
api_query("order_create", Array( "pair"=>"BTC_USD", "quantity"=>3, "price"=>0, "type"=>"market_sell" ));
Creation of a market order to buy BTC for the amount of 100 USD
api_query("order_create", Array( "pair"=>"BTC_USD", "quantity"=>100, "price"=>0, "type"=>"market_buy_total" ));
Creation of a market order to sell BTC for the amount of 100 USD
api_query("order_create", Array( "pair"=>"BTC_USD", "quantity"=>100, "price"=>0, "type"=>"market_sell_total" ));
Order cancellation
Method name: | order_cancel |
Type of request: | POST |
Incoming parameters: | order_id - order identifier |
Example of use: |
api_query("order_cancel", Array( "order_id"=>104235 )); |
Return value: |
{
"result": true,
"error": ""
}
|
Fields description: |
result - 'true' in case of sucessful creation of task for order cancellation and 'false' in case of an error error - containd the error description |
Getting the list of user’s active orders
Method name: | user_open_orders |
Type of request: | POST |
Incoming parameters: | None |
Example of use: |
api_query("user_open_orders", Array()); |
Return value: |
{ "BTC_USD": [ { "order_id": "14", "created": "1435517311", "type": "buy", "pair": "BTC_USD", "price": "100", "quantity": "1", "amount": "100" } ] } |
Fields description: |
order_id - order identifier created - date and time of order creation type - type of order pair - currency pair price - price in the order quantity – quantity in the order amount – sum of the order |
Getting the list of user’s deals
Method name: | user_trades |
Type of request: | POST |
Incoming parameters: |
pair - one or various currency pairs separated by commas (example: BTC_USD,BTC_EUR) offset - last deal offset (default: 0) limit - the number of returned deals (default: 100, мmaximum: 10 000) |
Example of use: |
api_query("user_trades", Array( "pair"=>"BTC_USD", "limit"=>100, "offset"=>0 )); |
Return value: |
{ "BTC_USD": [ { "trade_id": 3, "date": 1435488248, "type": "buy", "pair": "BTC_USD", "order_id": 7, "quantity": 1, "price": 100, "amount": 100 } ] } |
Fields description: |
trade_id - deal identifier date – date and time of the deal type - type of the deal pair - currency pair order_id - user’s order identifier quantity - currency quantity price - deal price amount - total sum of the deal |
Getting the list of user’s cancelled orders
Method name: | user_cancelled_orders |
Type of request: | POST |
Incoming parameters: |
offset - last deal offset (default: 0) limit - the number of returned deals (default: 100, мmaximum: 10 000) |
Example of use: |
api_query("user_cancelled_orders", Array( "limit"=>100, "offset"=>0 )); |
Return value: |
[ { "date": 1435519742, "order_id": 15, "order_type": "sell", "pair": "BTC_USD", "price": 100, "quantity": 3, "amount": 300 } ] |
Fields description: |
date - date and time of order cancellation order_id - order identifier order_type – type of order pair - currency pair price – price in the order quantity – quantity in the order amount – sum of the order |
Getting the history of deals with the order
Method name: | order_trades |
Type of request: | POST |
Incoming parameters: |
order_id - order identifier
|
Example of use: |
api_query("order_trades", Array( "order_id"=>12345 )); |
Return value: |
{ "type": "buy", "in_currency": "BTC", "in_amount": "1", "out_currency": "USD", "out_amount": "100", "trades": [ { "trade_id": 3, "date": 1435488248, "type": "buy", "pair": "BTC_USD", "order_id": 12345, "quantity": 1, "price": 100, "amount": 100 } ] } |
Fields description: |
type – type of order in_currency – incoming currency in_amount - amount of incoming currency out_currency - outcoming currency out_amount - amount of outcoming currency trades - deals array where the values mean the following:
|
Calculating the sum of buying a certain amount of currency for the particular currency pair
Method name: | required_amount |
Type of request: | POST |
Incoming parameters: |
pair - currency pair quantity - quantity to buy |
Example of use: |
api_query("required_amount", Array( "pair"=>"BTC_USD", "quantity"=>"11" )); |
Return value: |
{ "quantity": 3, "amount": 5, "avg_price": 3.66666666 } |
Fields description: |
quantity – quantity you can to buy amount - the sum you will spend avg_price - average buy price |
Getting the list of addresses for cryptocurrency deposit
Method name: | deposit_address |
Type of request: | POST |
Incoming parameters: | None |
Example of use: |
api_query("deposit_address", Array()); |
Return value: |
{ "BTC": "16UM5DoeHkV7Eb7tMfXSuQ2ueir1yj4P7d", "DOGE": "DEVfhgKErG5Nzas2FZJJH8Y8pjoLfVfWq4", "LTC": "LSJFhsVJM6GCFtSgRj5hHuK9gReLhNuKFb", "XRP": "rB2yjyFCoJaV8QCbj1UJzMnUnQJMrkhv3S,1234" } |
Creation of the task for cryptocurrency withdrawal. ATTENTION!!! This API function is available only after request to the Technical Support.
Method name: | withdraw_crypt |
Type of request: | POST |
Incoming parameters: |
amount - amount of currency to be withdrawn currency - name of the currency to be withdrawn address - withdrawal adress invoice - additional identifier (required for XRP) |
Example of use: |
api_query("withdraw_crypt", Array( "amount"=>10, "currency"=>"BTC", "address"=>"16UM5DoeHkV7Eb7tMfXSu...", "invoice"=>"1234" )); |
Return value: |
{ "result": true, "error": "", "task_id": "467756" } |
Fields description: |
result - 'true' in case of successful creation of withdrawal task and 'false' in case of an error error - contains the error description task_id - withdrawal task identifier |
Getting the transaction ID in order to keep track of it on blockchain
Method name: | withdraw_get_txid |
Type of request: | POST |
Incoming parameters: |
task_id - withdrawal task identifier
|
Example of use: |
api_query("withdraw_get_txid", Array( "task_id"=>467756 )); |
Return value: |
{ "result": true, "error": "", "status": true, "txid": "ec46f784ad976fd7f7539089d1a129fe46..." } |
Fields description: |
result - 'true' in case of successful creation of withdrawal task and 'false' in case of an error error - contains the error description status - 'true' if the withdrawal is already done txid - transaction ID that should be used for tracking it on blockchain |
EXCODE API
Using EXCODE API you can create and upload EXCODE coupons. The access is given only after a request to the Technical Support.
Method name: | excode_create |
Type of request: | POST |
Incoming parameters: |
currency - name of coupon currency amount - amount in the coupon login - login of user, who can upload EXCODE coupon (not necessary param, if it present - coupon can upload only this user or their creator) |
Example of use: |
api_query("excode_create", Array( "currency"=>"BTC", "amount"=>10, "login"=>"test_user" )); |
Return value: |
{ "result": true, "error": "", "task_id": "467757", "code": "EX-CODE_9004_BTC7c3f8adc0b158658....", "amount": "10", "currency": "BTC", "login": "test_user", "commission": "0.01", "balances": { "BTC": 940.994, "USD": 949.472 } } |
Fields description: |
result - 'true' in case of successful coupon creation and 'false' in case of an error error - contains the error description task_id - coupon identifier code - EXCODE code amount - sum of the coupon currency - currency of the coupon login - login of user, who can upload EXCODE coupon (if it empty, anybody can load this coupon) commission - commission from the creating the coupon balances - user's balance after the coupon creation |
EXCODE coupon uploading
Method name: | excode_load |
Incoming parameters: |
code - code of the EXCODE coupon |
Example of use: |
api_query("excode_load", Array( "code"=>"EX-CODE_9004_BTC7c3f8adc0b158658...." )); |
Return value: |
{ "result": true, "error": "", "task_id": "467757", "amount": "10", "currency": "BTC" } |
Fields description: |
result - 'true' in case of successful coupon uploading and 'false' in case of an error error - contains the error description task_id - coupon identifier amount - amount in the coupon currency - currency of the coupon |
WALLET API
Wallet API call the same as Authenticated API.
The number of API requests is limited to 10 per/minute from one IP address.
Method name: | wallet_history |
Type of request: | POST |
Incoming parameters: |
date - timestamp of the day (if empty got current day) |
Example of use |
api_query("wallet_history", Array( "date"=>1493998000 )); |
Return value: |
{ "result": true, "error": "", "begin": "1493942400", "end": "1494028800", "history": [{ "dt": 1461841192, "type": "deposit", "curr": "RUB", "status": "processing", "provider": "Qiwi (LA) [12345]", "amount": "1", "account": "", "txid": "ec46f784ad976fd7f7539089d1a129fe46...", }, { "dt": 1463414785, "type": "withdrawal", "curr": "USD", "status": "paid", "provider": "EXCODE", "amount": "-1", "account": "EX-CODE_19371_USDda...", "txid": "", } ] } |
Fields description: |
result - 'true' in case of successful got history and 'false' in case of an error error - contains the error description begin - history period begin end - history period end history - history data, dt - date of the operation type - type of the operation curr - currency of the operation status - status of the operation provider - provider of the operation amount - amount of the operation account - account of the operation (may be empty) txid - transaction ID that should be used for tracking it on blockchain |
API Rate Limits
The number of API requests is limited to 180 per/minute from one IP address or by a single user.