API Specification

Tidex public API

All API requests are made from this address: https://api.tidex.com/api/3/<method name>/<pair listing>. Currency pairs are hyphen-separated (-), e.g.: https://api.tidex.com/api/3/ticker/eth_btc-ltc_btc

You can use as many pairs in the listing as you wish. Duplicates are not allowed. It is also possible to use only one pair: https://api.Tidex.com/api/3/ticker/eth_btc. A set of pairs works with all the methods presented in the public api except info. All information is cached every 2 seconds, so there's no point in making more frequent requests. All API responses have the following format JSON.

Important! API will display an error if we disable one of the pairs listed in your request. If you are not going to synchronize the state of pairs using the method info, you need to send the GET-parameter ignore_invalid equal to 1, e.g.: https://api.tidex.com/api/3/ticker/eth_btc-ltc_btc?ignore_invalid=1. Without the parameter ignore_invalid this request would have caused an error because of a non-existent pair.

Method info

This method provides all the information about currently active pairs, such as the maximum number of digits after the decimal point, the minimum price, the maximum price, the minimum transaction size, whether the pair is hidden, the commission for each pair.

Sample request: https://api.tidex.com/api/3/info

Sample response:

   {
        "server_time":1370814956,
        "pairs":{
            "eth_btc":{
                "decimal_places":3,
                "min_price":0.1,
                "max_price":400,
                "min_amount":0.01,
                "hidden":0,
                "fee":0.2
            }
        ...
        }
    }
decimal_places: number of decimals allowed during trading.
min_price: minimum price allowed during trading.
max_price: maximum price allowed during trading.
min_amount: minimum sell / buy transaction size.
hidden: whether the pair is hidden, 0 or 1.
fee: commission for this pair.

A hidden pair (hidden=1) remains active but is not displayed in the list of pairs on the main page. The Commission is displayed for all users, it will not change even if it was reduced on your account in case of promotional pricing. If one of the pairs is disabled, it will simply disappear from the list.

Method ticker

This method provides all the information about currently active pairs, such as: the maximum price, the minimum price, average price, trade volume, trade volume in currency, the last trade, Buy and Sell price. All information is provided over the past 24 hours.

Sample request: https://api.tidex.com/api/3/ticker/eth_btc

Sample response:

   {
        "eth_btc":{
            "high":0.07161592,
            "low":0.06892569,
            "avg":0.070270805,
            "vol":103.2840945024957623,
            "vol_cur":1464.62728575,
            "last":0.06982246,
            "buy":0.06951214,
            "sell":0.07020298,
            "updated":1505065597
        }
        ...
    }
high: maximum price.
low: minimum price.
avg: average price.
vol: trade volume.
vol_cur: trade volume in currency.
last: the price of the last trade.
buy: buy price.
sell: sell price.
updated: last update of cache.

Method depth

This method provides the information about active orders on the pair. Additionally it accepts an optional GET-parameter limit, which indicates how many orders should be displayed (150 by default). Is set to less than 2000.

Sample request #1: https://api.tidex.com/api/3/depth/eth_btc
Sample request #2: https://api.tidex.com/api/3/depth/eth_btc-ltc_btc

Sample response:

   {
        "eth_btc":{
            "asks":[
                [103.426,0.01],
                [103.5,15],
                [103.504,0.425],
                [103.505,0.1],
                ...
            ],
            "bids":[
                [103.2,2.48502251],
                [103.082,0.46540304],
                [102.91,0.99007913],
                [102.83,0.07832332],
                ...
            ]
        }
        ...
    }
asks: Sell orders.
bids: Buy orders.

Method trades

This method provides the information about the last trades. Additionally it accepts an optional GET-parameter limit, which indicates how many orders should be displayed (150 by default). The maximum allowable value is 2000.

Sample request: https://api.tidex.com/api/3/trades/eth_btc

Sample response:

   {
        "eth_btc":[
            {
                "type":"ask",
                "price":103.6,
                "amount":0.101,
                "tid":4861261,
                "timestamp":1370818007
            },
            {
                "type":"bid",
                "price":103.989,
                "amount":1.51414,
                "tid":4861254,
                "timestamp":1370817960
            },
            ...
        ]
        ...
    }
type: ask – Sell, bid – Buy.
price: Buy price/Sell price.
amount: the amount of asset bought/sold.
tid: trade ID.
timestamp: UNIX time of the trade

