NAV Navbar
Shell JavaScript

General API Information

API Endpoint

https://nominex.io/api/rest/v1

General Information on Endpoints

HTTP Return Codes

Error payload

{
  "code": 1127,
  "description": "Invalid symbol."
}

Cursoring

Cursoring separates results into pages (the size of which are defined by the limit request parameter) and provides a means to move forwards through these pages.

To retrieve cursored results, you initially pass a cursor with a value of null to the endpoint. The response to a cursored request will contain cursor field. Cursor is the cursor that you should send to the endpoint to receive the next batch of responses. You will know that you have requested the last available page of results when the API responds with size of items in response less than limit request parameter.

Cursor Schema

Code samples

{
  "cursor": 0,
  "items": [
    {},
    {}
  ],
  "total": 0
}

Response of any endpoint that supports cursoring.

Properties

Name Type Description
cursor integer(int64) Cursor you should send in request to receive next page
items object List of objects which type is defined by particular endpoint
total integer(int64) Optional. Total number of data records with specified filters

Public Endpoints

Public endpoints can be accessed without any authentication.

Candles

The Candles endpoint provides a way to access charting candle info.

List of Candles

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/candles/{baseCurrencyCode}/{quoteCurrencyCode}/{timeFrame} \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/candles/{baseCurrencyCode}/{quoteCurrencyCode}/{timeFrame}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/candles/{baseCurrencyCode}/{quoteCurrencyCode}/{timeFrame}

Parameters

Name In Type Required Description
baseCurrencyCode path string true Base currency code
end query integer(int64) false End time
limit query integer(int32) false Limit of items in the response
quoteCurrencyCode path string true Quote currency code
start query integer(int64) false Start time
timeFrame path string true Time frame

Enumerated Values

Parameter Value
timeFrame TF1M
timeFrame TF5M
timeFrame TF15M
timeFrame TF30M
timeFrame TF1H
timeFrame TF3H
timeFrame TF6H
timeFrame TF12H
timeFrame TF1D
timeFrame TF7D
timeFrame TF14D
timeFrame TF1MO

Response

List of Candle objects

Candle Schema

{
  "close": 0,
  "high": 0,
  "low": 0,
  "open": 0,
  "timestamp": 0,
  "volume": 0
}

Properties

Name Type Description
close number Close price
high number High price
low number Low price
open number Open price
timestamp integer(int64) Candle start time
volume number Quote asset volume

Currencies

List of Currencies

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/currencies \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/currencies',
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

List of known currencies.

GET /api/rest/v1/currencies

Response

List of Currency objects

Individual Currency

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/currencies/{currencyCode} \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/currencies/{currencyCode}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

Get information about individual currency state and limits.

GET /api/rest/v1/currencies/{currencyCode}

Parameters

Name In Type Required Description
currencyCode path string true

Response

Currency object

Currency Codes

Currency codes will conform to the ISO 4217 standard where possible. Currencies which have or had no representation in ISO 4217 may use a custom code.

Code Description
BTC Bitcoin
ETH Ether
LTC Litecoin

Currency Schema

{
  "code": "string",
  "depositSuspended": true,
  "minimumDepositAmount": 0,
  "minimumWithdrawalAmount": 0,
  "name": "string",
  "scale": 0,
  "withdrawalFee": 0,
  "withdrawalsSuspended": true
}

Represents information about currency

Properties

Name Type Description
code string Currency code
depositSuspended boolean True if deposits for the currency are suspended for some reason
minimumDepositAmount number
minimumWithdrawalAmount number
name string Name of the currency
scale integer(int32) Precision of the currency
withdrawalFee number
withdrawalsSuspended boolean True if withdrawals for the currency are suspended for some reason

Exchange Info

The Exchange Info endpoint provides a general information about the exchange such as current tariff levels and withdrawal limits.

Basic Exchange Information

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/exchangeInfo \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/exchangeInfo',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/exchangeInfo

Response

ExchangeInfo object

Server Time

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/time \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/time',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/time

Response

ServerTime object

ExchangeInfo Schema

{
  "tariffLevels": [
    {
      "makerFeeFactor": 0,
      "makerNmxFeeFactor": 0,
      "requiredNmxBalance": 0,
      "requiredVolume": 0,
      "takerFeeFactor": 0,
      "takerNmxFeeFactor": 0,
      "tariffLevelIndex": 0
    }
  ],
  "withdrawalLimits": [
    {
      "amountInUsdtNotTrusted": 0,
      "amountInUsdtTrusted": 0,
      "id": "string",
      "title": "string"
    }
  ]
}

Properties

Name Type Description
tariffLevels [Tariff Level] List of Tariff Levels
withdrawalLimits [Withdrawal Limit] List of Withdrawal Limits

Tariff Level Schema

{
  "makerFeeFactor": 0,
  "makerNmxFeeFactor": 0,
  "requiredNmxBalance": 0,
  "requiredVolume": 0,
  "takerFeeFactor": 0,
  "takerNmxFeeFactor": 0,
  "tariffLevelIndex": 0
}

Properties

