ADA / JPYT 8.40381000 GOG / USDT 0.02240000 BTC / ETH 31.77008865 CTXC / ETH 0.00092463 OCT / ETH 0.00000000 AVH / ETH 0.00000357 OC / ETH 0.00000323 ADA / ETH 0.00037181

JNB.COM has provided a strong and convenient API to help users to integrate entire trading functions into their own Apps.

API (market)

Receive newest market quotation data at JNB.com


Root URL
Description
https://api.jnb.com/data/v2/ticker
market

example


//# Request
GET https://api.jnb.com/data/v2/ticker?currency=btm_cnyt
//# Response
{
	"ticker": {
		"high": "0.033153",
		"low": "0.030352",
		"buy": "0.030728",
		"sell": "0.030751",
		"last": "0.030729",
		"vol": "838.98"
	}
}
                            

return to value description


high : highest bid
low : lowest bid
buy : buy unit price
sell : sell unit price
last : newest transaction price
vol : 24h volume
                              

request parameter description

parameter name
Description
currency
ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth
https://api.jnb.com/data/v2/tickers
all market

example


//# Request
GET https://api.jnb.com/data/v2/tickers
//# Response
{"code":"0000","data":[{"symbol":"btc_cnyt","ticker":{"buy":57100.00100000,"high":61886.45000000,"last":58592.24900000,"low":57758.20000000,"sell":76180.95300000,"vol":6.4340}}],"id":null,"message":"success"}
                            

return to value description


high : highest bid
low : lowest bid
buy : buy unit price
sell : sell unit price
last : newest transaction price
vol : 24h volume
symbol : exchange pair name
code : return to status code(0000:success)
                              

request parameter description

parameter name
Description
https://api.jnb.com/data/v2/depth
Market depth

example


//# Request
GET https://api.jnb.com/data/v2/depth?currency=btm_cnyt&size=3&merge=0.1
//# Response
{
  "asks": [
    [
      83.28,
      11.8
    ]...
  ],
  "bids": [
    [
      81.91,
      3.65
    ]...
  ],
  "timestamp" : timestamp
}
                            

return to value description


asks : seller depth
bids : buyer depth
timestamp : This depth produces a timestamp.
                            

request parameter description

parameter name
Description
currency
ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth
size

Gear 1-50, if there is a merge depth, only 5 depth can be returned.

merge
ctxc_eth: maximum places 1.0E-8
oct_eth: maximum places 1.0E-8
avh_eth: maximum places 1.0E-8
oc_eth: maximum places 1.0E-8
ada_eth: maximum places 1.0E-8
ada_jpyt: maximum places 1.0E-8
gog_usdt: maximum places 1.0E-8
btc_eth: maximum places 1.0E-8
https://api.jnb.com/data/v2/trades
Trading history

example


//# Request
GET https://api.jnb.com/data/v2/trades?currency=btm_cnyt
//# Response
[
  {
    "amount": 0.541,
    "date": 1472711925,
    "price": 81.87,
    "tid": 16497097,
    "trade_type": "ask",
    "type": "sell"
  }...
]
                            

return to value description


date : trading time(timestamp)
price : trading price
amount : trading volume
tid : trading ID
type : trading type,buy/sell
trade_type : order type,ask/bid
                            

request parameter description

parameter name
Description
currency
ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth
https://api.jnb.com/data/v2/kline
K line

example


//# Request
GET https://api.jnb.com/data/v2/kline?currency=btc_cnyt
//# Response
{
"data": [
  [
    1472107500000,
    3840.46,
    3843.56,
    3839.58,
    3843.3,
    492.456
  ]...
]
}
                            

return to value description


data : K line details
data : info
[
  1417536000000, timestamp
  2370.16, open
  2380, high
  2352, low
  2367.37, close
  17259.83, trading volume
]
                            

request parameter description

parameter name
Description
currency
ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth
type

1 : 1minute
3 : 3minute
5 : 5minute
15 : 15minute
30 : 30minute
1440 : 1day
10080 : 1week
60 : 1hour
120 : 2hour
240 : 4hour
360 : 6hour
720 : 12hour

size

return to data limit(default 1000,if more than 1000,then only go back to 1000)

API(trading)

Fast trading at JNB.com


Root URL
Description
https://api.jnb.com/api/v2/order
Place an order

example


