Spot

Terminology

  • base asset refers to the asset that is the quantity of a symbol.

  • quote asset refers to the asset that is the price of a symbol.

Symbol status

  • TRADING

  • HALT

  • BREAK

Order status

  • NEW

  • PARTIALLY_FILLED

  • FILLED

  • CANCELED

  • PENDING_CANCEL

  • REJECTED

Order types

  • LIMIT

  • MARKET

Order side

  • BUY

  • SELL

Time in Force

  • GTC

  • IOC

  • FOK

Kline/Candlestick Interval

m -> minutes; h -> hours; d -> days; w -> weeks; M -> months

  • 1m

  • 3m

  • 5m

  • 15m

  • 30m

  • 1h

  • 2h

  • 4h

  • 6h

  • 8h

  • 12h

  • 1d

  • 3d

  • 1w

  • 1M

For detailed request limit information, see brokerInfo.

Rate limiters (rateLimitType)

  • REQUESTS_WEIGHT

  • ORDERS

Rate limit intervals

  • SECOND

  • MINUTE

  • DAY

For example:

{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"limit": 20
}

Public

Security Type: None

Endpoints under Public section can be accessed freely without requiring any API-key or signatures.

get
Test Connectivity

https://api.bhex.com/openapi/v1/ping
This endpoint checks connectivity to the host
Request
Response
Request
Response
200: OK
Connection normal.
{}
  • Weight: 0

get
Check Server Time

https://api.bhex.com/openapi/v1/time
This endpoint checks connectivity to the server and retrieves server timestamp
Request
Response
Request
Response
200: OK
Successfully retrieved server time.
{"serverTime": 1538323200000}
  • Weight: 0

get
Pairs

https://api.bhex.com/openapi/v1/pairs
Return all actively trading pairs
Request
Response
Request
Response
200: OK
[
{
"symbol": "BTCUSDT",
"quoteToken": "USDT",
"baseToken": "BTC"
},...
]

Market

Security Type: None

Endpoints under the Market section can be accessed freely without requiring any API-key or signatures.

get
Broker Token Information

https://api.bhex.com/openapi/v1/brokerInfo
Current broker trading rules and symbol information
Request
Response
Request
Query Parameters
type
optional
string
Trade section information. Possible values include token, options, and contracts, If the parameter is not sent, all trading information will be returned.
Response
200: OK
Successfully retrieved broker trading rules.
{
"timezone": "UTC",
"serverTime": 1538323200000,
"rateLimits": [{
"rateLimitType": "REQUESTS_WEIGHT",
"interval": "MINUTE",
"limit": 1500
},
{
"rateLimitType": "ORDERS",
"interval": "SECOND",
"limit": 20
},
{
"rateLimitType": "ORDERS",
"interval": "DAY",
"limit": 350000
}
],
"brokerFilters":[],
"symbols": [{
"symbol": "ETHBTC",
"status": "TRADING",
"baseAsset": "ETH",
"baseAssetPrecision": "0.001",
"quoteAsset": "BTC",
"quotePrecision": "0.01",
"icebergAllowed": false,
"filters": [{
"filterType": "PRICE_FILTER",
"minPrice": "0.00000100",
"maxPrice": "100000.00000000",
"tickSize": "0.00000100"
}, {
"filterType": "LOT_SIZE",
"minQty": "0.00100000",
"maxQty": "100000.00000000",
"stepSize": "0.00100000"
}, {
"filterType": "MIN_NOTIONAL",
"minNotional": "0.00100000"
}]
}]
}

Response:

name

type

example

description

timezone

string

UTC

Timezone of timestamp

serverTime

long

1554887652929

Retrieves the current time on server (in ms).

In the symbols field, All actively trading symbols will be displayed.

name

type

example

description

symbol

string

ETHBTC

Name of the symbol

status

string

TRADING

Status of the symbol

baseAsset

string

ETH

Underlying asset for the symbol

baseAssetPrecision

float

0.001

Precision of the symbol quantity

quoteAsset

string

BTC

Quote asset for the symbol

quoteAssetPrecision

float

0.01

Precision of the symbol price

icebergAllowed

string

false

Whether iceberg orders are allowed.

For filters in symbols field:

name

type

example

description

filterType

string

PRICE_FILTER