Name Type Description
makerFeeFactor number
makerNmxFeeFactor number
requiredNmxBalance number
requiredVolume number
takerFeeFactor number
takerNmxFeeFactor number
tariffLevelIndex number

Withdrawal Limit Schema

{
  "amountInUsdtNotTrusted": 0,
  "amountInUsdtTrusted": 0,
  "id": "string",
  "title": "string"
}

Properties

Name Type Description
amountInUsdtNotTrusted number
amountInUsdtTrusted number
id string
title string

ServerTime Schema

{
  "serverTime": 0
}

Properties

Name Type Description
serverTime integer(int64)

Order Book

Order Book

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/orderbook/{baseCurrencyCode}/{quoteCurrencyCode}/{aggregationLevel}/{depth} \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/orderbook/{baseCurrencyCode}/{quoteCurrencyCode}/{aggregationLevel}/{depth}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

Get a list of open orders for a trading pair. The amount of detail shown can be customized with the level parameter.

GET /api/rest/v1/orderbook/{baseCurrencyCode}/{quoteCurrencyCode}/{aggregationLevel}/{depth}

Parameters

Name In Type Required Description
aggregationLevel path string true aggregationLevel
baseCurrencyCode path string true baseCurrencyCode
depth path integer(int32) true depth
quoteCurrencyCode path string true quoteCurrencyCode

Enumerated Values

Parameter Value
aggregationLevel A0
aggregationLevel A1
aggregationLevel A2
aggregationLevel A3

Response

List of Order Book Item objects

Order Book Item Schema

{
  "amount": 0,
  "count": 0,
  "price": 0,
  "side": "SELL"
}

Properties

Name Type Description
amount number
count integer(int32)
price number
side string

Enumerated Values

Property Value
side SELL
side BUY

Pairs

List of Currency Pairs

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/pairs \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/pairs',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

Get a list of currency pairs available for trading.

GET /api/rest/v1/pairs

Response

List of Pair objects

Pair Schema

{
  "active": true,
  "baseStep": 0,
  "id": 0,
  "maxBaseAmount": 0,
  "maxQuoteAmount": 0,
  "minBaseAmount": 0,
  "minQuoteAmount": 0,
  "name": "string",
  "quoteStep": 0
}

Properties

Name Type Description
active boolean
baseStep number
id integer(int32)
maxBaseAmount number
maxQuoteAmount number
minBaseAmount number
minQuoteAmount number
name string
quoteStep number

Tickers

The ticker is a high level overview of the state of the market. It shows you the current best bid and ask, as well as the last trade price. It also includes information such as daily volume and how much the price has moved over the last day.

List of Tickers

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/ticker?pairs=string \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/ticker',
  method: 'get',
  data: '?pairs=string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/ticker

Parameters

Name In Type Required Description
pairs query string true Comma separated list of pair names

Response

List of Ticker objects

Individual Ticker

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/ticker/{baseCurrencyCode}/{quoteCurrencyCode} \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/ticker/{baseCurrencyCode}/{quoteCurrencyCode}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/ticker/{baseCurrencyCode}/{quoteCurrencyCode}

Parameters

Name In Type Required Description
baseCurrencyCode path string true Base currency code
quoteCurrencyCode path string true Quote currency code

Response

Ticker object

Ticker Schema

{
    "ask": 0,
    "askSize": 0,
    "bid": 0,
    "bidSize": 0,
    "dailyChange": 0,
    "dailyChangeP": 0,
    "high": 0,
    "low": 0,
    "price": 0,
    "quoteVolume": 0
  }

Properties

Name Type Description
ask number Price of last lowest ask
askSize number Sum of the 25 lowest ask sizes
bid number Price of last highest bid
bidSize number Sum of the 25 highest bid sizes
dailyChange number Amount that the last price has changed since yesterday
dailyChangeP number Amount that the last price has changed since yesterday (in percentage)
high number Daily high
low number Daily low
price number Price of the last trade
quoteVolume number Daily volume in qoute currency

Trades

The Trades endpoint provides a way to access past public trades and includes details such as price, size, and time. Optional parameters can be used to limit the number of results. A start and end timestamp, a limit, and a sorting method can be scecified.

List of Trades

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/trades/{baseCurrencyCode}/{quoteCurrencyCode} \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/trades/{baseCurrencyCode}/{quoteCurrencyCode}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/trades/{baseCurrencyCode}/{quoteCurrencyCode}

Parameters

Name In Type Required Description
baseCurrencyCode path string true Base currency code
cursor query integer(int64) false cursor
end query integer(int64) false end
limit query integer(int32) false limit
quoteCurrencyCode path string true Quote currency code
start query integer(int64) false start

Response

Cursor of Trades

Trade Schema

{
  "amount": 0,
  "id": 0,
  "price": 0,
  "side": "SELL",
  "timestamp": 0
}

Properties

Name Type Description
amount number
id integer(int64)
price number
side string
timestamp integer(int64)

Enumerated Values

Property Value
side SELL
side BUY

Authenticated Endpoints

To use authenticated endpoints you must authenticate yourself with API key.

API Keys

