Incorporate ATAIX’s easy exchange on your platform with ATAIX API.
The purpose of this page is to provide detailed information about API that can be used by third parties for automation. Trading platform provides REST and WebSocket based APIs.
There are two different type of API calls: Public/Private.
For private calls you need to send “X-API-Key” header with your API key.
REST API URL: https://api.ataix.com/api
Socket URL: wss://ws.ataix.com/
Successful response should contain status (boolean) and result. All requests are limited to maximum 10 request in one second from the same IP address.
REST API calls that does not need any authorization. They are public and can be used by anyone.
URL: /symbols
Method:GET
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Optional | Tradable pair | Should be valid currency pair separated with '-' symbol (e.g. ETH-BTC) |
Returns a list of all pairs that are currently active, or single pair if symbol is specified.
Response:Name | Type | Description |
---|---|---|
id | String | Unique ID of pair |
base | String | Base currency of pair |
quote | String | Quote currency of pair |
symbol | String | Pair (base/quote) |
price | String | Last price of symbol |
volume | String | Total active liqudity |
pricePrecision | Number | Number of decimal points of price value |
totalPrecision | Number | Number of decimal points of total value |
ask | String | Ask price |
bid | String | Bid price |
URL: /currencies
Method: GET
Returns a list of all currencies that are currently active.
Response:Name | Type | Description |
---|---|---|
id | String | Unique ID of currency |
name | String | Name of the currency |
symbol | String | Ticker of the currency |
isActive | Boolean | Determines if currency is enabled |
depositActive | Boolean | Determines if currency deposits are active |
withdrawActive | Boolean | Determines if currency withdrawals are active |
currencyType | String | ['crypto', 'fiat', 'ieo'] |
amountPrecision | Number | Number of decimal points of amount value |
minTradeSize | Number | Minimum amount of the currency to trade |
lotSize | Number | Amount step |
URL: /prices
Method: GET
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Optional | Tradable pair | Should be valid currency pair separated with '-' symbol (e.g. ETH-BTC) |
Returns a list of prices for all pairs or for single pair if symbol is specified.
Response:Name | Type | Description |
---|---|---|
ask | String | Current best ask |
bid | String | Current best bid |
last | String | Last trade price |
open | String | Price of first trade of the day |
low | String | Minimum price since the start of the day |
high | String | Maximum price since the start of the day |
liquidity.base | String | Current active liquidity in base currency |
liquidity.quote | String | Current active liquidity in quote currency |
volume.base | String | Traded volume since the beginning of the day in base currency |
volume.quote | String | Traded volume since the beginning of the day in quote currency |
timestamp | Date | Timestamp of last the trade |
symbol | String | Symbol of pair |
priceChange | String | Price chaange since the start of the day |
URL: /book/:symbol
Method: GET
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Mandatory | Tradable pair | Should be valid currency pair separated with '-' symbol (e.g. ETH-BTC) |
Returns order book for specified symbol.
Response:Name | Type | Description |
---|---|---|
buy | Array[Level] | Array of Levels on bid side |
sell | Array[Level] | Array of Levels on ask side |
Level.price | String | Price of the level |
Level.quantity | String | Volume at current level |
URL: /trades-all?symbol=ETH-BTC&startDate=1561939200000&endDate=1567296000000&page=1&itemsPerPage=10
Method: GET
Query parameters:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
startDate | Optional | Non negative integer | Timestamp |
endDate | Optional | Non negative integer | Timestamp |
page | Mandatory | Positive integer | Page number |
itemsPerPage | Mandatory | Positive integer | Number of items per page |
symbol | Mandatory | Tradable Pair | Should be valid currency pair separated with '-' symbol, or 'any' for all pairs. (ETH-BTC) |
side | Optional | String | ['any', 'buy', 'sell'] |
Returns trade history for specified symbol.
Response:Name | Type | Description |
---|---|---|
tradeId | String | Unique ID of the trade |
pair | String | Name of the pair |
side | Enum (buy/sell) | Direction of the trade |
price | String | Price of the trade |
quantity | String | Amount of base currency traded |
created | Date | Timestamp when trade was made |
All REST API private calls should be made using user's API key which you can get from settings page.
URL: /user/transactions?startDate=1561939200000&endDate=1567296000000&page=1&itemsPerPage=10¤cy=BTC&type=deposit
Method:GET
Headers: X-API-Key: api-key
Query parameters:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
startDate | Optional | Non negative integer | Timestamp |
endDate | Optional | Non negative integer | Timestamp |
page | Mandatory | Positive integer | Page number |
ItemsPerPage | Mandatory | Positive integer | Number of items per page |
currency | Optional | Currency string | Should be valid currency. (BTC, ETH) |
type | Optional | Enum: ['any', 'deposit', 'withdraw', 'adjustment', 'referral'] | Allows to filter only by specified transaction type |
Returns list of transactions related to users balance change. It includes deposit/ withdraw/ adjustment from admin and also funds from referral programs.
Response:Name | Type | Description |
---|---|---|
id | String | Unique ID of transaction |
userId | String | ID of user |
currency | String | Should be valid currency code available in platform |
quantity | String | Transaction amount |
source | String | Source of transaction. Enum: [deposit', 'withdraw', 'adjustment', 'referral'] |
fee | String | Transaction fee |
description | String | |
created | Date | Timestamp when transaction was made |
status | String | ['approved', 'cancelled', 'processed', 'failed'] |
URL: /user/trades?symbol=ETH-BTC&page=1&itemsPerPage=10&startDate=1561939200000&endDate=1567296000000
Method: GET
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
startDate | Mandatory | Non negative integer | Timestamp |
endDate | Mandatory | Non negative integer | Timestamp |
page | Mandatory | Positive integer | Page number |
itemsPerPage | Mandatory | Positive integer | Number of items per page |
symbol | Mandatory | Tradable Pair or 'any' | Should be valid currency pair separated with '-' symbol, or 'any' for all pairs. (ETH-BTC) |
side | Optional | Enum:['any','buy','sell'] | Allows to filter only by specified trade side |
Returns trade information for all symbols or for single symbol.
Response:Name | Type | Description |
---|---|---|
userId | String | ID of the user |
symbol | String | Tradable pair |
tradeId | String | ID of the trade |
fee | String | Trading fee |
quantity | String | Trade amount |
price | String | Trade price |
created | Date | Timestamp when trade was made |
URL: /user/group/:id
Method: GET
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
id | Mandatory | String | ID of the user |
Returns the group info of the user. That group defines all the fees and limitations for user.
Response:Name | Type | Description |
---|---|---|
id | String | ID of the user |
name | String | Name of the group |
groupType | String | Type of the group |
promoCode | String | Promo code of the group |
description | String | Description of the group |
created | Date | Timestamp when group was created |
pairFees | Object<Symbols> | Trading fees of all pairs for all users in the group |
<Symbols>.takerFee | Number | Taker fee for the pair |
<Symbols>.makerFee | Number | Maker fee for the pair |
currencyFees | Object<Currency> | Deposit/withdraw fees of all currencies for all users in the group |
<Currency>.withdrawFlatCommission | Number | Withdraw flat commission of the currency |
<Currency>.depositFlatCommission | Number | Deposit flat commission of the currency |
URL: /user
Method: GET
Headers: X-API-Key: api-key
Returns full info about user.
Response:Name | Type | Description |
---|---|---|
id | String | ID of the user |
String | Email of the user | |
groupID | String | Group ID of the user |
status | String | Status of the user (new or active) |
kycStatus | String | KYC status of the user |
firstLogin | Boolean | If the user logs in for the first time |
verified | String | If the user email is verified |
created | Date | Timestamp when the account was created |
lang | String | Language of the user |
TFAEnabled | Boolean | If the 2FA is enabled |
isBlocked | Boolean | If the account of the user is blocked |
referenceToken | String | Reference token of the user |
lastLoginDate | Date | Date of last login |
favoritePairs | Array<String> | Pairs selected by user as favorites |
URL: /user/:userId/balances/:currency
Method: GET
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
userId | Mandatory | User ID | ID of the user |
currency | Optional | Currency string | Active valid currency |
Returns balances for all active currencies or for single currency.
URL: /orders/history?symbol=ETH-BTC&page=1&itemsPerPage=10&startDate= 1561939200000&endDate=1567296000000&hideCanceled=true
Method: GET
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
startDate | Mandatory | Non negative integer | Timestamp |
endDate | Mandatory | Non negative integer | Timestamp |
page | Mandatory | Positive integer | Page number |
itemsPerPage | Mandatory | Positive integer | Number of items per page |
symbol | Mandatory | Tradable Pair or 'any' | Should be valid currency pair separated with '-' symbol, or 'any' for all pairs. (ETH-BTC) |
hideCanceled | Mandatory | Boolean | Return canceled orders or not |
side | Optional | String | ['any', 'buy', 'sell'] |
type | Optional | String | ['any', 'market', 'limit'] |
Returns order history
URL: /orders/open-orders
Method: GET
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Mandatory | Tradable pair | Should be valid currency pair separated with '-' symbol, or ‘any' (e.g. ETH-BTC) |
side | Optional | Enum: ['buy', 'sell'] | Define order side |
type | Optional | Enum: ['market', 'limit'] | Define order type |
userId | Optional | String | ID of the user |
page | Mandatory | Positive integer | Page number |
itemsPerPage | Mandatory | Positive integer | Number of items per page |
startDate | Mandatory | Non negative integer | Timestamp |
endDate | Mandatory | Non negative integer | Timestamp |
hideCanceled | Mandatory | Boolean | Return canceled orders or not |
List of open orders.
URL: /orders
Method: POST
Headers: X-API-Key: api-key
Body Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Mandatory | Tradable pair | Should be valid currency pair separated with '/' symbol (e.g. ETH/BTC) |
side | Mandatory | String | Enum: ['buy', 'sell'] |
type | Mandatory | String | Enum: ['market', 'limit'] |
subType | Optional | String | Defines advanced type for order. Default value is 'gtc'. Enum: ['ioc', 'gtc', 'fok'] |
price | Optional | Positive number | Price for order, not required if subtype is 'ioc' or 'fok'. |
quantity | Mandatory | Positive number | Amount of order |
URL: /orders/:orderID
Method: DELETE
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
OrderId | Mandatory | String | ID of the order |
Cancel order with specified order ID.
URL: /orders?symbol=ETH-BTC
Method: DELETE
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Optional | Tradable pair | Should be valid currency pair separated with '-' symbol (e.g. ETH-BTC) |
Cancel all orders for specified symbol.
URL: /orders/:orderID
Method: GET
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
OrderId | Mandatory | String | ID of the trade |
Returns order details for order with given OrderId.
URL: /user/deposit/:currency
Method: GET
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
currency | Mandatory | String | Should be valid currency. (BTC, ETH) |
Returns current deposit address for currency.
URL: /user/deposit/:currency
Method: POST
Headers: X-API-Key: api-key
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
currency | Mandatory | String | Should be valid currency. (BTC, ETH) |
Returns new deposit address for currency.
URL: /user/withdraw
Method: POST
Headers: X-API-Key: api-key
Body Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
currency | Mandatory | String | Should be valid currency. (BTC, ETH) |
amount | Mandatory | positiveNumber | The amount that will be sent to the specified address |
address | Mandatory | String | Address to which amount will be sent |
Returns transaction unique identifier.
ATAIX provides public API through WebSocket connection. Websocket connection URL is: wss://ws.ataix.com/ws
Everybody has access to public API without authentication. Websocket communication is done using JSON RPC.
Subscribe to order book information for given pair. subscribeBook and unsubscribeBook methods allow connection to receive order book data from ATAIX.
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Mandatory | Tradable pair | Should be valid currency pair separated with '/' symbol (e.g. ETH/BTC) |
Request:
{ "method": "subscribeBook", "params": { "symbol": "BTC/USDT" }, "id":1 }
Response:
Returns response as snapshotBook that reflects current situation. After that returns updates on order book changes as bookUpdate
{ "method":"snapshotBook", "result":{ "buy":[ { "price":"0.0258280000", "quantity":"32.220000" } ], "sell":[ { "price":"0.0263720000", "quantity":"19.570000" } ], "symbol":"ETH/BTC" }, "jsonrpc":"2.0" }
Update:
{ "method":"bookUpdate", "result":{ "buy":[ { "price":"0.0252200000", "quantity":"39.140000" } ], "sell":[], "symbol":"ETH/BTC" }, "jsonrpc":"2.0" }
Subscribe to trade information for given pair. subscribeTrades and unsubscribeTrades methods allow connection to receive trade data from ATAIX.
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Mandatory | Tradable pair | Should be valid currency pair separated with '/' symbol (e.g. ETH/BTC) |
limit | Mandatory | Positive integer | Max number of trades returned by snapshotTrades |
Request:
{ "method":"subscribeTrades", "params":{ "symbol":"ETH/BTC", "limit":100 }, "id":1 }
Response:
Returns response as snapshotTrades that reflects current situation. After that returns new trades as newTrade.
{ "method":"snapshotTrades", "result":[ { "tradeId":"ETH-BTC-2202-1583339856005", "pair":"ETH/BTC", "side":"SELL", "quantity":"0.233900", "price":"0.0255250000", "created":"2020-03-04T16:37:36.007Z" } ], }
Update:
{ "method":"newTrade", "result":{ "tradeId":"ETH-BTC-302-1583338948006", "pair":"ETH/BTC", "side":"BUY", "quantity":"0.140640", "price":"0.0254830000", "created":"2020-03-04T16:22:28.007Z" }, "jsonrpc":"2.0" }
Subscribe to candle information for given pair. subscribeCandles and unsubscribeCandles methods allow connection to receive candle data from ATAIX.
Params:
Name | Mandatory/ Optional | Accepted Values | Description |
---|---|---|---|
symbol | Mandatory | Tradable pair | Should be valid currency pair separated with '/' symbol (e.g. ETH/BTC) |
limit | Mandatory | Positive integer | Max number of candles returned by snapshotCandles |
interval | Mandatory | Enum: [ "M1", "M3", "M5", "M15", "M30", "H1", "H4", "D1", "D7", "1M"] | Interval on which candle is generated |
Request:
{ "method":"subscribeCandles", "params":{ "symbol":"ETH/BTC", "limit":1000, "interval":"H1" }, "id":1 }
Response:
Returns response as snapshotCandles . After that returns new candles as openCandle and newCandle. Open candle updates the current open candle information every 5 seconds. newCandle is sent when candle interval is closed and new candle is generated
{ "method":"snapshotCandles", "result":[ { "timestamp":"2020-03-04T17:00:00.000Z", "symbol":"ETH/BTC", "interval":"H1", "open":"0.0260720000", "close":"0.0255420000", "min":"0.0254460000", "max":"0.0261270000", "volume":"54.358070", "volumeQuote":"1.388413" } ], "jsonrpc":"2.0" }
Update:
{ "method":"openCandle", "result":{ "timestamp":"2020-03-04T16:57:07.939Z", "symbol":"ETH/BTC", "interval":"H1", "open":"0.0260720000", "close":"0.0255490000", "min":"0.0254460000", "max":"0.0261270000", "volume":"51.050730", "volumeQuote":"1.304295" }, "jsonrpc":"2.0" }