Type of the filter.

minPrice

float

0.001

Minimum of the symbol price

maxPrice

float

100000.00000000

Maximum of the symbol price

tickSize

float

0.001

Precision of the symbol price.

minQty

float

0.01

Minimal trading quantity of the symbol

maxQty

float

100000.00000000

Maximum trading quantity of the symbol

stepSize

float

0.001

Precision of the symbol quantity

minNotional

float

1

Precision of the symbol order size (quantity * price)

get
Depth

https://api.bhex.com/openapi/quote/v1/depth
This endpoint retrieve market depth data. This endpoint updates every 300ms.
Request
Response
Request
Query Parameters
symbol
required
string
Symbol Name. E.g. BTCUSDT
limit
optional
integer
Default 100; Max 100.
Response
200: OK
Successfully retrieved market depth data
{
"bids": [
[
"3.90000000", // PRICE
"431.00000000" // QTY
],
[
"4.00000000",
"431.00000000"
]
],
"asks": [
[
"4.00000200", // PRICE
"12.00000000" // QTY
],
[
"5.10000000",
"28.00000000"
]
]
}

Response:

name

type

example

description

time

long

1550829103981

Current timestamp (ms)

bids

list

(see below)

List of all bids, best bids first. See below for entry details.

asks

list

(see below)

List of all asks, best asks first. See below for entry details.

The fields bids and asks are lists of order book price level entries, sorted from best to worst.

name

type

example

description

''

float

123.10

price level

''

float

300

The total quantity of orders for this price level

https://api.bhex.com/openapi/quote/v1/depth/merged
This endpoint retrieve market depth data (not full depth). This endpoint updates every 300ms.
Request
Response
Request
Query Parameters
symbol
required
string
Symbol Name. E.g. BTCUSDT
limit
optional
integer
Default 40; Max 40.
Response
200: OK
Successfully retrieved market depth data
{
"bids": [
[
"3.90000000", // PRICE
"431.00000000" // QTY
],
[
"4.00000000",
"431.00000000"
]
],
"asks": [
[
"4.00000200", // PRICE
"12.00000000" // QTY
],
[
"5.10000000",
"28.00000000"
]
]
}

Response:

name

type

example

description

time

long

1550829103981

Current timestamp (ms)

bids

list

(see below)

List of all bids, best bids first. See below for entry details.

asks

list

(see below)

List of all asks, best asks first. See below for entry details.

The fields bids and asks are lists of order book price level entries, sorted from best to worst.

name

type

example

description

''

float

123.10

price level

''

float

300

The total quantity of orders for this price level

get
Recent Trades List

https://api.bhex.com/openapi/quote/v1/trades
This endpoint retrieves latest trades
Request
Response
Request
Query Parameters
symbol
required
string
Symbol Name. E.g. BTCUSDT
limit
optional
integer
Default 500; Max 1000
Response
200: OK
Successfully retrieved recent trades
[
{
"price": "4.00000100",
"qty": "12.00000000",
"time": 1499865549590,
"isBuyerMaker": true
},...
]

Response:

name

type

example

description

price

float

0.055

The price of the trade

time

long

1537797044116

Current timestamp (ms)

qty

float

5

The quantity traded

isBuyerMaker

string

true

true= Order is a buy order when created, false = Order is a sell order when created

get
Kline/candlestick data

https://api.bhex.com/openapi/quote/v1/klines
This endpoint retrieves kline data
Request
Response
Request
Query Parameters
symbol
required
string
Symbol Name
interval
required
string
Interval of the Kline. Possible values include: 1m,5m,15m,30m,1h,1d,1w,1M
startTime
optional
number
Starting timestamp (ms)
endTime
optional
number
Ending timestamp (ms)
limit
optional
integer
Default 500; Max 1000
Response
200: OK
Successfully retrieved kline data
[
[
1499040000000, // Open time
"0.01634790", // Open
"0.80000000", // High
"0.01575800", // Low
"0.01577100", // Close
"148976.11427815", // Volume
1499644799999, // Close time
"2434.19055334", // Quote asset volume
308, // Number of trades
"1756.87402397", // Taker buy base asset volume
"28.46694368" // Taker buy quote asset volume
]
]

Response:

name

type

example

description

''

long

1538728740000