Your security is essential to us. For every authenticated action taken via the Nominex API, a nonce is required. Nonces are used to guard against replay attacks. If multiple requests arrive at the API with the wrong nonce (e.g. because of an async timing issue) the API will reject the request.

This means if you want to use multiple HTTP or WebSocket connections you will need a separate API key for each client.

In order to access the parts of the API which require authentication, you must generate an API key and an API secret using this page.

You can generate as many API keys as you would like, and each of those keys can be customised in a few ways.

Permission Read Write
ECHO true true
ORDERS none true
TRADES true none
TRANSACTIONS true none
WALLET ADDRESSES true true
WALLET BALANCES true none
WITHDRAWALS none true

Using API Keys

const crypto = require('crypto')
const request = require('request')

const apiKey = '...'
const apiSecret = '...'

const apiPath = '/api/rest/v1/private/wallets'
const nonce = Date.now().toString()
const queryParams = ''
const body = undefined
let signature = `/api${apiPath}${nonce}${body ? JSON.stringify(body) : ''}`

const sig = crypto.createHmac('sha384', apiSecret).update(signature)
const shex = sig.digest('hex')

const options = {
  url: `https://nominex.io/${apiPath}?${queryParams}`,
  headers: {
    'nominex-nonce': nonce,
    'nominex-apikey': apiKey,
    'nominex-signature': shex
  },
  body: body,
  json: true
}
request.get(options, (error, response, body) => {
  console.log(body);
})

Authentication is done using an API key and a secret. To generate this pair, go to the API Access page.

As an example of how to authenticate, we can look at the "wallets" endpoint. Take the example payload (currently for JavaScript only).

These are encoded as HTTP headers named:

Orders

New Order

Code samples

# You can also use wget
curl -X POST https://nominex.io/api/rest/v1/private/orders \
  -H 'Content-Type: application/json'

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/orders',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

Full example (with authentication)

const crypto = require('crypto')
const request = require('request')

const apiKey = '...'
const apiSecret = '...'

const apiPath = '/api/rest/v1/private/orders'
const nonce = Date.now().toString()
const queryParams = ''
const body = {cid: undefined,
    type: 'LIMIT',
    side: 'SELL',
    pairName: 'BTC/USDT',
    amount: 1,
    limitPrice: 10000,
    hidden: false,
    walletType: 'SPOT'
}
let signature = `/api${apiPath}${nonce}${body ? JSON.stringify(body) : ''}`

const sig = crypto.createHmac('sha384', apiSecret).update(signature)
const shex = sig.digest('hex')

const options = {
    url: `https://nominex.io/${apiPath}?${queryParams}`,
    headers: {
        'nominex-nonce': nonce,
        'nominex-apikey': apiKey,
        'nominex-signature': shex
    },
    body: body,
    json: true
}
request.post(options, (error, response, body) => {
    console.log(body);
})

POST /api/rest/v1/private/orders

Body parameter

{
  "amount": 0,
  "amountInQuoteCurrency": true,
  "cid": 0,
  "distance": 0,
  "futurePrice": 0,
  "hidden": true,
  "limitPrice": 0,
  "pairName": "string",
  "side": "SELL",
  "stopPrice": 0,
  "type": "LIMIT",
  "walletType": "SPOT"
}

Parameters

Name In Type Required Description
body body Order Request true

Response

ACCEPTED status code

Cancel Order

Code samples