Tidex trade API

To use this API, you need to create an API key. An API key can be created in your Profile in the API Keys section. After creating an API key you’ll receive a key and a secret. Note that the Secret can be received only during the first 3 hours after the creation of the Key. API key information is used for authentication.

All requests to Trade API come from the following URL: https://api.tidex.com/tapi. The method name is sent via the POST-parameter method. All method parameters are sent via the POST-parameters. All server responses are received in the JSON format. Each request needs an authentication. You can find out more on authentication in the relevant section of this documentation.

In the case of successful request, the response will be of the following type:

   {
        "success":1,
        "return":{}
    }

Response in the case of error:

   {
        "success":0,
        "error":""
    }

In the case of error you may also receive a response not in the JSON format. It usually happens if API limits are exceeded or in the case of unknown errors.

Authentication

Authentication is made by sending the following HTTP headers:

Sign — Signature. POST-parameters (param0=val0), signed with a Secret key using HMAC-SHA512.

Method getInfo

Returns information about the user’s current balance, API-key privileges, the number of open orders and Server Time. To use this method you need a privilege of the key info.

Parameters: None.

Sample response:

   {
        "success":1,
        "return": {
            "funds": {
                "eth":325,
                "btc":23.998,
                "ltc":0,
                ...
            },
            "rights": {
                "info":1,
                "trade":0,
                "withdraw":0
            },
        "transaction_count":0,
        "open_orders":1,
        "server_time":1342123547
        }
    }
funds: Your account balance available for trading. Doesn’t include funds on your open orders.
rights: The privileges of the current API key.
transaction_count: Deprecated, is equal to 0.
open_orders: The number of your open orders.
server_time:
Server time (UTC).

Method getInfoExt

Returns information about the user’s current balance (including funds on your open orders), API-key privileges, the number of open orders and Server Time. To use this method you need a privilege of the key info.

Parameters: None.

Sample response:

   {
        success: 1,
        return: {
            funds: {
                btc: {
                    value: 1.5,
                    inOrders: 0.5
                },
                eth: {
                    value: 1.0,
                    inOrders: 0.0
                }, 
                waves: {
                    value: 0.0,
                    inOrders: 5.0
                }
            }, 
            rights: {
                info: true,
                trade: true,
                withdraw: false
            },
            transaction_count: 0, 
            open_orders: 0, 
            server_time: 1505980825
        }, 
        stat: {
            isSuccess: true, 
            serverTime: "00:00:00.0000732", 
            time: "00:00:00.0064923", 
            errors: nil
        }
    }
funds: Your account balance available for trading.
rights: The privileges of the current API key.
transaction_count: Deprecated, is equal to 0.
open_orders: The number of your open orders.
server_time: Server time (UTC).

Method Trade

The basic method that can be used for creating orders and trading on the exchange. To use this method you need an API key privilege to trade. You can only create limit orders using this method, but you can emulate market orders using rate parameters. E.g. using rate=0.1 you can sell at the best market price. Each pair has a different limit on the minimum / maximum amounts, the minimum amount and the number of digits after the decimal point. All limitations can be obtained using the info method in PublicAPI v3.

Parameters:

Parameter
Description
Standart value
pair
pair
eth_btc (example)
type
order type
buy or sell
rate
the rate at which you need to buy/sell
numerical
amount
the amount you need to buy / sell
numerical

You can get the list of pairs using the info method in PublicAPI v3.

Sample response:

   {
        "success":1,
        "return":{
            "received":0.1,
            "remains":0,
            "order_id":0,
            "funds":{
                "eth":325,
                "btc":2.498,
                "ltc":0,
                ...
            }
        }
    }
received: The amount of currency bought/sold.
remains: The remaining amount of currency to be bought/sold (and the initial order amount).
order_id: Is equal to 0 if the request was fully “matched” by the opposite orders, otherwise the ID of the executed order will be returned.
funds: Balance after the request.

Method ActiveOrders

Returns the list of your active orders. To use this method you need a privilege of the info key. If the order disappears from the list, it was either executed or canceled.

Optional parameters:

Parameter
Description
Assumes value
Standart value
pair
pair
eth_btc (example)
all pairs

You can get the list of pairs using the info method in PublicAPI v3.

Sample response:

   {
        "success":1,
        "return":{
            "343152":{
                "pair":"eth_btc",
                "type":"sell",
                "start_amount":13.345,
                "amount":12.345,
                "rate":485,
                "timestamp_created":1342448420,
                "status":0
            }
        }
    }
