npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

3commas-typescript

v1.3.6

Published

TypeScript 3Commas API client

Readme

3Commas API Client for TypeScript

npm npm bundle size

Open in Gitpod

An unofficial 3Commas API wrapper in TypeScript. Check out the offical documentation here.

Install

npm install 3commas-typescript

Usage

import { API } from '3commas-typescript';

const api = new API({
  key: 'YOUR_KEY', // Optional if only query endpoints with no security requirement
  secrets: 'YOUR_SECRETS', // Optional
  timeout: 60000, // Optional, in ms, default to 30000
  forcedMode: 'real' | 'paper',
  errorHandler: (response, reject) => {
    // Optional, Custom handler for 3Commas error
    const { error, error_description } = response;
    reject(new Error(error_description ?? error));
  },
});

Supported Request

Account

ping()

time()

transfer(params: TransferParams)

getTransferHistory(params: TransferHistoryParams)

getTransferData()

addExchangeAccount(params: any)

editExchangeAccount(params: any)

getExchange()

getMarketList()

getMarketPairs(params?: any)

getCurrencyRate(params: CurrencyParams)

getCurrencyRateWithLeverageData(params: MarketCurrencyParams)

getActiveTradeEntities(account_id: number)

sellAllToUSD(account_id: number)

sellAllToBTC(account_id: number)

getBalanceChartData(account_id: number, params: any)

loadBalances(account_id: number)

renameExchangeAccount(account_id: number, name: string)

removeExchangeAccount(account_id: number)

getPieChartData(account_id: number)

getAccountTableData(account_id: number)

getAccountInfo(account_id?: number)

User

changeUserMode(mode: 'paper' | 'real')

Smart Trade

getSmartTradeHistory(params?: SmartTradeHistoryParams)

smartTrade(params: SmartTradeParams)

getSmartTrade(id: number)

cancelSmartTrade(id: number)

updateSmartTrade(id: number)

averageSmartTrade(id: number, params: FundParams)

reduceFund(id: number, params: FundParams)

closeSmartTrade(id: number)

forceStartSmartTrade(id: number)

forceProcessSmartTrade(id: number)

setNoteSmartTrade(id: number, note: string)

getSubTrade(id: number)

closeSubTrade(smartTradeId: number, subTradeId: number)

cancelSubTrade(smartTradeId: number, subTradeId: number)

Bots

getBots(params?: BotsParams)

getBot(id: number)

getBotsStats(params?: BotsStatsParams)

getDeals(params?: DealsParams)

getDeal(id: number)

getDealSafetyOrders(id: number)

Custom Request

customRequest(method: string, version: number, path: string, payload?: any)

Websocket

subscribeSmartTrade(callback?: (data: WebSocket.Data) => void)

subscribeDeal(callback?: (data: WebSocket.Data) => void)

unsubscribe()

Response Type

The Order type returned by smart trade endpoint is generated using quicktype.

The type correctness isn't guaranteed. You can perform a type check before access.

try {
  const order = await api.getSmartTrade(1234567)
  const validatedOrder = api.validateOrderType(order)
  ...
} catch (error) {
  console.error(error)
}

Support

Buy me a coffee

ETH: 0xB6fc1dFABf1244138b048C3F80ba5678d8f6f0CE

BAT: 0x336bFB8247640C0848F8aFFB80464f3fF489B888