# You can also use wget
curl -X DELETE https://nominex.io/api/rest/v1/private/orders/{orderId} \
  -H 'Content-Type: application/json'

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/orders/{orderId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

Full example (with authentication)

const crypto = require('crypto')
const request = require('request')

const apiKey = '...'
const apiSecret = '...'

const apiPath = '/api/rest/v1/private/orders/685489'
const nonce = Date.now().toString()
const queryParams = 'cid=true'
let signature = `/api${apiPath}${nonce}`

const sig = crypto.createHmac('sha384', apiSecret).update(signature)
const shex = sig.digest('hex')

const options = {
  url: `https://nominex.io/${apiPath}?${queryParams}`,
  headers: {
    'nominex-nonce': nonce,
    'nominex-apikey': apiKey,
    'nominex-signature': shex
  }
}
request.delete(options, (error, response, body) => {
  console.log(body);
})


DELETE /api/rest/v1/private/orders/{orderId}?cid=false

Parameters

Name In Type Required Description
orderId path integer true order id to cancel
cid request boolean false if orderId path parameter refers to cid (client order id) or not

Response

ACCEPTED status code

Group of New Orders

Code samples

# You can also use wget
curl -X POST https://nominex.io/api/rest/v1/private/orders/group \
  -H 'Content-Type: application/json'

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/orders/group',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

POST /api/rest/v1/private/orders/group

Body parameter

[
  {
    "amount": 0,
    "amountInQuoteCurrency": true,
    "cid": 0,
    "distance": 0,
    "futurePrice": 0,
    "hidden": true,
    "limitPrice": 0,
    "pairName": "string",
    "side": "SELL",
    "stopPrice": 0,
    "type": "LIMIT"
  }
]

Parameters

Name In Type Required Description
body body array[Order Request] true

Response

ACCEPTED status code

List of Orders

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/private/orders/{baseCurrencyCode}/{quoteCurrencyCode} \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/orders/{baseCurrencyCode}/{quoteCurrencyCode}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/private/orders/{baseCurrencyCode}/{quoteCurrencyCode}

Parameters

Name In Type Required Description
baseCurrencyCode path string false base currency code
quoteCurrencyCode path string false quote currency code
cursor request number false
start request number false start time of order creation
end request number false end time of order creation
limit request number false max order count in the response. Max is 1000
active request boolean false return only active orders or also the historical ones

Response

List of Order objects

Replace Order

Code samples

# You can also use wget
curl -X PUT https://nominex.io/api/rest/v1/private/orders/{orderId} \
  -H 'Content-Type: application/json'

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/orders/{orderId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

PUT /api/rest/v1/private/orders/{orderId}

Body parameter

{
  "amount": 0,
  "amountInQuoteCurrency": true,
  "cid": 0,
  "distance": 0,
  "futurePrice": 0,
  "hidden": true,
  "limitPrice": 0,
  "pairName": "string",
  "side": "SELL",
  "stopPrice": 0,
  "type": "LIMIT"
}

Parameters

Name In Type Required Description
orderId path integer(int64) true orderId
body body PlaceOrderRequest true

Response

ACCEPTED status code

Order Request Schema

{
  "amount": 0,
  "amountInQuoteCurrency": true,
  "cid": 0,
  "distance": 0,
  "futurePrice": 0,
  "hidden": true,
  "limitPrice": 0,
  "pairName": "string",
  "side": "SELL",
  "stopPrice": 0,
  "type": "LIMIT"
}

Properties

Name Type Required Restrictions Description
amount number true
amountInQuoteCurrency boolean false Only for MARKET, STOP, TRAILING STOP and TRAILING STOP FUTURE orders to BUY You will spend no more than amount of quote asset, including fee
cid integer(int64) Client order id. You can set this field to replace or cancel the order later even before getting real order id via websocket channel:
distance number true Only for TRAILING STOP and TRAILING STOP FUTURE orders
futurePrice number true Only for TRAILING STOP FUTURE order
hidden boolean Default false
limitPrice number true Only for LIMIT and STOP LIMIT orders
pairName string true
side string true
stopPrice number true Only for STOP and STOP LIMIT orders
type string true
walletType string true SPOT or PRIZE; SPOT or DEMO_CONTEST for demo mode

Enumerated Values

Property Value
side SELL
side BUY
type LIMIT
type MARKET
type STOP
type STOP_LIMIT
type TRAILING_STOP
type TRAILING_STOP_FUTURE
walletType SPOT
walletType PRIZE
walletType DEMO_CONTEST

Order Schema

{
  "active": true,
  "amount": 0,
  "amountInQuoteCurrency": true,
  "created": 0,
  "distance": 0,
  "futurePrice": 0,
  "gid": "string",
  "hidden": true,
  "id": 0,
  "limitPrice": 0,
  "originalAmount": 0,
  "originalType": "LIMIT",
  "pairName": "string",
  "side": "SELL",
  "status": "UNFILLED",
  "stopPrice": 0,
  "trailingPrice": 0,
  "type": "LIMIT",
  "updated": 0
}

Properties

Name Type Description
active boolean
amount number
amountInQuoteCurrency boolean
created integer(int64)
distance number
futurePrice number
gid string
hidden boolean
id integer(int64)
limitPrice number
originalAmount number
originalType string
pairName string
side string
status string
stopPrice number
trailingPrice number
type string
updated integer(int64)

Enumerated Values

Property Value
originalType LIMIT
originalType MARKET
originalType STOP
originalType STOP_LIMIT
originalType TRAILING_STOP
originalType TRAILING_STOP_FUTURE
side SELL
side BUY
status UNFILLED
status PARTIALLY_FILLED
status FILLED
type LIMIT
type MARKET
type STOP
type STOP_LIMIT
type TRAILING_STOP
type TRAILING_STOP_FUTURE

Private Trades

Your trades with extended info.

List of Trades

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/private/trades \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/trades',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/private/trades

Parameters

Name In Type Required Description
cursor query integer(int64) false cursor
end query integer(int64) false end
limit query integer(int32) false limit
sorting query string false Sorting direction
start query integer(int64) false start

Enumerated Values

Property Value
sorting ASC
sorting DESC

Response

Cursor of Private Trades

List of Trades by Currency Pair

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/private/trades/{baseCurrencyCode}/{quoteCurrencyCode} \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/trades/{baseCurrencyCode}/{quoteCurrencyCode}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/private/trades/{baseCurrencyCode}/{quoteCurrencyCode}

Parameters

Name In Type Required Description
baseCurrencyCode path string true base currency code
cursor query integer(int64) false cursor
end query integer(int64) false end
limit query integer(int32) false limit
quoteCurrencyCode path string true quote currency code
sorting query string false Sorting direction
start query integer(int64) false start

Enumerated Values

Property Value
sorting ASC
sorting DESC

Response

Cursor of Private Trades

Private Trade Schema

{
  "amount": 0,
  "fee": 0,
  "feeCurrencyCode": "string",
  "id": 0,
  "maker": true,
  "nmxFeeCashback": 0,
  "orderId": 0,
  "orderPrice": 0,
  "orderType": "LIMIT",
  "price": 0,
  "side": "SELL",
  "timestamp": 0
}

Properties

Name Type Description
amount number
fee number
feeCurrencyCode string
id integer(int64)
maker boolean
orderId integer(int64)
orderPrice number
orderType string
price number
side string
timestamp integer(int64)

Enumerated Values

Property Value
orderType LIMIT
orderType MARKET
orderType STOP
orderType STOP_LIMIT
orderType TRAILING_STOP
orderType TRAILING_STOP_FUTURE
side SELL
side BUY

Wallets

List of Wallet Balances

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/private/wallets \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/wallets',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/private/wallets

Response

List of Wallet Balance objects

List of Deposit Transactions

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/private/wallets/{currencyCode}/deposits?end=0&start=0 \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/wallets/{currencyCode}/deposits',
  method: 'get',
  data: '?end=0&start=0',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/private/wallets/{currencyCode}/deposits

Parameters

Name In Type Required Description
currencyCode path string true currency code
cursor query integer(int64) false cursor
end query integer(int64) true end
limit query integer(int32) false limit
start query integer(int64) true start

Response

Cursor of Blockchain Txs

List of Withdrawal Transactions

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/private/wallets/{currencyCode}/withdrawals?end=0&start=0 \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/wallets/{currencyCode}/withdrawals',
  method: 'get',
  data: '?end=0&start=0',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/private/wallets/{currencyCode}/withdrawals

Parameters

Name In Type Required Description
currencyCode path string true currency code
cursor query integer(int64) false cursor
end query integer(int64) true end
limit query integer(int32) false limit
start query integer(int64) true start

Response

Cursor of Blockchain Txs

Currency Wallet Address

Code samples

# You can also use wget
curl -X GET https://nominex.io/api/rest/v1/private/wallets/{currencyCode}/address \
  -H 'Accept: */*'

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/wallets/{currencyCode}/address',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

GET /api/rest/v1/private/wallets/{currencyCode}/address

Parameters

Name In Type Required Description
currencyCode path string true currency code

Response

Current address to deposit on the currency - string

Wallet Balance Schema

{
  "balance": 0,
  "balanceAvailable": 0,
  "balanceLocked": 0,
  "currency": "string"
}

Properties

Name Type Description
balance number
balanceAvailable number
balanceLocked number
currency string

Blockchain Tx Schema

{
  "acknowledgeTime": 0,
  "amount": 0,
  "currencyCode": "string",
  "status": "string",
  "txHash": "string",
  "userId": 0,
  "walletId": "string"
}

Properties

Name Type Description
acknowledgeTime integer(int64)
amount number
currencyCode string
status string
txHash string
userId number
walletId string

Withdrawals

Withdraw

Code samples

# You can also use wget
curl -X POST https://nominex.io/api/rest/v1/private/withdrawals/{currencyCode} \
  -H 'Content-Type: application/json'

var headers = {
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://nominex.io/api/rest/v1/private/withdrawals/{currencyCode}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

POST /api/rest/v1/private/withdrawals/{currencyCode}

Body parameter

{
  "amount": 0,
  "currencyCode": "string",
  "destination": "string"
}

Parameters

Name In Type Required Description
currencyCode path string true currency code
body body Withdrawal Request true request

Response

ACCEPTED status code

Withdrawal Request Schema

{
  "amount": 0,
  "currencyCode": "string",
  "destination": "string"
}

Properties

Name Type Required Description
amount number true
currencyCode string true
destination string true

WebSocket

API Endpoint

wss://nominex.io/api/ws/v1

The websocket API provides real-time data updates for bunch of channels.

Protocol Overview

The websocket API uses a bidirectional protocol, which encodes all messages as JSON objects. Clients can send messages to subscribe to channels, unsubscribe or place a command. Server responds with updates on subscribed channel or command execution result.

Please note that new message types can be added at any point in time. Clients are expected to ignore messages they do not support.

Error messages: Most failure cases will cause an error message (a message with the event "error") to be emitted. This can be helpful for implementing a client or debugging issues.

Authentication

Because websocket connection is essentially an http request you must provide same headers while establishing new websocket connection as in using API keys section to gain access to private channels. It is not possible to upgrade unauthenticated websocket to authenticated one.

Message types

To begin receiving feed messages, you must first send a subscribe message to the server indicating which channels to receive.

Once a subscribe message is received the server will respond with a subscribed message that hold a channel you are subscribed to. Subscribed message contains endpoint field to distinguish subscribed channels and optional snapshot field to provide consistent view of data before you receive any update messages. You can subscribe to channels independently in arbitrary order.

In case you do not want to receive updates on particular channel send unsubscribe message passing endpoint field. As a response to an unsubscribe message you will receive an unsubscribed one.

Update message has endpoint field and channel-specific payload.

You can send command messages via websocket. Messages of that type have event field equals to command and compulsory channel and payload fields. Channel has same meaning as in subscribe messages and payload is some data in a channel specific structure.

Public Channels

Public channels can be accessed without any authentication.

Candles Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/candles/BTC/USDT/TF1H"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/candles/BTC/USDT/TF1H\"}",
  "endpoint":"/candles/BTC/USDT/TF1H",
  "snapshot":{
    "timestamp":1573722000000,
    "open":8616.14,
    "close":8649.70,
    "high":8651.52,
    "low":8595.32,
    "volume":15.819655
  }
}

Sample update message

{
  "endpoint":"/candles/BTC/USDT/TF1H",
  "payload":{
    "timestamp":1573722000000,
    "open":8616.14,
    "close":8646.75,
    "high":8651.52,
    "low":8595.32,
    "volume":15.822430
  }
}

The Candles channel provides a way to access charting candle info. Candles will be provided as updates for as long as the channel remains open.

Endpoint:

/candles/{baseCurrencyCode}/{quoteCurrencyCode}/{timeFrame}

Update Speed: realtime

Parameters

Name Type Required Description
baseCurrencyCode string true Base currency code
quoteCurrencyCode string true Quote currency code
timeFrame string true Time frame

Enumerated Values

Parameter Value
timeFrame TF1M
timeFrame TF5M
timeFrame TF15M
timeFrame TF30M
timeFrame TF1H
timeFrame TF3H
timeFrame TF6H
timeFrame TF12H
timeFrame TF1D
timeFrame TF7D
timeFrame TF14D
timeFrame TF1MO

Order Book Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/orderBook/BTC/USDT/A0/25"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/orderBook/BTC/USDT/A0/25\"}",
  "endpoint":"/orderBook/BTC/USDT/A0/25",
  "snapshot":[
    {
      "side":"SELL",
      "price":8663.87,
      "amount":0.003742,
      "count":1
    },
    {
      "side":"SELL",
      "price":8663.88,
      "amount":0.010128,
      "count":1
    }
  ]
}

Sample update message

{
  "endpoint":"/orderBook/BTC/USDT/A0/25",
  "payload":[
    {
      "side":"SELL",
      "price":8668.09,
      "amount":0.008757,
      "count":1
    }
  ]
}

The Order Book channel provides a snapshot and updates on the order book. It is provided on a price aggregated basis, with customizable precision. The snapshot is delivered upon subscribing and any changes to order book will be provided as updates for as long as the channel remains open.

Endpoint:

/orderBook/{baseCurrencyCode}/{quoteCurrencyCode}/{aggregationLevel}/{depth}

Update Speed: realtime

Parameters

Name Type Required Description
aggregationLevel string true
baseCurrencyCode string true Base currency code
depth integer(int32) true
quoteCurrencyCode string true Quote currency code

Enumerated Values

Parameter Value
aggregationLevel A0
aggregationLevel A1
aggregationLevel A2
aggregationLevel A3

Tickers Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/tickers/BTC/USDT"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/tickers/BTC/USDT\"}",
  "endpoint":"/tickers/BTC/USDT",
  "snapshot":{
    "bid":8620.39,
    "bidSize":8620.39,
    "ask":8664.12,
    "askSize":8664.12,
    "dailyChange":-127.74,
    "dailyChangeP":-1.46,
    "price":8641.38,
    "quoteVolume":2098958.75706084,
    "high":8799.27,
    "low":8584.78
  }
}