Array key: Order ID.
pair: The pair on which the order was created.
type: Order type, buy/sell.
amount: The amount of currency to be bought/sold.
rate: Sell/Buy price.
timestamp_created: The time when the order was created.
status: Deprecated, is always equal to 0.

Method OrderInfo

Returns the information on particular order. To use this method you need a privilege of the info key.

Parameters:

Parameter
Description
Assumes value
order_id
 order ID
numerical

Sample response:

   {
        "success":1,
        "return":{
            "343152":{
                "pair":"eth_btc",
                "type":"sell",
                "start_amount":13.345,
                "amount":12.345,
                "rate":485,
                "timestamp_created":1342448420,
                "status":0
            }
        }
    }
Array key: Order ID.
pair: The pair on which the order was created.
type: Order type, buy/sell.
start_amount: The initial amount at the time of order creation.
amount: The remaining amount of currency to be bought/sold.
rate: Sell/Buy price.
timestamp_created: The time when the order was created.
status: 0 - active, 1 – executed order, 2 - canceled, 3 – canceled, but was partially executed.

Method CancelOrder

This method is used for order cancelation. To use this method you need a privilege of the trade key.

Parameters:

Parameter
Description
Assumes value
order_id
order ID
numerical

Sample response:

   {
        "success":1,
        "return":{
            "order_id":343154,
            "funds":{
                "eth":325,
                "btc":24.998,
                "ltc":0,
                ...
            }
        }
    }
order_id:
The ID of canceled order.
funds:
Balance upon request.

Method TradeHistory

Returns trade history. To use this method you need a privilege of the info key.

Optional parameters:

Parameter
Description
Assumes value
Standard value
count
the number of trades for display
numerical
1000
from_id
trade ID, from which the display starts
numerical
0
pair
pair to be displayed
eth_btc (example)
all pairs

When using parameter end, the order parameter automatically assumes the value ASC.

Sample response:

   {
        "success":1,
        "return":{
            "166830":{
                "pair":"eth_btc",
                "type":"sell",
                "amount":1,
                "rate":450,
                "order_id":343148,
                "is_your_order":1,
                "timestamp":1342445793
            }
        }
    }
Array keys: Trade ID.
pair: The pair on which the trade was executed.
type: Trade type, buy/sell.
amount: The amount of currency was bought/sold.
rate: Sell/Buy price.
order_id: Order ID.
is_your_order: Is equal to 1 if order_id is your order, otherwise is equal to 0.
timestamp: Trade execution time.

Method createWithdraw

This method is used to create withdraw. To use this method you need to have a "Finance" privilege. It requires to add at least 1 withdrawal address to the whitelist.

Parameters:

Parameter
Description
Assumes value
asset
currency
BTC, LTC (example)
amount
withdrawal amount
numeric
address
withdrawal address
address
memo
memo
string

Sample response:

   {
        "success":1,
        "return":{
            "withdraw_id":1111,
            "withdraw_info":{
                "id":1111,
                "asset_id":1,
                "asset":"BTC",
                "amount":0.0093,
                "fee":0.0007,
                "create_time":1575128018,
                "status":"Created",
                "data":{
                    "address":"1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
                    "memo":"memo",
                    "tx":null,
                    "error":null
                },
                "in_blockchain":false
            }
        }
    }
withdraw_id:
Withdraw ID.
amount:
The amount sent excluding commission.

Method getWithdraw

This method gets info by Withdraw ID. To use this method you need to have an "Info" privilege.

Parameters:

Parameter
Description
Assumes value
id
withdraw ID
numeric

Sample response:

   {
        "success":1,
        "return":{
            "id":1111,
            "asset_id":1,
            "asset":"BTC",
            "amount":0.0093,
            "fee":0.0007,
            "create_time":1575128018,
            "status":"Created",
            "data":{
                "address":"1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
                "memo":"memo",
                "tx":null,
                "error":null
            },
            "in_blockchain":false
        }
    }
    

Method getDepositAddress

This method returns the address for the deposit. To use this method you need to have an "Info" privilege.

Parameters:

Parameter
Description
Assumes value
asset
currency
BTC, LTC (example)

Sample response:

   {
        "success":1,
        "return":{
            "asset_id":1,
            "asset":"BTC",
            "address":"1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
            "memo":null
        }
    }