//# Request
GET https://api.jnb.com/api/v2/order?method=order
  &accesskey=accesskey&price=1024&amount=1.5&tradeType=1&currency=btc_cnyt
  &sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{
  "code": "0000",
  "message": "operation success ",
  "id": "20131228361867"
}
                            

return to value description


code : return code
message : hint
id : order number
                            

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationorder
accesskey
accesskey
price

unit price
ctxc_eth:retain decimal8 place
oct_eth:retain decimal8 place
avh_eth:retain decimal8 place
oc_eth:retain decimal8 place
ada_eth:retain decimal8 place
ada_jpyt:retain decimal8 place
gog_usdt:retain decimal8 place
btc_eth:retain decimal8 place

amount

trading volume
BTC:minimum 0E-12
ETH:minimum 0E-12
USDT:minimum 1.000000000000
CTXC:minimum 0E-12
AVH:minimum 0E-12
OC:minimum 0E-12
HOT:minimum 0E-12
JPYT:minimum 0E-12
ADA:minimum 0E-12
GOG:minimum 0E-12
OCT:minimum 0E-12

tradeType

trading type0/1[buy/sell]

currency

ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth

sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/cancel
order cancel

example


//# Request
GET https://api.jnb.com/api/v2/cancel?method=cancel
  &accesskey=your_access_key&id=123456789&currency=btc_cnyt
  &sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{
  "code": "0000",
  "message": "operation success "
}
                            

return to value description


code : return code
message : hint
                            

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationcancel
accesskey
accesskey
id
order number
currency

ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth

sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getOrder
receive buy or sell order

example


//# Request
GET https://api.jnb.com/api/v2/getOrder?method=getOrder&accesskey=your_access_key&id=123456789&currency=btc_cnyt&sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{
  "currency": "btc",
  "id": "20150928158614292",
  "price": 1560,
  "status": 3,
  "total_amount": 0.1,
  "trade_amount": 0,
  "trade_price" : 6000,
  "trade_date": 1443410396717,
  "trade_money": 0,
  "type": 0,
}
                            

return to value description


currency : trading type
id : order number
price : unit price
status : order status(1:order pending,2:waiting for complete,3: complete,5:order cancel)
total_amount : total order volume
trade_amount : complete order volume
trade_date : order time
trade_money : total complete amount
trade_price : average price
type : order price 0/1[buy/sell]
                            

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetOrder
accesskey
accesskey
id
order number
currency

ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth

sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getOrders
receive multiple buy or sell orders,each time return to requestpageSize<100 data record

example


//# Request
GET https://api.jnb.com/api/v2/getOrders?method=getOrders
  &accesskey=your_access_key&tradeType=1&currency=btc_cnyt&pageIndex=1
  &pageSize=20&sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
[
  {
    "currency": "btc",
    "id": "20150928158614292",
    "price": 1560,
    "status": 3,
    "total_amount": 0.1,
    "trade_amount": 0,
    "trade_price" : 6000,
    "trade_date": 1443410396717,
    "trade_money": 0,
    "type": 0
  }...
]
                            

return to value description


currency : trading type
id : order number
price : unit price
status : order status(1:order pending,2:waiting for complete,3: complete,5:order cancel)
total_amount : total order volume
trade_amount : complete order volume
trade_date : order time
trade_money : total complete amount
trade_price : average price
type : order price 0/1[buy/sell]
                            

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetOrders
accesskey
accesskey
tradeType
trading type0/1[buy/sell]
currency

ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth

pageIndex
current page number
pageSize
each page amount
sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getAccountInfo
receive user info

example


//# Request

GET https://api.jnb.com/api/v2/getAccountInfo?method=getAccountInfo
&accesskey=your_access_key&sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{
  "totalAssets" : "123.551",
  "balance": {
    
    BTC:0
    ETH:0
    USDT:0
    CTXC:0
    AVH:0
    OC:0
    HOT:0
    JPYT:0
    ADA:0
    GOG:0
    OCT:0
  }
}
                              

return to value description


username : user name
totalAssets : convert total asset(RMB)
balance(balance):