Sample update message

{
  "endpoint":"/tickers/BTC/USDT",
  "payload":{
    "bid":8621.40,
    "bidSize":8621.40,
    "ask":8664.70,
    "askSize":8664.70,
    "dailyChange":-127.74,
    "dailyChangeP":-1.46,
    "price":8642.57,
    "quoteVolume":2098958.75706084,
    "high":8799.27,
    "low":8584.78
  }
}

The Tickers channel provides a snapshot and updates on the individual ticker. The ticker is a high level overview of the state of the market. It shows you the current best bid and ask, as well as the last trade price. It also includes information such as daily volume and how much the price has moved over the last day. The snapshot is delivered upon subscribing and any changes to ticker will be provided as updates for as long as the channel remains open.

Endpoint:

/tickers/{baseCurrencyCode}/{quoteCurrencyCode}

Update Speed: 1000ms

Parameters

Name Type Required Description
baseCurrencyCode string true Base currency code
quoteCurrencyCode string true Quote currency code

Mini Tickers Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/miniTickers"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/miniTickers\"}",
  "endpoint":"/miniTickers",
  "snapshot":[
    {
      "pair":"BTC/USDT",
      "bid":8620.39,
      "ask":8664.12,
      "dailyChange":-127.74,
      "dailyChangeP":-1.46,
      "price":8641.38,
      "quoteVolume":2098958.75706084,
      "high":8799.27,
      "low":8584.78
    }
  ]
}

