API Documentation



GENERAL API Information

  • The Base endpoint is: https://api.nuex.com
  • All endpoints return either a JSON object or array
  • All time and timestamp related fields are in milliseconds
  • HTTP 4XX return codes are used for for malformed requests; the issue is on the sender's side
  • Any endpoint can retun an ERROR; the error payload is as follows:
  • {
        "code": -1000,
        "msg": "Invalid Symbol"
    }
  • For GET endpoints, parameters must be sent as a query string

SIGNED Endpoint

Examples for POST /api/v1/order
Here is a step-by-step example of how to send a vaild signed payload from curl.

Key Value
apiKey 8920a730-71c4-4e91-a0e8-08f893de29dd
secretKey 79ff54b8cb36417a991f49f81aca450645a2fcd408994925b8c36f0172435d8000cade64be924feeb3bb34d3eba8f813
Parameter Value
symbol XRPBTC
price 0.05
side BUY
type LIMIT
quantity 1.5
orderId c88f2722-ab07-4b14-af41-3c351cb7e3fc
timestamp 1531730973899
  • HMAC SHA256 signature:
  • [linux]$ echo -n "symbol=XRPBTC&price=0.05&side=BUY&type=LIMIT&quantity=1.5&orderId=c88f2722-ab07-4b14-af41-3c351cb7e3fc×tamp=1531730973899" | openssl dgst -sha256 -hmac "79ff54b8cb36417a991f49f81aca450645a2fcd408994925b8c36f0172435d8000cade64be924feeb3bb34d3eba8f813"
    (stdin)= 82462b84438b73bfb4e8cb9e2a75f3bb760b3e5e482ccf4b01a7d3617d6827d1
    
  • curl command:
  • (HMAC SHA256)
    [linux]$ curl -H "x-mbx-apikey: 8920a730-71c4-4e91-a0e8-08f893de29dd" -X GET 'https://api.nuex.com/api/v3/order' -d 'symbol=XRPBTC&price=0.05&side=BUY&type=LIMIT&quantity=1.5&orderId=c88f2722-ab07-4b14-af41-3c351cb7e3fc×tamp=1531730973899&signature=82462b84438b73bfb4e8cb9e2a75f3bb760b3e5e482ccf4b01a7d3617d6827d1'
    

LIMITS

  • The /api/v1/exchangeInfo rateLimits array contains objects related to the exchange's REQUESTS and ORDER rate limits
  • A 429 will be returned when rather limit is violated

Public API Endpoints

ENUM definitions

  • TRADING
  • NEW
  • PARTIALLY FILLED
  • LIMIT
  • MARKET
  • BUY
  • SELL


m -> minutes; h -> hours;

  • 5m
  • 15m
  • 30m
  • 2h
  • 4h
  • 24h

General Endpoints

Test connectivity

GET /api/v1/ping
Test connectivity to the Rest API.

Parameters: NONE

Response:
{}

Check server time

GET /api/v1/time
Test connectivity to the Rest API and get the current server time.

Parameters: NONE

Response:
{
    "serverTime": 1530888743385
}

Exchange information

GET /api/v1/exchangeInfo
Current exchange trading rules and symbol information

Parameters: NONE

Response:
{
    "timezone": "UTC",
    "serverTime": 1530888782941,
    "rateLimits": [
        {
            "rateLimitType": "REQUEST",
            "interval": "MINUTE",
            "limit": 1200
        },
        {
            "rateLimitType": "ORDERS",
            "interval": "SECOND",
            "limit": 10
        },
        {
            "rateLimitType": "REQUEST",
            "interval": "DAY",
            "limit": 100000
        }
    ],
    "exchangeFilters": [],
    "symbols": [
        {
            "symbol": "BTCUSDT",
            "status": "TRADING",
            "baseAsset": "BTC",
            "quoteAsset": "USDT",
            "baseAssetPrecision": 8,
            "quotePrecision": 8,
            "orderTypes": [
                "LIMIT",
                "MARKET"
            ]
        }
    ]
}

Market Endpoints

Order book

GET /api/v1/depth


Parameters:
Name Type Mandatory Description
symbol STRING YES
limit INT NO Default 100; max 1000.

Response:
{
    "lastUpdateId": "0bd131a3-f243-4431-bb83-f9e55dd96790",
    "bids": [
        [
            "0.07336846",
            "0.07085928"
        ],
        [
            "0.07335762",
            "0.04042081"
        ]
    ],
    "asks": [
        [
            "0.07341975",
            "0.05897467"
        ],
        [
            "0.07344554",
            "0.07637153"
        ]
    ]
}

Recent trades list