BTCBitcoin:convert total asset(RMB)
ETHEthereum:convert total asset(RMB)
USDTTether USDT:convert total asset(RMB)
CTXCCortex:convert total asset(RMB)
AVHAnimation Vision Cash:convert total asset(RMB)
OCOcean Chain:convert total asset(RMB)
HOTHolo:convert total asset(RMB)
JPYTJPYT:convert total asset(RMB)
ADA艾达币:convert total asset(RMB)
GOGGoGlobe:convert total asset(RMB)
OCTOrchid protocol:convert total asset(RMB)
                              

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetAccountInfo
accesskey
accesskey
sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getUserAddress
receive user deposit address

example


//# Request
GET https://api.jnb.com/api/v2/getUserAddress?method=getUserAddress
  &accesskey=your_access_key&currency=btc
  &sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{
  "key": "0x0af7f36b8f09410f3df62c81e5846da673d4d9a9"
}
                              

return to value description


key : address
                              

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetUserAddress
accesskey
accesskey
currency

ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth

sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getWithdrawRecord
receive withdrawal address

example


//# Request
GET https://api.jnb.com/api/v2/getWithdrawRecord?method=getWithdrawRecord
  &accesskey=your_access_key&currency=btc&pageIndex=1&pageSize=10
  &sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{
  "list": [
        {
          "amount": 0.01,
          "fees": 0.001,
          "id": 2016042556231,
          "manageTime": 1461579340000,
          "status": 3,
          "submitTime": 1461579288000,
          "toAddress": "14fxEPirL9fyfw1i9EF439Pq6gQ5xijUmp"
        }...
      ],
  "pageIndex": 1,
  "pageSize": 10,
  "totalCount": 4,
  "totalPage": 1

}
                              

return to value description


code : return code
message : hint
amount : withdrawal amount
fees : withdrawal fee
id : withdrawal record id
manageTime : withdrawal processed timestamp
submitTime : withdrawal initialed timestamp
toAddress : withdrawal received address
                              

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetWithdrawRecord
accesskey
accesskey
currency

ctxc_eth: ctxc_eth
oct_eth: oct_eth
avh_eth: avh_eth
oc_eth: oc_eth
ada_eth: ada_eth
ada_jpyt: ada_jpyt
gog_usdt: gog_usdr
btc_eth: btc_eth

pageIndex
current page number
pageSize
each page amount
sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getChargeRecord
receive digital asset deposit address

example


//# Request
GET https://api.jnb.com/api/v2/getChargeRecord?method=getChargeRecord
  &accesskey=your_access_key&currency=btc&pageIndex=1&pageSize=10
  &sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{

  "list": [
    {
      "address": "1FKN1DZqCm8HaTujDioRL2Aezdh7Qj7xxx",
      "amount": "1.00000000",
      "confirmTimes": 1,
      "currency": "BTC",
      "description": "confirm success",
      "hash": "7ce842de187c379abafadd64a5fe66c5c61c8a21fb04edff9532234a1dae6xxx",
      "id": 558,
      "status": 2,
      "submit_time": "2016-12-07 18:51:57"
    }...
  ],
  "pageIndex": 1,
  "pageSize": 10,
  "total": 8

}
                              

return to value description


code : return code
message : hint
amount : deposit amount
confirmTimes : confirm deposit number of times
currency : deposit cryptocurrency types (capital letters)
description : deposit record status 
hash : deposit transaction number
id : deposit record ID
status : status(0 confirming,1 deposit unsuccessful ,2 deposit successful)
submit_time : deposit time
address : deposit address
                              

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetChargeRecord
accesskey
accesskey
currency

BTC: Bitcoin
ETH: Ethereum
USDT: Tether USDT
CTXC: Cortex
AVH: Animation Vision Cash
OC: Ocean Chain
HOT: Holo
JPYT: JPYT
ADA: 艾达币
GOG: GoGlobe
OCT: Orchid protocol

pageIndex
current page number
pageSize
each page amount
sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getCnyWithdrawRecord
receive RMB deposit record

example


//# Request
GET https://api.jnb.com/api/v2/getCnyWithdrawRecord?method=getCnyWithdrawRecord
  &accesskey=your_access_key&pageIndex=1&pageSize=10
  &sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{

  "list": [
    {
      "account": "****4523",
      "amount": 1000,
      "bank": "china post bank",
      "date": 1473155402000,
      "description": "estimated time to account before (0:00 24/09/2018)<p class=\"auditico2\"></p>",
      "fee": 5,
      "serial_number": 2016090686300,
      "status": 3,
      "type": "yeepay"
    }...
  ],
  "pageIndex": 1,
  "pageSize": 10,
  "total": 20


}
                              