Sample update message

{
  "endpoint":"/miniTickers",
  "payload":[
    {
      "pair":"BTC/USDT",
      "bid":8618.64,
      "ask":8663.87,
      "dailyChange":-127.03,
      "dailyChangeP":-1.45,
      "price":8642.09,
      "quoteVolume":2099057.4926555,
      "high":8799.27,
      "low":8584.78
    }
  ]
}

The Mini Tickers channel provides a snapshot and updates on the tickers. The snapshot is delivered upon subscribing and any changes to ticker will be provided as updates for as long as the channel remains open.

Endpoint:

/miniTickers

Update Speed: realtime

Trades Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/trades/BTC/USDT"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/trades/BTC/USDT\"}",
  "endpoint":"/trades/BTC/USDT"
}

Sample update message

{
  "endpoint":"/trades/BTC/USDT",
  "payload":{
    "id":2168534,
    "timestamp":1573725326890,
    "amount":0.029119,
    "price":8646.37,
    "side":"SELL"
  }
}

The Trades channel provides updates on the trades at Nominex. Whenever a trade occurs the information will be provided as update for as long as the channel remains open.

Endpoint:

/trades/{baseCurrencyCode}/{quoteCurrencyCode}

Update Speed: realtime

Parameters

Name Type Required Description
baseCurrencyCode string true Base currency code
quoteCurrencyCode string true Quote currency code