Open Time

''

float

36.00000

Open

''

float

36.00000

High

''

float

36.00000

Low

''

float

36.00000

Close

''

float

148976.11427815

Trade volume amount

''

long

1538728740000

Close time

''

float

2434.19055334

Quote asset volume

''

integer

308

Number of trades

''

float

1756.87402397

Taker buy base asset volume

''

float

28.46694368

Taker buy quote asset volume

  • If startTime and endTime are not sent, the most recent klines are returned.

get
24hrs ticker price change statistics

https://api.bhex.com/openapi/quote/v1/ticker/24hr
24 hour price change statistics. Careful when accessing this no symbol.
Request
Response
Request
Path Parameters
symbol
optional
string
Symbol Name. E.g. BTCUSDT
Response
200: OK
Successfully retrieved ticker statistics
## Single ticker
{
"time": 1538725500422,
"symbol": "ETHBTC",
"bestBidPrice": "4.00000200",
"bestAskPrice": "4.00000200",
"lastPrice": "4.00000200",
"openPrice": "99.00000000",
"highPrice": "100.00000000",
"lowPrice": "0.10000000",
"volume": "8913.30000000"
}
## Multiple ticker info when symbol is omiited
[
{
"time": 1538725500422,
"symbol": "ETHBTC",
"lastPrice": "4.00000200",
"openPrice": "99.00000000",
"highPrice": "100.00000000",
"lowPrice": "0.10000000",
"volume": "8913.30000000"
},...
]

Response:

name

type

example

description

time

long

1538728740000

Open Time

symbol

string

ETHBTC

Symbol Name

bestBidPrice

float

4.000002000

Best Bid Price

bestAskPrice

float

4.000002000

Best Ask Price

lastPrice

float

4.000002000

Last Price

openPrice

float

99.0000000

Open Price

highPrice

float

100.0000000

High Price

lowPrice

float

0.10000000

Low Price

volume

float

8913.300000

Trade Volume

  • If the symbol is not sent, tickers for all symbols will be returned in an array.

get
Symbol price ticker

https://api.bhex.com/openapi/quote/v1/ticker/price
Latest price for a symbol or symbols
Request
Response
Request
Query Parameters
symbol
optional
string
Symbol Name. E.g. BTCUSDT
Response
200: OK
Successfully retrieved symbol price info
## Single ticker
{
"price": "4.00000200"
}
## Multiple ticker info when symbol is omiited
[
{
"symbol": "LTCBTC",
"price": "4.00000200"
},
{
"symbol": "ETHBTC",
"price": "0.07946600"
},...
]

Response:

name

type

example

description

symbol

string

ETHBTC

Symbol Name

price

float

4.0000200

Symbol Price

  • If the symbol is not sent, prices for all symbols will be returned in an array.

get
Symbol Orderbook Ticker

https://api.bhex.com/openapi/quote/v1/ticker/bookTicker
Best price/quantity on the orderbook for a symbol or symbols
Request
Response
Request
Path Parameters
symbol
optional
string
Symbol Name. E.g. BTCUSDT
Response
200: OK
Successfully retrieved bookticker info
## Single ticker
{
"symbol": "LTCBTC",
"bidPrice": "4.00000000",
"bidQty": "431.00000000",
"askPrice": "4.00000200",
"askQty": "9.00000000"
}
## Multiple ticker info when symbol is omiited
[
{
"symbol": "LTCBTC",
"bidPrice": "4.00000000",
"bidQty": "431.00000000",
"askPrice": "4.00000200",
"askQty": "9.00000000"
},
{
"symbol": "ETHBTC",
"bidPrice": "0.07946700",
"bidQty": "9.00000000",
"askPrice": "100000.00000000",
"askQty": "1000.00000000"
},...
]

Response:

name

type

example

description

symbol

string

ETHBTC

Symbol Name

bidPrice

float

4.0000000

Bid Price

bidQty

float

431

Bid Quantity

askPrice

float

4.0000200

Ask Price

askQty

float

9

Ask Quantity

  • If the symbol is not sent, prices for all symbols will be returned in an array.

Trade

Security Type: USER_DATA/TRADE

Endpoints under Trade require an API-key and a signature.

post
New Order