GET /api/v1/trades
Get recent trades (up to last 500).

Parameters:
Name Type Mandatory Description
symbol STRING YES
limit INT NO Default 500; max 500.

Response:
[
    {
        "id": "bad282e0-ccd2-4121-8a4d-cbc3e6470cc1",
        "price": "0.07343059",
        "qty": "0.04386900",
        "time": 1529915878692,
        "isBuyerMaker": true
    },
    {
        "id": "2662e3e9-2213-4ba9-b4a6-d9ba4846ce0d",
        "price": "0.07332797",
        "qty": "0.01323825",
        "time": 1529915879168,
        "isBuyerMaker": false
    }
]

Old trades list

GET /api/v1/historicalTrades
Get older trades.

Parameters:
Name Type Mandatory Description
symbol STRING YES
limit INT NO Default 500; max 500.
fromTime LONG NO Unixtime to fetch from. Default gets most recent trades.

Response:
[
    {
        "id": "8580c89e-964f-4bfb-8a5a-38ea0a90c51e",
        "price": "0.01435927",
        "qty": "0.22115600",
        "time": 1522942838344,
        "isBuyerMaker": true
    },
    {
        "id": "2dde28c7-9a70-45fc-9f3a-7579b4f7ffda",
        "price": "0.01128434",
        "qty": "0.86282212",
        "time": 1522942838676,
        "isBuyerMaker": false
    }
]

Kline/Candlestick data

GET /api/v1/klines
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.

Parameters:
Name Type Mandatory Description
symbol STRING YES
interval ENUM YES
limit INT NO Default 500; max 500.
startTime LONG NO
endTime LONG NO

Response:
[
    [
        1530891000,     // Open time
        "0.07336952",   // Open
        "0.07336952",   // High
        "0.07336952",   // Low
        "0.07336952",   // Close
        "0.00000000",   // Volume
        1530891300      // Close time
    ],
    [
        1530890700,
        "0.07336952",
        "0.07336952",
        "0.07336952",
        "0.07336952",
        "0.00000000",
        1530891000
    ]
]

24hr ticker price change statistics

GET /api/v1/ticker/24hr
24 hour price change statistics. Careful when accessing this with no symbol.

Parameters:
Name Type Mandatory Description
symbol STRING NO
  • If the symbol is not sent, prices for all symbols will be returned in an array.

Response:
{
    "id":	"def3a3c9-5eb4-4d53-b4b9-3d7e07d3f16b",
    "symbol": "CSCXRP",
    "lastPrice": "0.00090999",
    "highPrice": "0.00096987",
    "lowPrice": "0.00080911",
    "last24": "0.00096987",
    "priceChange": "-0.00005988",
    "volume": "2728978.78514933",
    "priceChangePercent": "-6.580",
    "bidPrice": "0.10000000",
    "bidQty": "439550.10437146",
    "askPrice": "0.00000010",
    "askQty": "2.00000060"
}
OR
[
    {
        "id":	"def3a3c9-5eb4-4d53-b4b9-3d7e07d3f16b",
        "symbol": "CSCXRP",
        "lastPrice": "0.00090999",
        "highPrice": "0.00096987",
        "lowPrice": "0.00080911",
        "last24": "0.00096987",
        "priceChange": "-0.00005988",
        "volume": "2728978.78514933",
        "priceChangePercent": "-6.580",
        "bidPrice": "0.10000000",
        "bidQty": "439550.10437146",
        "askPrice": "0.00000010",
        "askQty": "2.00000060"
    }
]

Active pairs

GET /api/v1/products
List of active pairs

Response:
[
    {
        "id": "LTCBTC",
        "fromSymbol": "LTC",
        "toSymbol": "BTC"
    },
    {
        "id": "MLNBTC",
        "fromSymbol": "MLN",
        "toSymbol": "BTC"
    }
]

Symbol price ticker

GET /api/v3/ticker/price
Latest price for a symbol or symbols.

Parameters:
Name Type Mandatory Description
symbol STRING NO
  • If the symbol is not sent, prices for all symbols will be returned in an array.

Response:
{
    "symbol": "XMRBTC",
    "price": "0.08565630"
}
OR
[
    {
        "symbol": "XMRBTC",
        "price": "0.08565630"
    },
    {
        "symbol": "ARKBTC",
        "price": "0.00895632"
    }
]

Symbol order book ticker

GET /api/v3/ticker/bookTicker
Best price/qty on the order book for a symbol or symbols.

Parameters:
Name Type Mandatory Description
symbol STRING NO
  • If the symbol is not sent, prices for all symbols will be returned in an array.

