Catalog npm
PACKAGE EXPLORERView in registry

3commas-ts

npm

3Commas api wrapper for two type of api keys

3commas3commas-tsapitypescriptwrapper
Versions collected10
Direct dependencies15From release 1.1.8
Last observed20 Oct, 19:31 UTC

README

Current package documentation

3Commas API provider for TypeScript

Typing SVG

Official source documentation here.

Install

npm install 3commas-ts
yarn add 3commas-ts
pnpm add 3commas-ts

Usage

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

const GET = async () => {    
  const apiKey = process.env.API_KEY;
  const apiSecret = process.env.API_SECRET;

  const api = new API({
    apiKeyType: 'selfGenerated',
    key: apiKey,
    secrets: apiSecret, 
    forcedMode: 'paper'
  });
    
  try {
    const response = await api.getSmartTradeHistory({ per_page: 10, status: 'active' });

    return Response.json(response);
  } catch (error: any) {
    console.error(error);
    return Response.json(error.message, { status: 500 });
  }
};

3Commas offers two different approaches to generation API keys:

  • System-generated pair (api key + secret)
  • Self-generated rsa pair (api-key + public key + private key)

The first one is created automatically. For latter you need to use, for example, official binance key generator. More information for this case here.

Also you can get more understanding of these approaches using the 3commas signature calculator.

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()

Useful

3Commas API Swagger

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 10

Collected releases
VersionPublishedDirect dependenciesOpen version
1.1.8Registry latest8 Mar 202415
1.1.74 Mar 202415
1.1.64 Mar 202415
1.1.54 Mar 202415
1.1.44 Mar 202415
1.1.34 Mar 202415
1.1.23 Mar 202415
1.1.127 Feb 202415
1.1.026 Feb 202415
1.0.026 Feb 202415

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
hirurg-lybitel/3commas-ts

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:31 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:598bae192af246f3aa5d87c7b0c7787bf6616dbad80008e7d5ae189cf50fabe7