https://api.bhex.com/openapi/v1/order
This endpoint allows you to send in a new order
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key.
Query Parameters
symbol
required
string
Symbol Name. E.g. BTCUSDT
quantity
required
number
Order quantity. For MARKET BUY orders, quantity=amount.
side
required
string
Side of the order, BUY/SELL
type
required
string
Type of the order, LIMIT/MARKET/LIMIT_MAKER
timeInForce
optional
string
Time in force. Possible values include GTC(Default),FOK,IOC
price
optional
number
Order price, REQUIRED for LIMIT orders
newClientOrderId
optional
string
Unique order ID generated by users to mark their orders
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Order successfully placed.
{
'symbol': 'LXTUSDT',
'orderId': '494736827050147840',
'clientOrderId': '157371322565051',
'transactTime': '1573713225668',
'price': '0.005452',
'origQty': '110',
'executedQty': '0',
'status': 'NEW',
'timeInForce': 'GTC',
'type': 'LIMIT',
'side': 'SELL'
}
  • Weight: 1

Response:

Name

type

example

description

orderId

integer

891

ID of the order.

clientOrderId

integer

213443

A unique ID of the order.

symbol

string

LXTUSDT

Symbol Name

transactTime

integer

1573713225668

Time the order is placed

price

float

4765.29

Price of the order.

origQty

float

1.01

Quantity ordered

executedQty

float

1.01

Quantity of orders that has been executed

type

string

LIMIT

The order type, possible types: LIMIT, MARKET

side

string

BUY

Direction of the order. Possible values include BUY or SELL

status

string

NEW

The state of the order.Possible values include NEW, PARTIALLY_FILLED, FILLED, CANCELED, and REJECTED.

timeInForce

string

GTC

Time in force. Possible values include GTC,FOK,IOC

  • Weight: 1

post
Test New Order

https://api.bhex.com/openapi/v1/order/test
Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send the order into the matching engine.
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Query Parameters
symbol
required
string
Symbol Names. E.g. BTCUSDT
quantity
required
number
Order Quantity
side
required
string
Side of the order, BUY/SELL
type
required
string
Type of the order, LIMIT/MARKET/LIMIT_MAKER
timeInForce
optional
string
Time in force. Possible values include GTC(Default),FOK,IOC
price
optional
number
Order Price, REQUIRED for LIMIT orders
newClientOrderId
optional
string
Unique order ID generated by users to mark their orders.
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully placed a test order.
{}
  • Weight: 1

get
Query Order

https://api.bhex.com/openapi/v1/order
Check an order's
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Query Parameters
orderId
optional
string
Order Id. E.g. 507904211109878016
clientOrderId
optional
string
Client Order Id, Unique order ID generated by users to mark their orders. E.g. 12094ahsihsiad
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully retrieved order information
{
'orderId': '488856771354432512',
'clientOrderId': '1573012268226',
'exchangeId': '301',
'symbol': 'BTCUSDT',
'price': '0',
'origQty': '0.000664',
'executedQty': '0.000664',
'cummulativeQuoteQty': '6.16415104',
'avgPrice': '9283.36',
'status': 'FILLED',
'timeInForce': 'GTC',
'type': 'MARKET',
'side': 'SELL',
'stopPrice': '0.0',
'icebergQty': '0.0',
'time': '1573012268407',
'updateTime': '0',
'isWorking': true
}

Response:

Name

type

example

description

orderId

integer

713637304

ID of the order

clientOrderId

string

213443

Unique ID of the order.

symbol

string

BHTUSDT

name of the symbol

price

float

12.34

Price of the order.

origQty

float

1.01

Quantity ordered

executedQty

float

1.01

Quantity of orders that has been executed

avgPrice

float

4754.24

Average price of filled orders.

type

string

LIMIT

The order type, possible types: LIMIT, MARKET

side

string

BUY

Direction of the order. Possible values include BUY or SELL

status

string

NEW

The state of the order.Possible values include NEW, PARTIALLY_FILLED, FILLED, CANCELED, and REJECTED.

timeInForce

string

GTC

Time in force. Possible values include GTC,FOK,IOC.

  • Weight: 1

  • Either orderId or clientOrderId must be sent.

  • For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.

delete
Cancel Order