return to value description


code : return code
message : hint
account : shroff account number (only show the last 4 digital)
amount : withdrawal amount
date : withdrawal time (timestamp)
description : withdrawal record description
fees : withdrawal fee
serial_number : withdrawal record id
status : withdrawal record status (10 waiting for identification,6 waiting for confirm,4 withdrawal successful,14 withdrawing,3 withdrawing,5 withdrawal unsuccessful)
type : withdrawal type
                              

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetCnyWithdrawRecord
accesskey
accesskey
pageIndex
current page number
pageSize
each page amount
sign
request encryption signing bunch
reqTime
current time millisecond
https://api.jnb.com/api/v2/getCnyChargeRecord
receive RMB deposit record

example


//# Request
GET https://api.jnb.com/api/v2/getCnyChargeRecord?method=getCnyChargeRecord
  &accesskey=your_access_key&pageIndex=1&pageSize=10
  &sign=request encryption signing bunch&reqTime=current time millisecond
//# Response
{
  "list": [
    {
      "account": "6212867603158157",
      "amount": 1234,
      "date": 1460102487000,
      "description": "success<p class=\"auditico3\"></p>",
      "serial_number": 20160408241,
      "status": 0,
      "type": "offline bank deposit"
    }...
  ],
  "pageIndex": 1,
  "pageSize": 10,
  "total": 32

}
                              

return to value description


code : return code
message : hint
account : deposit account
amount : deposit amount
date : deposit time
description : deposit status description
serial_number : deposit record ID
status : deposit status(9 pending,1 deposit unsuccessful,0 deposit successful,13 deposit expired,8 cancelled,2 processing,10 waiting for identification)
type : deposit type 
                              

request parameter description (encryption signing please follow this order: sign and reqtime don’t need to include into signing character string)

parameter name
Description
method
direct evaluationgetCnyChargeRecord
accesskey
accesskey
pageIndex
current page number
pageSize
each page amount
sign
request encryption signing bunch
reqTime
current time millisecond

error code

All API method invocation will return to JSON error object when request failure or unknown error occurred.


Description
Description
0000
Request success
1000
System error
2000
Unauthorized access
2001
AccessKey empty
2002
unauthorized AccessKey
2011
wrong format of timestamp
2012
Times difference between timestamp and server time
2021
Sign cannot be empty
2022
Signing different
2023
Signing failure
2031
Bizparam cannot be empty
3000
User status exception
3001
account insufficient funds
3100
Unsupported transaction
3101
Currently transaction closed
3102
Out of reasonable price range
3103
Out of reasonable amount range
3104
Fail to place an order
3105
Fail to cancel an order
3106
Fail to cancel all orders
3107
Fail to receive an order info
3108
Unsupported cryptocurrency
3109
Over daily withdrawal limit
3110
Over daily withdrawal maximum amount
3111
Bound mobile number or email address
3112
KYC verification required
3113
blocked account, please contact JNB support
3114
Suspended withdrawal request, please contact JNB support
3115
Closing out position
3116
Less than minimum withdrawal amount
3117
Setup an asset pin
3118
Try asset pin over daily limit
3119
incorrect asset pin
3120
Insufficient funds
3121
unverified withdrawal address
3122
Request frequency is too high, please try later
3123
Invalid address

example code

Currently only support JAVA


Signing method: using sha to encrypt secretkey first, then signature the required parameter through encryption secretkey. Please according to interface parameter matrix to encrypt your required parameter through md5 by using 16-digits encryption code.



//......
public void order() throws Exception {
  HashMap paramMap = new LinkedHashMap();
  paramMap.put("method", "order");
  paramMap.put("accesskey", accessKey);
  paramMap.put("price", "0.00005418");
  paramMap.put("amount", "1");
  paramMap.put("tradeType", "0");
  paramMap.put("currency", "btm_btc");
  signUp(paramMap);
  String result = restTemplate.getForObject(domainUrl + "order?method={method}" +
      "&accesskey={accesskey}&price={price}&amount={amount}&tradeType={tradeType}¤cy={currency}" +
      "&sign={sign}&reqTime={reqTime}", String.class, paramMap);
  System.out.println(result);
}
//......
                      
download DEMO

FAQ

  • Access restriction
    • Each user is restricted to send only one request per second.