Authenticated Channels

Channels that require authentication have the /private prefix in the endpoint.

Orders Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/private/orders"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/private/orders\"}",
  "endpoint":"/private/orders",
  "snapshot":[
    {
      "id":48,
      "cid":null,
      "gid":null,
      "pairName":"ETH/BTC",
      "side":"SELL",
      "active":true,
      "created":1571993902138,
      "updated":1571993902138,
      "amount":1.000,
      "amountInQuoteCurrency":false,
      "originalAmount":1.000,
      "type":"LIMIT",
      "originalType":"LIMIT",
      "limitPrice":0.021790,
      "stopPrice":null,
      "futurePrice":null,
      "distance":null,
      "trailingPrice":null,
      "hidden":false,
      "status":"UNFILLED"
    },
    {
      "id":49,
      "cid":null,
      "gid":null,
      "pairName":"ETH/BTC",
      "side":"SELL",
      "active":true,
      "created":1571993905467,
      "updated":1571993905467,
      "amount":1.000,
      "amountInQuoteCurrency":false,
      "originalAmount":1.000,
      "type":"LIMIT",
      "originalType":"LIMIT",
      "limitPrice":0.021791,
      "stopPrice":null,
      "futurePrice":null,
      "distance":null,
      "trailingPrice":null,
      "hidden":false,
      "status":"UNFILLED"
    }
  ]
}

Sample update message

{
  "endpoint":"/private/orders",
  "payload":{
    "id":132,
    "cid":null,
    "gid":null,
    "pairName":"ETH/BTC",
    "side":"BUY",
    "active":false,
    "created":1573728975862,
    "updated":1573728975862,
    "amount":0.000,
    "amountInQuoteCurrency":false,
    "originalAmount":1.000,
    "type":"MARKET",
    "originalType":"MARKET",
    "limitPrice":null,
    "stopPrice":null,
    "futurePrice":null,
    "distance":null,
    "trailingPrice":null,
    "hidden":false,
    "status":"FILLED"
  }
}

The Orders channel provides a snapshot and updates on the orders in your account. The snapshot is delivered upon subscribing and any changes to your orders will be provided as updates for as long as the channel remains open.

Endpoint:

/private/orders

Update Speed: realtime

New Order

Command example

{
  "event":"command",
  "channel":"private/orders",
  "command":"put",
  "payload": {
    "amount":"1",
    "pairName":"ZEC/BTC",
    "side":"BUY",
    "type":"MARKET",
    "amountInQuoteCurrency":false
  }
}

Response example

{
  "messageId":"NDIxNjo3",
  "event":"accepted",
  "request":"{\"event\":\"command\",\"channel\":\"private/orders\",\"command\":\"put\",\"payload\":{\"amount\":\"1\",\"pairName\":\"ZEC/BTC\",\"side\":\"BUY\",\"type\":\"MARKET\",\"amountInQuoteCurrency\":false}}"
}

Result example

{
  "code":20001,
  "event":"execution",
  "messageId":"NDIxNjo3"
}

Command Execution Status Codes

Status Code Description
20001 Command executed successfully
20002 Not enough balance to place order

Creates a new order.

Replace Order

Command example

{
  "event":"command",
  "channel":"private/orders",
  "command":"replace",
  "orderId":50,
  "payload": {
    "amount":"2.000",
    "pairName":"ETH/BTC",
    "side":"SELL",
    "type":"LIMIT",
    "hidden":false,
    "limitPrice":"0.021792"
  }
}

Command Execution Status Codes

Status Code Description
20001 Command executed successfully
20002 Not enough balance to replace order

Response example

{
  "messageId":"NDIxNjo1",
  "event":"accepted",
  "request":"{\"event\":\"command\",\"channel\":\"private/orders\",\"command\":\"replace\",\"orderId\":49,\"payload\":{\"amount\":\"2.000\",\"pairName\":\"ETH/BTC\",\"side\":\"SELL\",\"type\":\"LIMIT\",\"hidden\":false,\"limitPrice\":\"0.021791\"}}"
}