Response:
{
    "symbol": "XRPBTC",
    "bidPrice": "0.01986494",
    "bidAmount": "18.11000000",
    "askPrice": "0.01002118",
    "askAmount": "0.00543420"
}
OR
[
    {
        "symbol": "ETHBTC",
        "bidPrice": 0,
        "bidAmount": 0,
        "askPrice": 0,
        "askAmount": 0
    },
    {
        "symbol": "XRPBTC",
        "bidPrice": "0.01986494",
        "bidAmount": "18.11000000",
        "askPrice": "0.01002118",
        "askAmount": "0.00543420"
    }
]

Account Endpoints

New order

POST /api/v3/order (HMAC SHA256)
Send in a new order.

Parameters:
Name Type Mandatory Description
symbol STRING YES
side ENUM YES
type ENUM YES
quantity DECIMAL YES
price DECIMAL NO
timestamp LONG YES
Additional mandatory parameters based on type:
Name Type
LIMIT quantity, price
MARKET quantity

Response:
{
    "symbol": "XRPBTC",
    "orderId": "2aad3c36-a0e3-4b72-9f26-f3665902e180"
}

Query order

GET /api/v3/order (HMAC SHA256)
Check an order's status.

Parameters:
Name Type Mandatory Description
orderId LONG YES
timestamp LONG YES

Response:
{
    "symbol": "XRPBTC",
    "orderId": "c88f2722-ab07-4b14-af41-3c351cb7e3fc",
    "price": "0.01630000",
    "origQty": "10.00000000",
    "executedQty": "10.00000000",
    "status": "FILLED",
    "type": "LIMIT",
    "side": "SELL",
    "time": 1526311521925
}

Cancel order

DELETE /api/v3/order (HMAC SHA256)
Cancel an active order.

Parameters:
Name Type Mandatory Description
symbol ENUM YES
orderId LONG YES
timestamp LONG YES

Response:
{
    "orderId": "c88f2722-ab07-4b14-af41-3c351cb7e3fc"
}

Current open orders

GET /api/v3/openOrders (HMAC SHA256)
Get all open orders on a symbol. Careful when accessing this with no symbol.

Parameters:
Name Type Mandatory Description
symbol STRING NO
timestamp LONG YES

Response:
[
    {
        "symbol": "XRPBTC",
        "orderId": "195ca2de-1114-4cd6-9fc0-c4f8270bf4fe",
        "price": "0.01644979",
        "origQty": "1.00000000",
        "executedQty": "0.00000000",
        "status": "NEW",
        "side": "SELL",
        "time": 1526312453958,
        "type": "LIMIT"
    },
    {
        "symbol": "XRPBTC",
        "orderId": "ff86ddce-41f4-4705-8f37-21a92f003742",
        "price": "0.01644978",
        "origQty": "1.00000000",
        "executedQty": "0.00000000",
        "status": "NEW",
        "side": "SELL",
        "time": 1526312457041,
        "type": "LIMIT"
    }
]

Account information

GET /api/v3/account (HMAC SHA256)
Get current account information.

Parameters:
Name Type Mandatory Description
timestamp LONG YES

Response:
{
    "makerCommission": "0.15",
    "takerCommission": "0.25",
    "canTrade": true,
    "canWithdraw": false,
    "canDeposit": true,
    "updateTime": 1526312374,
    "Balance": [
        {
            "asset": "ZEC",
            "free": "100.00000000",
            "locked": "0.00000000"
        },
        {
            "asset": "BTG",
            "free": "100.00000000",
            "locked": "0.00000000"
        }
    ]
}

Account trade list

GET /api/v3/myTrades (HMAC SHA256)
Get trades for a specific account and symbol.

Parameters:
Name Type Mandatory Description
symbol STRING YES
limit INT NO Default 500; max 500.
fromTime LONG NO Unixtime to fetch from. Default gets most recent trades.

Response:
[
    {
        "id": "a46e9a2e-6fa7-4b3f-adf5-623e288aed8b",
        "orderId": "650f258d-bce7-4540-9a0e-50671bfdd727",
        "price": "0.01536981",
        "qty": "0.30671416",
        "commission": "0.00001179",
        "commissionAsset": "BTC",
        "time": 1522943646802,
        "isBuyer": false
    },
    {
        "id": "389e3613-b98d-4b0d-a5b5-03ff28648974",
        "orderId": "650f258d-bce7-4540-9a0e-50671bfdd727",
        "price": "0.01536981",
        "qty": "0.69328584",
        "commission": "0.00001598",
        "commissionAsset": "XRP",
        "time": 1522943826643,
        "isBuyer": false
    }
]