https://api.bhex.com/openapi/v1/order
Cancel an active order
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Query Parameters
orderId
optional
string
Order Id. E.g. 507904211109878016
clientOrderId
optional
string
Client Order Id, Unique order ID generated by users to mark their orders. E.g. 12094ahsihsiad
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully cancelled the order.
{
'exchangeId': '301',
'symbol': 'BHTUSDT',
'clientOrderId': '0',
'orderId': '499890200602846976',
'status': 'CANCELED'
}

Name

type

example

description

orderId

integer

713637304

ID of the order

clientOrderId

string

213443

Unique ID of the order.

symbol

string

BHTUSDT

Name of the symbol

status

string

NEW

The state of the order.Possible values include NEW, PARTIALLY_FILLED, FILLED, CANCELED, and REJECTED.

  • Weight: 1

  • Either orderId or clientOrderId must be sent.

get
Current Open Orders

https://api.bhex.com/openapi/v1/openOrders
Get all open orders on a symbol. Careful when accessing this with no symbol
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Query Parameters
symbol
optional
string
Symbol Name. E.g. BTCUSDT
orderId
optional
string
Order Id. E.g. 507904211109878016
limit
optional
integer
Default 500; Max 1000
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
[
{
'orderId': '499902955766523648',
'clientOrderId': '157432907618453',
'exchangeId': '301',
'symbol': 'BHTUSDT',
'price': '0.01',
'origQty': '50',
'executedQty': '0',
'cummulativeQuoteQty': '0',
'avgPrice': '0',
'status': 'NEW',
'timeInForce': 'GTC',
'type': 'LIMIT',
'side': 'BUY',
'stopPrice': '0.0',
'icebergQty': '0.0',
'time': '1574329076202',
'updateTime': '0',
'isWorking': true
},...
]

Response:

Name

type

example

description

orderId

integer

713637304

ID of the order

clientOrderId

string

213443

Unique ID of the order.

symbol

string

BHTUSDT

name of the symbol

price

float

12.34

Price of the order.

origQty

float

1.01

Quantity ordered

executedQty

float

1.01

Quantity of orders that has been executed

avgPrice

float

4754.24

Average price of filled orders.

type

string

LIMIT

The order type, possible types: LIMIT, MARKET

side

string

BUY

Direction of the order. Possible values include BUY or SELL

status

string

NEW

The state of the order.Possible values include NEW, PARTIALLY_FILLED, FILLED, CANCELED, and REJECTED.

timeInForce

string

GTC

Time in force. Possible values include GTC,FOK,IOC.

  • Weight: 1

  • If orderId is set, it will get orders < that orderId. Otherwise most recent orders are returned.

  • Weight: 1

  • If orderId is set, it will get orders < that orderId. Otherwise most recent orders are returned.

get
History Orders

https://api.bhex.com/openapi/v1/historyOrders
Get all history orders. Careful when accessing this with no symbol.
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Query Parameters
symbol
optional
string
Symbol Name. E.g. BTCUSDT
orderId
optional
string
Order Id. E.g. 507904211109878016
startTime
optional
integer
Start time (ms)
endTime
optional
integer
End Time (ms)
limit
optional
integer
Default 500; Max 1000
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully retrieved history orders.
[
{
'orderId': '499890200602846976',
'clientOrderId': '157432755564968',
'exchangeId': '301',
'symbol': 'BHTUSDT',
'price': '0.01',
'origQty': '50',
'executedQty': '0',
'cummulativeQuoteQty': '0',
'avgPrice': '0',
'status': 'CANCELED',
'timeInForce': 'GTC',
'type': 'LIMIT',
'side': 'BUY',
'stopPrice': '0.0',
'icebergQty': '0.0',
'time': '1574327555669',
'updateTime': '0',
'isWorking': true
},...
]

Response:

Name

type

example

description

orderId

integer

713637304

ID of the order

clientOrderId

string

213443

Unique ID of the order.

symbol

string

BHTUSDT

name of the symbol

price

float

12.34

Price of the order.

origQty

float

1.01

Quantity ordered

executedQty

float

1.01

Quantity of orders that has been executed

avgPrice

float

4754.24

Average price of filled orders.

type

string

LIMIT

The order type, possible types: LIMIT, MARKET

side

string

BUY

Direction of the order. Possible values include BUY or SELL

