ATAIX API

Incorporate ATAIX’s easy exchange on your platform with ATAIX API.

Introduction

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.

API Endpoints

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.

Public API

REST API calls that does not need any authorization. They are public and can be used by anyone.

Get tradable symbols

URL: /symbols
Method:GET

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolOptionalTradable 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:
NameTypeDescription
idStringUnique ID of pair
baseStringBase currency of pair
quoteStringQuote currency of pair
symbolStringPair (base/quote)
priceStringLast price of symbol
volumeStringTotal active liqudity
pricePrecisionNumberNumber of decimal points of price value
totalPrecisionNumberNumber of decimal points of total value
askStringAsk price
bidStringBid price

Get all active currencies

URL: /currencies
Method: GET

Returns a list of all currencies that are currently active.

Response:
NameTypeDescription
idStringUnique ID of currency
nameStringName of the currency
symbolStringTicker of the currency
isActiveBooleanDetermines if currency is enabled
depositActiveBooleanDetermines if currency deposits are active
withdrawActiveBooleanDetermines if currency withdrawals are active
currencyTypeString['crypto', 'fiat', 'ieo']
amountPrecisionNumberNumber of decimal points of amount value
minTradeSizeNumberMinimum amount of the currency to trade
lotSizeNumberAmount step

Get prices

URL: /prices
Method: GET

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolOptionalTradable 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:
NameTypeDescription
askStringCurrent best ask
bidStringCurrent best bid
lastStringLast trade price
openStringPrice of first trade of the day
lowStringMinimum price since the start of the day
highStringMaximum price since the start of the day
liquidity.baseStringCurrent active liquidity in base currency
liquidity.quoteStringCurrent active liquidity in quote currency
volume.baseString Traded volume since the beginning of the day in base currency
volume.quoteString Traded volume since the beginning of the day in quote currency
timestampDateTimestamp of last the trade
symbolStringSymbol of pair
priceChangeStringPrice chaange since the start of the day

Get current order book

URL: /book/:symbol
Method: GET

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolMandatoryTradable pair Should be valid currency pair separated with '-' symbol (e.g. ETH-BTC)

Returns order book for specified symbol.

Response:
NameTypeDescription
buyArray[Level]Array of Levels on bid side
sellArray[Level]Array of Levels on ask side
Level.priceStringPrice of the level
Level.quantityStringVolume at current level

Get trade list

URL: /trades-all?symbol=ETH-BTC&startDate=1561939200000&endDate=1567296000000&page=1&itemsPerPage=10
Method:
GET

Query parameters:

NameMandatory/ OptionalAccepted ValuesDescription
startDateOptionalNon negative integerTimestamp
endDateOptionalNon negative integerTimestamp
pageMandatoryPositive integerPage number
itemsPerPageMandatoryPositive integerNumber of items per page
symbolMandatoryTradable Pair Should be valid currency pair separated with '-' symbol, or 'any' for all pairs. (ETH-BTC)
sideOptionalString['any', 'buy', 'sell']

Returns trade history for specified symbol.

Response:
NameTypeDescription
tradeIdStringUnique ID of the trade
pairStringName of the pair
sideEnum (buy/sell)Direction of the trade
priceStringPrice of the trade
quantityStringAmount of base currency traded
createdDateTimestamp when trade was made

Private API

All REST API private calls should be made using user's API key which you can get from settings page.

Get User Transactions (deposit, withdrawal, adjustment, referral fees)

URL: /user/transactions?startDate=1561939200000&endDate=1567296000000&page=1&itemsPerPage=10&currency=BTC&type=deposit
Method:GET
Headers: X-API-Key: api-key

Query parameters:

NameMandatory/ OptionalAccepted ValuesDescription
startDateOptionalNon negative integerTimestamp
endDateOptionalNon negative integerTimestamp
pageMandatoryPositive integerPage number
ItemsPerPageMandatoryPositive integerNumber of items per page
currencyOptionalCurrency stringShould be valid currency. (BTC, ETH)
typeOptional 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:
NameTypeDescription
idStringUnique ID of transaction
userIdStringID of user
currencyStringShould be valid currency code available in platform
quantityStringTransaction amount
sourceStringSource of transaction. Enum: [deposit', 'withdraw', 'adjustment', 'referral']
feeStringTransaction fee
descriptionString
createdDateTimestamp when transaction was made
statusString['approved', 'cancelled', 'processed', 'failed']

Get User Trades

URL: /user/trades?symbol=ETH-BTC&page=1&itemsPerPage=10&startDate=1561939200000&endDate=1567296000000
Method: GET
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
startDateMandatoryNon negative integerTimestamp
endDateMandatoryNon negative integerTimestamp
pageMandatoryPositive integerPage number
itemsPerPageMandatoryPositive integerNumber of items per page
symbolMandatoryTradable Pair or 'any' Should be valid currency pair separated with '-' symbol, or 'any' for all pairs. (ETH-BTC)
sideOptionalEnum:['any','buy','sell']Allows to filter only by specified trade side

Returns trade information for all symbols or for single symbol.

Response:
NameTypeDescription
userIdStringID of the user
symbolStringTradable pair
tradeIdStringID of the trade
feeStringTrading fee
quantityStringTrade amount
priceStringTrade price
createdDateTimestamp when trade was made

Get User Group

URL: /user/group/:id
Method: GET
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
idMandatoryStringID of the user

Returns the group info of the user. That group defines all the fees and limitations for user.

Response:
NameTypeDescription
idStringID of the user
nameStringName of the group
groupTypeStringType of the group
promoCodeStringPromo code of the group
descriptionStringDescription of the group
createdDateTimestamp when group was created
pairFeesObject<Symbols>Trading fees of all pairs for all users in the group
<Symbols>.takerFeeNumberTaker fee for the pair
<Symbols>.makerFeeNumberMaker fee for the pair
currencyFeesObject<Currency>Deposit/withdraw fees of all currencies for all users in the group
<Currency>.withdrawFlatCommissionNumberWithdraw flat commission of the currency
<Currency>.depositFlatCommissionNumberDeposit flat commission of the currency

Get User Info

URL: /user
Method: GET
Headers: X-API-Key: api-key

Returns full info about user.

Response:
NameTypeDescription
idStringID of the user
emailStringEmail of the user
groupIDStringGroup ID of the user
statusStringStatus of the user (new or active)
kycStatusStringKYC status of the user
firstLoginBooleanIf the user logs in for the first time
verifiedStringIf the user email is verified
createdDateTimestamp when the account was created
langStringLanguage of the user
TFAEnabledBooleanIf the 2FA is enabled
isBlockedBooleanIf the account of the user is blocked
referenceTokenStringReference token of the user
lastLoginDateDateDate of last login
favoritePairsArray<String>Pairs selected by user as favorites

Get User Balances

URL: /user/:userId/balances/:currency
Method: GET
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
userIdMandatoryUser IDID of the user
currencyOptionalCurrency stringActive valid currency

Returns balances for all active currencies or for single currency.

Get order list

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:

NameMandatory/ OptionalAccepted ValuesDescription
startDateMandatoryNon negative integerTimestamp
endDateMandatoryNon negative integerTimestamp
pageMandatoryPositive integerPage number
itemsPerPageMandatoryPositive integerNumber of items per page
symbolMandatoryTradable Pair or 'any' Should be valid currency pair separated with '-' symbol, or 'any' for all pairs. (ETH-BTC)
hideCanceledMandatoryBooleanReturn canceled orders or not
sideOptionalString['any', 'buy', 'sell']
typeOptionalString['any', 'market', 'limit']

Returns order history

Get open orders

URL: /orders/open-orders
Method: GET
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolMandatoryTradable pair Should be valid currency pair separated with '-' symbol, or ‘any' (e.g. ETH-BTC)
sideOptionalEnum: ['buy', 'sell']Define order side
typeOptionalEnum: ['market', 'limit']Define order type
userIdOptionalStringID of the user
pageMandatoryPositive integerPage number
itemsPerPageMandatoryPositive integerNumber of items per page
startDateMandatoryNon negative integerTimestamp
endDateMandatoryNon negative integerTimestamp
hideCanceledMandatoryBooleanReturn canceled orders or not

List of open orders.

Create new order

URL: /orders
Method: POST
Headers: X-API-Key: api-key

Body Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolMandatoryTradable pair Should be valid currency pair separated with '/' symbol (e.g. ETH/BTC)
sideMandatoryStringEnum: ['buy', 'sell']
typeMandatoryStringEnum: ['market', 'limit']
subTypeOptionalStringDefines advanced type for order. Default value is 'gtc'. Enum: ['ioc', 'gtc', 'fok']
priceOptionalPositive numberPrice for order, not required if subtype is 'ioc' or 'fok'.
quantityMandatoryPositive numberAmount of order

Cancel Active Order

URL: /orders/:orderID
Method: DELETE
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
OrderIdMandatoryStringID of the order

Cancel order with specified order ID.

Cancel All Orders for given pair

URL: /orders?symbol=ETH-BTC
Method: DELETE
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolOptionalTradable pair Should be valid currency pair separated with '-' symbol (e.g. ETH-BTC)

Cancel all orders for specified symbol.

Get Order by ID

URL: /orders/:orderID
Method: GET
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
OrderIdMandatoryStringID of the trade

Returns order details for order with given OrderId.

Get Deposit Address

URL: /user/deposit/:currency
Method: GET
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
currencyMandatoryStringShould be valid currency. (BTC, ETH)

Returns current deposit address for currency.

Get New Deposit Address

URL: /user/deposit/:currency
Method: POST
Headers: X-API-Key: api-key

Params:

NameMandatory/ OptionalAccepted ValuesDescription
currencyMandatoryStringShould be valid currency. (BTC, ETH)

Returns new deposit address for currency.

Withdraw crypto

URL: /user/withdraw
Method: POST
Headers: X-API-Key: api-key

Body Params:

NameMandatory/ OptionalAccepted ValuesDescription
currencyMandatoryStringShould be valid currency. (BTC, ETH)
amountMandatorypositiveNumberThe amount that will be sent to the specified address
addressMandatoryStringAddress to which amount will be sent

Returns transaction unique identifier.

Web Socket API

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

Subscribe to order book information for given pair. subscribeBook and ​unsubscribeBook​ methods allow connection to receive order book data from ATAIX.

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolMandatoryTradable pairShould 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 trades

Subscribe to trade information for given pair. subscribeTrades and ​unsubscribeTrades​ methods allow connection to receive trade data from ATAIX.

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolMandatoryTradable pairShould be valid currency pair separated with '/' symbol (e.g. ETH/BTC)
limitMandatoryPositive integerMax 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 candles

Subscribe to candle information for given pair. subscribeCandles and unsubscribeCandles​ methods allow connection to receive candle data from ATAIX.

Params:

NameMandatory/ OptionalAccepted ValuesDescription
symbolMandatoryTradable pairShould be valid currency pair separated with '/' symbol (e.g. ETH/BTC)
limitMandatoryPositive integerMax number of candles returned by snapshotCandles
intervalMandatoryEnum: [ "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"
  }