Result example

{
  "code":20001,
  "event":"execution",
  "messageId":"NDIxNjo1"
}

Update an existing order with the new one.

Cancel Order

Command example

{
  "event":"command",
  "channel":"private/orders",
  "command":"cancel",
  "payload":[47]
}

Response example

{
  "messageId":"NDIxNjo2",
  "event":"accepted",
  "request":"{\"event\":\"command\",\"channel\":\"private/orders\",\"command\":\"cancel\",\"payload\":[\"21\"]}"
}

Result example

{
  "code":20001,
  "event":"execution",
  "messageId":"NDIxNjo2"
}

Cancels the specified order.

Command Execution Status Codes

Status Code Description
20001 Command executed successfully

Private Trades Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/private/trades/ETH/BTC"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/private/trades/ETH/BTC\"}",
  "endpoint":"/private/trades/ETH/BTC"
}

Sample update message

{
  "endpoint":"/private/trades/ETH/BTC",
  "payload":{
    "id":71,
    "timestamp":1573728975862,
    "amount":1.000,
    "price":0.021790,
    "side":"SELL",
    "orderId":48,
    "orderType":"LIMIT",
    "orderPrice":0.02179000,
    "maker":true,
    "fee":0.00002179,
    "feeCurrencyCode":"BTC",
    "nmxFeeCashback":null
  }
}

The Private Trades channel provides updates on the trades in your account. Whenever a trade occurs at Nominex the information will be provided as update for as long as the channel remains open.

Endpoint:

/private/trades

Update Speed: realtime

Blockchain Transactions Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/private/walletTxs"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/private/walletTxs\"}",
  "endpoint":"/private/walletTxs",
  "snapshot":[
    {
      "currencyCode":"BTC",
      "direction":"DEPOSIT",
      "amount":0.02175420,
      "confirmationCount":0,
      "necessaryConfirmationCount":6,
      "txId":"495aa47894707b067341c770b21c63a955615fa3e017c42557e7ebdd4efb0012:1"
    }
  ]
}

Sample update message

{
  "endpoint":"/private/walletTxs",
  "payload":{
    "currencyCode":"BTC",
    "direction":"DEPOSIT",
    "amount":0.02175420,
    "confirmationCount":3,
    "necessaryConfirmationCount":6,
    "txId":"495aa47894707b067341c770b21c63a955615fa3e017c42557e7ebdd4efb0012:1"
  }
}

The Blockchain Transactions channel provides a snapshot and updates on your pending deposit and pending withdrawal transactions. The snapshot is delivered upon subscribing and any changes to transactions will be provided as updates for as long as the channel remains open.

Endpoint:

/private/walletTxs

Update Speed: realtime

Wallets Channel

Sample subscribe request

{
  "event":"subscribe",
  "endpoint":"/private/walletBalances"
}

Sample subscribe response

{
  "event":"subscribed",
  "request":"{\"event\":\"subscribe\",\"endpoint\":\"/private/walletBalances\"}",
  "endpoint":"/private/walletBalances",
  "snapshot":[
    {
      "currency":"LTC",
      "balance":20.04700000,
      "balanceAvailable":20.04700000,
      "balanceLocked":0.00000000
    },
    {
      "currency":"XRP",
      "balance":350.62000000,
      "balanceAvailable":350.62000000,
      "balanceLocked":0.00000000
    }
  ]
}

Sample update message

{
  "endpoint":"/private/walletBalances",
  "payload":{
    "currency":"XRP",
    "balance":570.85000000,
    "balanceAvailable":570.85000000,
    "balanceLocked":0.00000000
  }
}

The Wallets channel provides a snapshot and updates on your wallet balances. The snapshot is delivered upon subscribing and any changes to your wallets will be provided as updates for as long as the channel remains open.

Endpoint:

/private/walletBalances

Update Speed: realtime

Withdrawal

Requests a withdrawal.

Command example

{
  "event":"command",
  "channel":"private/walletBalances",
  "command":"withdrawal",
  "payload":{
    "amount":0.018,
    "currencyCode":"BTC",
    "destination":"2N6pNxDa4eVXWzAzEDu7zFrs51HM1c3Xkqx"
  }
}

Response example

{
  "messageId":"NDIxNjo0",
  "event":"accepted",
  "request":"{\"event\":\"command\",\"channel\":\"private/walletBalances\",\"command\":\"withdrawal\",\"payload\":{\"amount\":\"0.018\",\"currencyCode\":\"BTC\",\"destination\":\"2N6pNxDa4eVXWzAzEDu7zFrs51HM1c3Xkqx\"}}"
}

Result example

{
  "code":20002,
  "event":"execution",
  "messageId":"NDIxNjo0"
}

Command Execution Status Codes

Status Code Description
10032 Withdrawals are not available for 24h after password change
20002 Invalid address
20003 Withdrawal limit exceed
20004 Not enough balance to request withdrawal