status

string

NEW

The state of the order.Possible values include FILLED, CANCELED, and REJECTED.

timeInForce

string

GTC

Time in force. Possible values include GTC,FOK,IOC.

  • Weight: 5

  • If orderId is set, it will get orders < that orderId. Otherwise most recent orders are returned.

get
Trades

https://api.bhex.com/openapi/v1/myTrades
Get historical trades.
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Query Parameters
symbol
required
string
Symbol Name. E.g. BTCUSDT
startTime
optional
integer
Start time (ms)
endTime
optional
integer
End time (ms)
fromId
optional
integer
Trade Id to fetch from
toId
optional
integer
Trade Id to fetch to
limit
optional
integer
Default 500; Max 1000
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully retrieved historical trades.
[
{
"symbol": "ETHBTC",
"id": 28457,
"orderId": 100234,
"price": "4.00000100",
"qty": "12.00000000",
"commission": "10.10000000",
"commissionAsset": "ETH",
"time": 1499865549590,
"isBuyer": true,
"isMaker": false
}
]

Response:

Name

type

example

description

symbol

string

ETHBTC

Symbol Name (trading pair)

id

integer

28457

Trade ID

orderId

integer

100234

Order ID

price

integer

4.001

Timestamp of the trade

qty

float

12

Trade quantity

commission

float

10.10000

Trading fee

commissionAsset

string

ETH

Trading fee token name

time

number

1499865549590

Timestamp of the trade

isBuyer

bool

true

true= Buyer false= Seller

isMaker

bool

false

true=Maker false=Taker

  • Weight: 5

  • If only fromId is set,it will get orders < that fromId in descending order.

  • If only toId is set, it will get orders > that toId in ascending order.

  • If fromId is set and toId is set, it will get orders < that fromId and > that toId in descending order.

  • If fromId is not set and toId it not set, most recent order are returned in descending order.

Account

Security Type: USER_DATA/TRADE

Endpoints under Account require an API-key and a signature.

get
Account Information

https://api.bhex.com/openapi/v1/account
Get current account information (balances)
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully retrieved account information.
{
'balances':
[
{
'asset': 'ALGO',
'free': '0',
'locked': '0'
},
{
'asset': 'BHT',
'free': '0',
'locked': '0'
},...
]
}

Response:

Name

type

example

description

balances

float

Show balance details.

In the balances field:

Name

type

example

description

asset

string

USDT

Name of the asset

free

float

600.0

Amount available for use

locked

float

100.0

Amount locked (for open orders)

  • Weight: 5

get
Account Deposit Information

https://api.bhex.com/openapi/v1/depositOrders
Get deposit orders for a specific account
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API key
Query Parameters
startTime
optional
integer
Start time (ms)
endTime
optional
integer
End time (ms)
fromId
optional
string
Deposit orderId to fetch from. Default gets the most recent deposit orders.
limit
optional
integer
Default 500; Max 1000
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current unix timestamp(ms)
RecvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully retrieved deposit history records
[
{
'time': '1565769575929',
'orderId': '428100569859739648',
'token': 'USDT',
'address': '',
'addressTag': '',
'fromAddress': '',
'fromAddressTag': '',
'quantity': '1100'
},...
]

Response:

Name

type

example

description

time

float

1565769575929

Deposit timestamp.

orderId

integer

428100569859739648

Order ID

token

string

USDT

Token Name

address

string

Your token address

addressTag

string

Your token address tag

fromAddress

string

From which token address

fromAddressTag

string

From which token address tag

quantity

float

1100

Transferred quantity

  • Weight: 5

  • If fromId is set, it will get orders > that fromId. Otherwise most recent orders are returned.

get
Account withdrawal information

