The endpoint for our WebSockets API is: wss://ws.nonkyc.io
Public methods do not require any authentication. Private methods use the "login" method to authenticate using your Api Key & API Secret. Once authenticated, you do not need to reauthenticate as long as your websocket connection remains active. The key needs the read permission to log in and read,trade for the order methods; if the key has an IP allow-list, the connecting IP must be on it.
Unless otherwise stated, all timestamps are returned in ISO8601 format in UTC. Example: "2018-04-01T00:00:00Z" or "2018-04-01T00:00:00.000Z". If a timestamp is returned as an Integer, then that is a Unix timestamp in milliseconds.
All finance data such as price, quantity, and fee should be arbitrary precision numbers and string representation. Example: "5.39300000"
You can find an example JS class here: https://github.com/NonKYCExchange/websocketapiexample-main
The server will send a ping/pong heartbeat every 60 seconds while connected
Each connection may send a bounded number of messages per second; exceeding it returns error 429 with the limit in the message (the request is dropped, the connection stays open). Login attempts are limited per IP address and per API key (error 1029), and repeated authentication failures can lead to a temporary block of the source IP. newOrder and cancelOrder share the per-account trading rate limit of the REST API (error 429). Clients that keep sending orders the exchange has to reject are warned by e-mail and then suspended (error 1034), as described in the REST documentation. Messages on one connection are processed strictly in the order they were sent.
Ticker, orderbook and trade notifications include an integer sequence number. This number is unique for each subscribed pair and is incremented by one on each notification sent, so a gap means you missed an update and should resubscribe. Candle, report and balance notifications do not carry a sequence.
All Errors are formatted with error code and message (HTTP status codes are not used). If the 'error' field exists, then the call was not successful. The id is echoed only when your request carried one.
{
"jsonrpc":"2.0",
"error": {
"code":1,
"message":"Invalid JSON Request"
},
"id": 123
}
| Error Code | HTTP Status Code | Message | Details |
| 400 | 400 | Unknown error | An unknown error occurred somewhere in the system |
| 1 | 400 | Invalid request | Invalid JSON, missing method, or a required parameter is missing (the message names it) |
| 404 | 400 | Requested method not found | The method is unknown (method names are case-sensitive) |
| 403 | 401 | Action is forbidden for account | |
| 429 | 429 | Too many requests | Per-connection message limit or per-account trading rate limit exceeded; the message states the limit |
| 1029 | 429 | Too many attempts | Login attempts limited per IP address and API key; try again later |
| 1034 | 403 | API access suspended | The account kept sending orders the exchange had to reject; returned at login and on private methods until the time stated in the message. Repeated suspensions disable the API keys |
| 500 | 500 | Internal Server Error | |
| 503 | 503 | Service Unavailable | Try it again later |
| 504 | 504 | Gateway Timeout | Check the result of your request later |
| 1001 | 401 | Authorization required | |
| 1002 | 401 | Authorization failed | |
| 1003 | 403 | Action is forbidden for this API key | Check permissions for API key |
| 1004 | 401 | Unsupported authorisation method | Use Basic authentication |
| 2001 | 400 | Symbol not found | |
| 2002 | 400 | Currency not found | |
| 10001 | 400 | Validation error | Input not valid; the message names the problem, for example a bad price, quantity or userProvidedId on newOrder, or an expired, non-numeric or repeated nonce on login |
| 20001 | 400 | Insufficient funds | Insufficient funds for creating order or any account operation |
| 20002 | 400 | Order not found | Attempt to get active order that not existing, filled, canceled or expired. The same code is used while an order is still pending creation and when its market is unavailable; see cancelOrder |
| 20003 | 400 | Limit exceeded | Withdrawal limit exceeded |
| 20004 | 400 | Transaction not found | Requested transaction not found |
| 20005 | 400 | Payout not found | |
| 20006 | 400 | Payout already committed | |
| 20007 | 400 | Payout already rolled back | |
| 20008 | 400 | Duplicate clientOrderId | |
| 20010 | 400 | Address generation error | Unable to generate a new deposit address. Try request later. |
| 20011 | 400 | Withdrawal not found | The referenced withdrawal was not found. |
| 20012 | 400 | Withdrawals disabled | Withdrawals are disabled for this currency or system wide. Check system status page. |
| 20013 | 400 | Withdrawal amount below minimum | Minimum withdrawal amount for any currency is Withdraw Fee * 2. |
| 20014 | 400 | Withdrawal address invalid | Ensure the address you are withdrawing to is correct. |
| 20015 | 400 | Payment ID Required | This currency requires a paymentId when making a withdrawal request. |
| 20016 | 400 | Invalid confirmation code | The provided confirmation code is incorrect. |
| 20017 | 400 | Withdraw already confirmed | The withdrawal request has already been confirmed. |
method - The method you would like to call
params - The parameters for the method
id - An identification you can pass to the server, the same id will be passed in the results.
ticker - The asset ticker you would like information on.
none
wscat -c wss://ws.nonkyc.io
{
"method": "getAsset",
"params": {
"ticker": "BTC"
},
"id": 123
}
{
"jsonrpc": "2.0",
"result": {
"_id" : "613b32b83a865a18ba4d3373",
"createdAt" : 1631269560538.0,
"updatedAt" : 1666755900150.0,
"ticker" : "BTC",
"name" : "Bitcoin",
"network" : "Bitcoin Mainnet",
"logo" : "bitcoin-btc-logo.png",
"isActive" : true,
"hasChildren" : false,
"isChild" : false,
"childOf" : null,
"isToken" : false,
"tokenDetails" : "",
"useParentAddress" : false,
"usdValue" : "20196",
"depositActive" : true,
"depositNotes" : "",
"depositPayid" : false,
"withdrawalActive" : true,
"withdrawalNotes" : "",
"withdrawalPayid" : false,
"withdrawalPayidRequired" : false,
"withdrawFeeMultiply" : 1.9,
"confirmsRequired" : 2,
"withdrawDecimals" : 8,
"isDeflationary" : false,
"deflationPercent" : 0,
"withdrawFee" : "0.00050",
"explorer" : "https://blockchair.com/bitcoin/",
"explorerTxid" : "https://blockchair.com/bitcoin/transaction/%txid%",
"explorerAddress" : "https://blockchair.com/bitcoin/address/%addr%",
"website" : "https://www.bitcoin.org/",
"coinMarketCap" : "https://coinmarketcap.com/currencies/bitcoin/",
"coinGecko" : "https://www.coingecko.com/en/coins/bitcoin",
"addressRegEx" : "^(?:[13]{1}[a-km-zA-HJ-NP-Z1-9]{26,33}|bc1[a-z0-9]{39,59})$",
"payidRegEx" : "",
"socialCommunity" : {
"Reddit" : "https://reddit.com/r/Bitcoin",
"X" : "https://x.com/bitcoin",
"Facebook" : "https://www.facebook.com/134466763256650",
"BitcoinTalk" : "https://bitcointalk.org/",
"Github" : "https://github.com/bitcoin"
},
"coinGeckoApiId" : "bitcoin",
"tokenOf" : null,
"lastPriceUpdate" : 1666750835346.0,
"circulation" : "19189418",
"marketcapNumber" : 387549485928.0,
"coinPaprika" : "https://coinpaprika.com/coin/btc-bitcoin/",
"coinPaprikaApiId" : "btc-bitcoin",
"coinCodex" : "https://coincodex.com/crypto/bitcoin/",
"coinCodexApiId" : "BTC",
"canLiquidityPool" : true,
"canStake" : false,
"canVote" : false,
"imageUUID" : "d7cb5280-d0f2-4d0e-94f1-9c70b8df4883"
},
"id":123
}
wscat -c wss://ws.nonkyc.io
{
"method": "getAssets",
"params": {},
"id": 123
}
{
"jsonrpc": "2.0",
"result": [
... Array of assets ...
],
"id":123
}
symbol - The market symbol you would like information on.
none
wscat -c wss://ws.nonkyc.io
{
"method": "getMarket",
"params": {
"symbol": "BTC/USDT"
},
"id": 123
}
{
"jsonrpc": "2.0",
"result": {
"_id" : "613b3cc3cd39a81b02a75d7e",
"createdAt" : 1631272131450.0,
"updatedAt" : 1666757734600.0,
"symbol" : "BTC/USDT",
"primaryName" : "Bitcoin",
"primaryTicker" : "BTC",
"lastPrice" : "20232.79",
"yesterdayPrice" : "19349.78",
"highPrice" : "20374.96",
"lowPrice" : "19241.14",
"volume" : "1.9774",
"lastTradeAt" : 1666757627884.0,
"priceDecimals" : 2,
"quantityDecimals" : 7,
"isActive" : true,
"primaryAsset" : "613b32b83a865a18ba4d3373",
"secondaryAsset" : "613b398ed7a0bd1a304f963e",
"bestAsk" : "20225.67",
"bestAskNumber" : 20225.67,
"bestBid" : "20220",
"bestBidNumber" : 20220,
"changePercent" : "+4.56",
"changePercentNumber" : 4.56,
"highPriceNumber" : 20374.96,
"lastPriceNumber" : 20232.79,
"lowPriceNumber" : 19241.14,
"volumeNumber" : 1.9774,
"yesterdayPriceNumber" : 19349.78,
"volumeUsdNumber" : 39935.57,
"primaryCirculation" : "19189418",
"primaryUsdValue" : "20196",
"secondaryCirculation" : "68473108026.8332",
"secondaryUsdValue" : "0.999765",
"marketcapNumber" : 387549485928.0,
"spreadPercent" : "0.028",
"lastPriceUpDown" : "down",
"engineId" : 5,
"isPaused" : false,
"imageUUID" : "d7cb5280-d0f2-4d0e-94f1-9c70b8df4883"
},
"id": 123
}
wscat -c wss://ws.nonkyc.io
{
"method": "getMarkets",
"params": {},
"id": 123
}
{
"jsonrpc": "2.0",
"result": [
... Array of markets ...
],
"id":123
}
symbol - The market symbol you would like information on, exactly as BASE/QUOTE (ie. ETH/BTC; the underscore form is not converted by this method)
limit - The limit of total results you would like (Optional, default: 100, max: 1000)
offset - Offset the results by this number (Optional, default: 0)
sort - 'ASC' for ascending order, 'DESC' for decending order. (Optional, default: DESC)
from - This is earliest datetime. (Optional). When using from or till, then both are required
till - This is latest datetime. (Optional). When using from or till, then both are required
wscat -c wss://ws.nonkyc.io
{
"method": "getTrades",
"params": {
"symbol": "ETH/BTC",
"limit": 3,
"offset": 0,
"sort": "DESC",
"from": "2022-10-19T06:39:20.796Z",
"till": "2022-10-19T18:39:20.796Z"
},
"id": 123
}
{
"jsonrpc": "2.0",
"result": {
"data": [
{
"id": "629ac7b8d4d2fd8969724d44",
"price": "0.054443",
"quantity": "2.213",
"triggeredBy": "sell",
"timestamp": "2022-10-19T16:39:20.796Z",
"timestampms": 1666843143000
},
{
"id": "624ff8abe2bc9634ee08841d",
"price": "0.054453",
"quantity": "0.030",
"triggeredBy": "sell",
"timestamp": "2022-10-19T16:39:20.796Z",
"timestampms": 1666843143000
},
{
"id": "613b398ed7a0bd1a304f963e",
"price": "0.054454",
"quantity": "0.052",
"triggeredBy": "sell",
"timestamp": "2022-10-19T16:39:20.796Z",
"timestampms": 1666843143000
}
],
"symbol": "ETH/BTC"
},
"id": 123
}
symbol - The market symbol you would like to subscribe to.
ticker frame (with your id); further frames follow on every change.
symbol - The market symbol you would like to unsubscribe.
wscat -c wss://ws.nonkyc.io
{
"method": "subscribeTicker",
"params": {
"symbol": "ETH/BTC"
}
}
{
"jsonrpc": "2.0",
"method": "ticker",
"params": {
symbol: "ETH/BTC"
lastPrice: "0",
lastPriceUpDown: "up",
yesterdayPrice: "0",
changePercent: "0",
highPrice: "0",
lowPrice: "0",
volume: "0",
bestBid: "0",
bestAsk: "0",
spreadPercent: "0",
lastPriceNumber: 0,
yesterdayPriceNumber: 0,
changePercentNumber: 0,
highPriceNumber: 0,
lowPriceNumber: 0,
volumeNumber: 0,
volumeUsdNumber: 0,
bestBidNumber: 0,
bestAskNumber: 0,
lastTradeAt: 0,
updatedAt: 0,
sequence: 0
}
}
wscat -c wss://ws.nonkyc.io
{
"method": "unsubscribeTicker",
"params": {
"symbol": "ETH/BTC"
}
}
{
"jsonrpc": "2.0",
"result": true
}
symbol - The market symbol you would like to subscribe to, exactly as upper-case BASE/QUOTE (this method does not normalise the symbol).
limit - (Optional) The number of items on each side of the books. Default: 100
symbol - (Optional) The market symbol you would like to unsubscribe. Omit it to unsubscribe from all orderbooks.
snapshotOrderbook frame carries a top-level timestamp (Unix milliseconds) and the current sequence; seed your book from it, or from the REST /market/orderbook snapshot which carries the same sequence.updateOrderbook frame carries one side (the other array is empty). A level with quantity "0" has been removed. Apply frames in sequence order and resubscribe on a gap.wscat -c wss://ws.nonkyc.io
{
"method": "subscribeOrderbook",
"params": {
"symbol": "ETH/BTC",
"limit": 100
}
}
{
"jsonrpc": "2.0",
"method": "snapshotOrderbook",
"params": {
"asks": [
{
"price": "0.054588",
"quantity": "0.245"
},
{
"price": "0.054590",
"quantity": "1.000"
},
{
"price": "0.054591",
"quantity": "2.784"
}
],
"bids": [
{
"price": "0.054558",
"quantity": "0.500"
},
{
"price": "0.054557",
"quantity": "0.076"
},
{
"price": "0.054524",
"quantity": "7.725"
}
],
"symbol": "ETH/BTC",
"timestamp": "2022-10-19T16:33:42.821Z",
"sequence": 8073827
}
}
{
"jsonrpc": "2.0",
"method": "updateOrderbook",
"params": {
"asks": [
{
"price": "0.054590",
"quantity": "0.000"
}
],
"bids": [],
"symbol": "ETH/BTC",
"timestamp": "2022-10-19T16:33:42.821Z",
"sequence": 8073830
}
}
wscat -c wss://ws.nonkyc.io
{
"method": "unsubscribeOrderbook",
"params": {
"symbol": "ETH/BTC"
}
}
{
"jsonrpc": "2.0",
"result": true
}
symbol - The market symbol you would like to subscribe to.
symbol - (Optional) The market symbol you would like to unsubscribe. Omit it to unsubscribe from all trade feeds.
timestampms (Unix milliseconds) next to the ISO timestamp.wscat -c wss://ws.nonkyc.io
{
"method": "subscribeTrades",
"params": {
"symbol": "ETH/BTC"
}
}
{
"jsonrpc": "2.0",
"method": "snapshotTrades",
"params": {
"data": [
{
"id": "613b398ed7a0bd1a304f963e",
"price": "0.054656",
"quantity": "0.057",
"side": "buy",
"timestamp": "2022-10-19T16:33:42.821Z"
},
{
"id": "613b398ed7a0be1a304f963e",
"price": "0.054656",
"quantity": "0.092",
"side": "buy",
"timestamp": "2022-10-19T16:33:48.754Z"
},
{
"id": "613b398ed7a0bd1a304f363e",
"price": "0.054669",
"quantity": "0.002",
"side": "buy",
"timestamp": "2022-10-19T16:34:13.288Z"
}
],
"symbol": "ETH/BTC",
"sequence": 0
}
}
{
"jsonrpc": "2.0",
"method": "updateTrades",
"params": {
"data": [
{
"id": "613b398ed7a0bd1a304f163e",
"price": "0.054670",
"quantity": "0.183",
"side": "buy",
"timestamp": "2022-10-19T16:34:25.041Z"
}
],
"symbol": "ETH/BTC",
"sequence": 0
}
}
wscat -c wss://ws.nonkyc.io
{
"method": "unsubscribeTrades",
"params": {
"symbol": "ETH/BTC"
}
}
{
"jsonrpc": "2.0",
"result": true
}
symbol - The market symbol you would like to subscribe to.
period - The candlestick period you would like (Minutes), sent as a string. (5, 15, 30, 60, 180, 240, 480, 720, 1440)
limit - Limit the results. (Optional, default: 100)
type - 'market' (default) or 'pool' for liquidity-pool candles (notification method is then updatePoolCandles). (Optional)
datetime; update rows carry it as timestamp.
symbol - The market symbol you would like to unsubscribe.
period - The candlestick period you would like unsubscribe from, sent as a string. (5, 15, 30, 60, 180, 240, 480, 720, 1440)
wscat -c wss://ws.nonkyc.io
{
"method": "subscribeCandles",
"params": {
"symbol": "ETH/BTC",
"period": "30"
},
"id": 123
}
{
"jsonrpc": "2.0",
"method": "snapshotCandles",
"params": {
"data": [
{
"timestamp": "2017-10-19T15:00:00.000Z",
"open": "0.054801",
"close": "0.054625",
"min": "0.054601",
"max": "0.054894",
"volume": "380.750"
},
{
"timestamp": "2017-10-19T15:30:00.000Z",
"open": "0.054616",
"close": "0.054618",
"min": "0.054420",
"max": "0.054724",
"volume": "348.527"
},
{
"timestamp": "2017-10-19T16:00:00.000Z",
"open": "0.054587",
"close": "0.054626",
"min": "0.054408",
"max": "0.054768",
"volume": "194.014"
},
{
"timestamp": "2017-10-19T16:30:00.000Z",
"open": "0.054614",
"close": "0.054443",
"min": "0.054339",
"max": "0.054724",
"volume": "141.213"
}
],
"symbol": "ETH/BTC",
"period": 30
}
}
{
"jsonrpc": "2.0",
"method": "updateCandles",
"params": {
"data": [
{
"timestamp": "2017-10-19T16:30:00.000Z",
"open": "0.054614",
"close": "0.054465",
"min": "0.054339",
"max": "0.054724",
"volume": "141.268",
}
],
"symbol": "ETH/BTC",
"period": 30
}
}
wscat -c wss://ws.nonkyc.io
{
"method": "unsubscribeCandles",
"params": {
"symbol": "ETH/BTC",
"period": "30"
}
}
{
"jsonrpc": "2.0",
"result": true
}
algo - Either "BASIC" or "HS256".
pKey - API Public Key
sKey - API Secret Key, required for BASIC algo
nonce - Current timestamp in unix milliseconds, as a string, required on HS256 algo
signature - HMAC SHA256 sign nonce with API secret key, required on HS256 algo
nonce must be time in unix milliseconds, sent as a string. Each nonce may be used once per key; a repeated nonce is rejected (code 10001, "Duplicate nonce").read permission, and the connecting IP must be on the key's allow-list when one is set (code 1002 otherwise).var nonce = Date.now().toString();
var hmac = crypto.createHmac('sha256', sKey);
hmac.update(nonce);
var signature = hmac.digest('hex');
wscat -c wss://ws.nonkyc.io
{
"method": "login",
"params": {
"algo": "BASIC",
"pKey": "3ef4a9f8322f04bd8f09823b98403eae",
"sKey": "2deb5702358fd553a4ed3e3229fd2d51"
}
}
{
"jsonrpc": "2.0",
"result": true
"id": 123
}
wscat -c wss://ws.nonkyc.io
{
"method": "login",
"params": {
"algo": "HS256",
"pKey": "3ef4a9f8322f04bd8f09823b98403eae",
"nonce": "1792067234567",
"signature": "5e5404d822db0b0f648a4dbb0047cbe86964230a41c048976ff0893368facecf"
}
}
{
"jsonrpc": "2.0",
"result": true
"id": 123
}
symbol - The market symbol you are submitting an order for.
userProvidedId - Unique string. If not provided, we will generate a random UUIDv4.
side - 'buy' or 'sell'
type - 'limit', 'market' (Optional, default: limit)
quantity - Required. Order quantity.
price - Order price. Required for limit type.
strictValidate - Boolean (true/false). Price and quantity will be checked that they increment within tick size and quantity step. See symbol tickSize and quantityIncrement. (default: false)
New; the matching engine's decisions arrive as report frames (subscribe with subscribeReports). The result also carries the internal market, primaryAsset, secondaryAsset ids and the feeRate applied."Bad Request: Insufficient funds for order creation" (code 20001); other codes: 2001 market not found or paused, 10001 bad price/quantity/userProvidedId or minimum order value, 400 missing or invalid field, 503 trade engine overloaded (retry later), 403 trading disabled on the account.cancelOrder and the REST order endpoints (code 429).wscat -c wss://ws.nonkyc.io
{
"method": "newOrder",
"params": {
"userProvidedId": "57d5525562c945448e3cbd559bd068c4",
"symbol": "ETH/BTC",
"side": "sell",
"price": "0.059837",
"quantity": "0.015"
},
"id": 123
}
{
"jsonrpc": "2.0",
"result": {
"id": "6d55e562c9453448e3cbd559bd068c4",
"userProvidedId": "57d5525562c945448e3cbd559bd068c4",
"symbol": "ETH/BTC",
"side": "sell",
"type": "limit",
"price": "0.059837",
"numberprice": 0.059837,
"quantity": "0.015",
"executedQuantity": "0.00",
"remainQuantity": "0.015",
"remainTotal": "0.000897555",
"remainTotalWithFee": "0.000897555",
"lastTradeAt": 0,
"status": "New",
"isActive": true,
"isNew": true,
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "new"
},
"id": 123
}
{
"jsonrpc": "2.0",
"error": {
"code": 20001,
"message": "Insufficient funds",
"description": "Check that the funds are sufficient, given commissions"
},
"id": 123
}
orderId - Use this parameter if you want to cancel by order id.
-or-
userProvidedId - Use this parameter if you want to cancel by userProvidedId
report frame with reportType: "cancelled".description field, not by the code alone:
"message": "Order not found", "description": "Attempt to get active order that not existing, filled, canceled or expired." — there is no active order with that id. It was filled or already cancelled: do not retry."message": "Error", "description": "Order pending creation." — the order is still New, not yet processed by the matching engine. Wait for its report frame, then cancel once."message": "Error", "description": "Market not found for this order." — the order's market is not currently available. Retrying will not help; contact support if it persists.wscat -c wss://ws.nonkyc.io
{
"method": "cancelOrder",
"params": {
"userProvidedId": "57d5525562c945448e3cbd559bd068c4"
},
"id": 123
}
{
"jsonrpc": "2.0",
"result": {
"id": "6d55e562c9453448e3cbd559bd068c4",
"userProvidedId": "57d5525562c945448e3cbd559bd068c4",
"symbol": "ETH/BTC",
"side": "sell",
"type": "limit",
"price": "0.059837",
"numberprice": 0.059837,
"quantity": "0.015",
"executedQuantity": "0.00",
"remainQuantity": "0.015",
"remainTotal": "0.000897555",
"remainTotalWithFee": "0.000897555",
"lastTradeAt": 0,
"status": "Cancelled",
"isActive": false,
"isNew": false,
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "cancelled"
},
"id": 123
}
symbol - (Optional) The market symbol
wscat -c wss://ws.nonkyc.io
{
"method": "getOrders",
"params": {
"symbol": "BTC/USDT"
},
"id": 123
}
{
"jsonrpc": "2.0",
"result": [
{
"id": "4346371528",
"userProvidedId": "9cbe79cb6f864b71a811402a48d4b5b2",
"symbol": "ETH/BTC",
"side": "sell",
"status": "new",
"type": "limit",
"quantity": "0.002",
"price": "0.083837",
"executedQuantity": "0.000",
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "status",
},
{
"id": "4346371529",
"userProvidedId": "9cbe79cb6f864b71a811402a48d48c73",
"symbol": "ETH/BTC",
"side": "buy",
"status": "new",
"type": "limit",
"quantity": "0.002",
"price": "0.073837",
"executedQuantity": "0.000",
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "status",
}
],
"id": 123
}
none
wscat -c wss://ws.nonkyc.io
{
"method": "getTradingBalance",
"params": {},
"id": 123
}
{
"jsonrpc": "2.0",
"result": [
{
"asset": "USDT",
"available": "100.000000000",
"held": "0.00000000"
},
{
"asset": "BTC",
"available": "0.013634021",
"held": "0.00000000"
},
{
"asset": "ETH",
"available": "0",
"held": "0.00000000"
}
],
"id": 123
}
none
reportType is one of new, trade, update (e.g. final fill), cancelled. Trade reports add tradeId, tradePrice, tradeQuantity, tradeFee, tradeTime.result (method activeOrders).wscat -c wss://ws.nonkyc.io
{
"method": "subscribeReports",
"params": {}
}
{
"jsonrpc": "2.0",
"method": "activeOrders",
"result": [
{
"id": "6447cf917963464a811a4af426102c19",
"userProvidedId": "9cbe79cb6f864b71a811402a48d48c73",
"symbol": "ETH/BTC",
"side": "buy",
"status": "new",
"type": "limit",
"quantity": "0.002",
"price": "0.073837",
"executedQuantity": "0.000",
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "status"
}
],
"id": 123
}
{
"jsonrpc": "2.0",
"method": "report",
"params": {
"id": "6447cf917963464a811a4af426102c19",
"userProvidedId": "53b7cf917963464a811a4af426102c19",
"symbol": "ETH/BTC",
"side": "sell",
"status": "Partly Filled",
"type": "limit",
"quantity": "0.001",
"price": "0.053868",
"executedQuantity": "0.001",
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "trade",
"tradeQuantity": "0.001",
"tradePrice": "0.053868",
"tradeId": "6447cf917963464a811a4af426102d55",
"tradeFee": "0.00000000",
"tradeTime": "2021-11-12T00:55:19.991Z"
}
}
{
"jsonrpc": "2.0",
"method": "report",
"params": {
"id": "6447cf917963464a811a4af426102c19",
"userProvidedId": "53b7cf917963464a811a4af426102c19",
"symbol": "ETH/BTC",
"side": "sell",
"status": "New",
"type": "limit",
"quantity": "0.001",
"price": "0.053868",
"executedQuantity": "0.000",
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "new"
}
}
{
"jsonrpc": "2.0",
"method": "report",
"params": {
"id": "6447cf917963464a811a4af426102c19",
"userProvidedId": "53b7cf917963464a811a4af426102c19",
"symbol": "ETH/BTC",
"side": "sell",
"status": "Cancelled",
"type": "limit",
"quantity": "0.001",
"price": "0.053868",
"executedQuantity": "0.001",
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "cancelled"
}
}
{
"jsonrpc": "2.0",
"method": "report",
"params": {
"id": "6447cf917963464a811a4af426102c19",
"userProvidedId": "53b7cf917963464a811a4af426102c19",
"symbol": "ETH/BTC",
"side": "sell",
"status": "Active",
"type": "limit",
"quantity": "0.001",
"price": "0.053868",
"executedQuantity": "0.001",
"createdAt": 1636676119991,
"updatedAt": 1636676119991,
"reportType": "update"
}
}
none
result, plus a portfolioData summary.none
wscat -c wss://ws.nonkyc.io
{
"method": "subscribeBalances",
"params": {},
"id": 123
}
{
"jsonrpc": "2.0",
"method": "currentBalances",
"timestamp": 1636676119991,
"portfolioData": {
"totalUsdValue": "1234.56",
"totalBtcValue": "0.01234567",
"dailyChange": "1.2",
"lastPortfolioUpdate": 1636676119991
},
"result": [
{
"assetId": "5f3a1c2b4d5e6f7a8b9c0d1e",
"ticker": "BTC",
"available": "0.01000000",
"held": "0.00100000",
"changePercent": "0.0"
}
],
"id": 123
}
{
"jsonrpc": "2.0",
"method": "balanceUpdate",
"params": {
"assetId": "5f3a1c2b4d5e6f7a8b9c0d1e",
"ticker": "BTC",
"available": "0.00900000",
"held": "0.00200000"
},
"timestamp": 1636676129991
}
{
"method": "getBalanceValues",
"params": {},
"id": 124
}
{
"jsonrpc": "2.0",
"result": {
"totalUsdValue": "1234.56",
"totalBtcValue": "0.01234567",
"valueDiff": "1.2",
"lastPortfolioUpdate": "11/12/2021, 00:55:19 GMT"
},
"id": 124
}
none
result.transferType is deposit, withdrawal or transfer. Deposits report confirmations and isPosted; withdrawals report isSent, transactionId and isConfirmed; transfers report direction. Every frame carries the new availableBalance of the asset.wscat -c wss://ws.nonkyc.io
{
"method": "subscribeTransfers",
"params": {},
"id": 123
}
{
"jsonrpc": "2.0",
"method": "transferreport",
"params": {
"transferType": "deposit",
"id": "6447cf917963464a811a4af426102c19",
"ticker": "BTC",
"network": "BTC",
"address": "bc1q...",
"quantity": "0.01000000",
"transactionId": "3a1f...",
"confirmations": 2,
"status": "Pending",
"isPosted": false,
"isReversed": false,
"availableBalance": "0.01000000",
"createdAt": 1636676119991,
"updatedAt": 1636676129991,
"reportType": "update"
}
}