
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
node-api-huobi
Advanced tools
WARNING: This package is still early beta! Expect breaking changes until this sees a major release.
Non-official implementation of Huobi's API's. Developed for personal use.
For support on using the API's or development issues, please refer to the official API documentation. For questions regarding this package, please consult the code first.
const huobi=require('node-api-huobi');
const publicAPI=new huobi.publicApi();
| API | DESCRIPTION |
|---|---|
| getSystemStatus | Not implemented |
| getMarketStatus | https://huobiapi.github.io/docs/spot/v1/en/#get-market-status |
| getSymbols | https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-trading-symbol-v2 |
| getCurrencies | https://huobiapi.github.io/docs/spot/v1/en/#get-all-supported-currencies-v2 |
| getCurrencySettings | https://huobiapi.github.io/docs/spot/v1/en/#get-currencys-settings |
| getSymbolSettings | https://huobiapi.github.io/docs/spot/v1/en/#get-symbols-setting |
| getMarketSettings | https://huobiapi.github.io/docs/spot/v1/en/#get-market-symbols-setting |
| getChainsInfo | https://huobiapi.github.io/docs/spot/v1/en/#get-chains-information |
| getChainCurrencies | https://huobiapi.github.io/docs/spot/v1/en/#apiv2-currency-amp-chains |
| getTimestamp | https://huobiapi.github.io/docs/spot/v1/en/#get-current-timestamp |
const huobi=require('node-api-huobi');
const auth = {
apikey: 'MY_API_KEY',
secret: 'MY_API_SECRET'
};
const privateAPI=new huobi.privateApi(auth);
| API | DESCRIPTION |
|---|---|
| getDepositAddress | https://huobiapi.github.io/docs/spot/v1/en/#query-deposit-address |
| getWithdrawQuota | https://huobiapi.github.io/docs/spot/v1/en/#query-withdraw-quota |
| getWithdrawAddress | https://huobiapi.github.io/docs/spot/v1/en/#query-withdraw-address |
| createWithdrawRequest | https://huobiapi.github.io/docs/spot/v1/en/#create-a-withdraw-request |
| getWithdrawal | https://huobiapi.github.io/docs/spot/v1/en/#query-withdrawal-order-by-client-order-id |
| cancelWithdrawal | https://huobiapi.github.io/docs/spot/v1/en/#cancel-a-withdraw-request |
| getWithdrawalsDeposits | https://huobiapi.github.io/docs/spot/v1/en/#search-for-existed-withdraws-and-deposits |
| API | DESCRIPTION |
|---|---|
| placeConditionalOrder | https://huobiapi.github.io/docs/spot/v1/en/#place-a-conditional-order |
| cancelConditionalOrder | https://huobiapi.github.io/docs/spot/v1/en/#cancel-conditional-orders-before-triggering |
| getConditionalOrders | https://huobiapi.github.io/docs/spot/v1/en/#query-open-conditional-orders-before-triggering |
| searchConditionalOrderHistory | https://huobiapi.github.io/docs/spot/v1/en/#query-conditional-order-history |
| searchConditionalOrder | https://huobiapi.github.io/docs/spot/v1/en/#query-a-specific-conditional-order |
| API | DESCRIPTION |
|---|---|
| getExchangeRate | https://huobiapi.github.io/docs/spot/v1/en/#stable-coin-exchange |
| exchangeCoin | https://huobiapi.github.io/docs/spot/v1/en/#exchange-stable-coin |
const huobi=require('node-api-huobi');
const auth = {
apikey: 'MY_API_KEY',
secret: 'MY_API_SECRET'
};
const marketAPI=new huobi.sockets.marketApi();
const mbpAPI=new huobi.sockets.MBPApi();
const tradingAPI=new huobi.sockets.tradingApi(auth);
tradingAPI.setHandler('orders', (symbol,method,data,option) => { updateOrder(symbol,method,data); });
tradingAPI.socket._ws.on('authenticated', async () => { // For market API's: initialized
const res=await tradingAPI.subscribeOrderUpdates();
});
tradingAPI.socket._ws.on('closed', async () => {
// do something, like clean-up and reconnect
});
function updateOrder(symbol,method,data) {
// do something
};
const marketAPI=new huobi.sockets.marketApi();
| API | HANDLER | DESCRIPTION |
|---|---|---|
| subscribeCandles unsubscribeCandles getCandle | market.kline | https://huobiapi.github.io/docs/spot/v1/en/#market-candlestick |
| subscribeTickers unsubscribeTickers getTicker | market.ticker | https://huobiapi.github.io/docs/spot/v1/en/#market-ticker |
| subscribeMarketDepth unsubscribeMarketDepth getMarketDepth | market.depth | https://huobiapi.github.io/docs/spot/v1/en/#market-depth |
| subscribeBests unsubscribeBests getBest | market.bbo | https://huobiapi.github.io/docs/spot/v1/en/#best-bid-offer |
| subscribeTrades unsubscribeTrades getTrades | market.trade | https://huobiapi.github.io/docs/spot/v1/en/#trade-detail |
| subscribeStats unsubscribeStats getStats | market.detail | https://huobiapi.github.io/docs/spot/v1/en/#market-details |
| subscribeETP unsubscribeETP getETP | market.etp | https://huobiapi.github.io/docs/spot/v1/en/#subscribe-etp-real-time-nav |
const mbpAPI=new huobi.sockets.MBPApi();
| API | HANDLER | DESCRIPTION |
|---|---|---|
| subscribeMBPIncremetal unsubscribeMBPIncremetal getMBPIncremetal | market.mbp | https://huobiapi.github.io/docs/spot/v1/en/#market-by-price-incremental-update |
| subscribeMBPRefresh unsubscribeMBPRefresh getMBPRefresh | market.mbp.refresh | https://huobiapi.github.io/docs/spot/v1/en/#market-by-price-refresh-update |
const tradingAPI=new huobi.sockets.tradingApi();
| API | HANDLER | DESCRIPTION |
|---|---|---|
| subscribeOrderUpdates unsubscribeOrderUpdates | orders | https://huobiapi.github.io/docs/spot/v1/en/#subscribe-order-updates |
| subscribeTradeClearing unsubscribeTradeClearing | trade.clearing | https://huobiapi.github.io/docs/spot/v1/en/#subscribe-trade-details-amp-order-cancellation-post-clearing |
| subscribeAccountChange unsubscribeAccountChange | accounts.update | https://huobiapi.github.io/docs/spot/v1/en/#subscribe-account-change |
FAQs
Non-official implementation of Huobi's API's
The npm package node-api-huobi receives a total of 2 weekly downloads. As such, node-api-huobi popularity was classified as not popular.
We found that node-api-huobi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.