https://api.bhex.com/openapi/v1/withdrawalOrders
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API Key
Query Parameters
token
optional
string
Token name. Default: All tokens.
startTime
optional
number
Starting timestamp(ms)
endTime
optional
number
Ending timestamp(ms)
fromId
optional
number
Query from this OrderId. Defaults to latest records.
limit
optional
integer
Default 500; Max 1000
Body Parameters
signature
required
string
Authentication is needed for this endpoint.
timestamp
required
integer
Current unix timestamp(ms).
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Withdrawal recorded returned!
[
{
"time":"1536232111669",
"orderId":"90161227158286336",
"accountId":"517256161325920",
"tokenId":"BHC",
"tokenName":"BHC",
"address":"0x815bF1c3cc0f49b8FC66B21A7e48fCb476051209",
"addressExt":"address tag",
"quantity":"14", // Withdrawal qty
"arriveQuantity":"14", // Arrived qty
"statusCode":"PROCESSING_STATUS",
"status":3,
"txid":"",
"txidUrl":"",
"walletHandleTime":"1536232111669",
"feeTokenId":"BHC",
"feeTokenName":"BHC",
"fee":"0.1",
"requiredConfirmNum":0, // Required confirmations
"confirmNum":0, // Confirmations
"kernelId":"", // BEAM and GRIN only
"isInternalTransfer": false // True if this transfer is internal
},
{
"time":"1536053746220",
"orderId":"762522731831527",
"accountId":"517256161325920",
"tokenId":"BHC",
"tokenName":"BHC",
"address":"fdfasdfeqfas12323542rgfer54135123",
"addressExt":"EOS tag",
"quantity":"", //Withdrawal qty
"arriveQuantity":"10", // Arrived qty
"statusCode":"BROKER_AUDITING_STATUS",
"status":"2",
"txid":"",
"txidUrl":"",
"walletHandleTime":"1536232111669",
"feeTokenId":"BHC",
"feeTokenName":"BHC",
"fee":"0.1",
"requiredConfirmNum":0, // Required confirmations
"confirmNum":0, // Confirmations
"kernelId":"", // BEAM and GRIN only
"isInternalTransfer": false // True if this transfer is internal
}
]

Status Code

Status

Description

1

BROKER_AUDITING_STATUS

Processing by broker

2

BROKER_REJECT_STATUS

Rejected by broker

3

AUDITING_STATUS

Processing by platform

4

AUDIT_REJECT_STATUS

Reject by platform

5

PROCESSING_STATUS

Processing by wallet

6

WITHDRAWAL_SUCCESS_STATUS

Withdrawal success

7

WITHDRAWAL_FAILURE_STATUS

Withdrawal failed

8

BLOCK_MINING_STATUS

Blockchain mining

get
Withdrawal Detail

https://api.bhex.com/openapi/v1/withdraw/detail
Get withdrawal info
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API Key
Query Parameters
orderId
optional
number
Either orderId or clientOrderId must be sent
clientOrderId
optional
string
Either orderId or clientOrderId must be sent
Body Parameters
signature
required
string
Authentication is needed for this endpoint
timestamp
required
integer
Current Unix Timestamp (ms)
recvWindow
optional
integer
RecvWindow for this request.
Response
200: OK
Successfully retrieved withdrawal info
{
"time":"1536232111669",
"orderId":"90161227158286336",
"accountId":"517256161325920",
"tokenId":"BHC",
"tokenName":"BHC",
"address":"0x815bF1c3cc0f49b8FC66B21A7e48fCb476051209",
"addressExt":"address tag",
"quantity":"14", // Withdrawal qty
"arriveQuantity":"14", // Arrived qty
"statusCode":"PROCESSING_STATUS",
"status":3,
"txid":"",
"txidUrl":"",
"walletHandleTime":"1536232111669",
"feeTokenId":"BHC",
"feeTokenName":"BHC",
"fee":"0.1",
"requiredConfirmNum":0, // Required confirmations
"confirmNum":0, // Confirmations
"kernelId":"", // BEAM and GRIN only
"isInternalTransfer": false // True if this transfer is internal
}

post
Get Sub-account list

https://api.bhex.com/openapi/v1/subAccount/query
Get your main-account and sub-accounts
Request
Response
Request
Headers
X-BH-APIKEY
required
string
Your API Key
Body Parameters
signature
required
string
Authentication is needed for this request
timestamp
required
integer
Current unix timestamp (ms)
RecvWindow
optional
integer
Recv Window for this request
Response
200: OK
Successfully retrieved account list
[
{
"accountId": "122216245228131",
"accountName": "",
"accountType": 1,
"accountIndex": 0 // main-account: 0, sub-account: 1
},
{
"accountId": "482694560475091200",
"accountName": "createSubAccountByCurl",