Current collected state Current
Observed since 20 Oct, 19:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
3commas-typescript
TypeScript 3Commas API client
An unofficial 3Commas API wrapper in TypeScript. Check out the offical documentation here.
npm install 3commas-typescript
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));
},
});
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)
changeUserMode(mode: 'paper' | 'real')
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)
getBots(params?: BotsParams)
getBot(id: number)
getBotsStats(params?: BotsStatsParams)
getDeals(params?: DealsParams)
getDeal(id: number)
getDealSafetyOrders(id: number)
customRequest(method: string, version: number, path: string, payload?: any)
subscribeSmartTrade(callback?: (data: WebSocket.Data) => void)
subscribeDeal(callback?: (data: WebSocket.Data) => void)
unsubscribe()
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)
}
Buy me a coffee
ETH: 0xB6fc1dFABf1244138b048C3F80ba5678d8f6f0CE
BAT: 0x336bFB8247640C0848F8aFFB80464f3fF489B888
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
axiosEnvironment{
"local_name": "axios",
"alias": false,
"peer_metadata": null
} | ^0.19.2 | runtime |
crypto-jsEnvironment{
"local_name": "crypto-js",
"alias": false,
"peer_metadata": null
} | ^4.0.0 | runtime |
@types/crypto-jsEnvironment{
"local_name": "@types/crypto-js",
"alias": false,
"peer_metadata": null
} | ^3.1.47 | development |
ts-node-devEnvironment{
"local_name": "ts-node-dev",
"alias": false,
"peer_metadata": null
} | ^1.0.0 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^3.9.7 | development |
Source distribution
{
"integrity": "sha512-BeuNP/7+EMcmhbjdPRMBCgYjKGoEn5z1rXP9Iw5Y8DJy8Jq1NXqzdDdZ2r5KzVOT96X143TFXdAp4evbZZha3w==",
"shasum": "031994b47e80a6239e0ddf464c7f9f2b69e97f1b",
"tarball": "https://registry.npmjs.org/3commas-typescript/-/3commas-typescript-1.0.7.tgz",
"fileCount": 15,
"unpackedSize": 26572,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzaIcCRA9TVsSAnZWagAADQsP/RFy7xpAeMHCFOtCJJV5\n2PMZ5yz/CtjKA+VrCIQ+BOIJq1pvcckdeAf/+oWnTOG0Ss9G0iNAJBtlSC6X\nsnInT7mE+ylNEVaQU3BLCj/2Qr+zEs5+fOxR6S7uC+Ief9ICTogaLd0KxKB/\nndMAJhw8j0C+yVWQymj1FedXV59Nj76vAVaOhMaPW28Cgx2bhtIj0PolONUY\nOVvWDY38t3g5NHNQ7HDuOhxiSRI+pbbAIar6VmDLCXe1dcidgCg4BT0aB5rR\nHBLC3pMGrn4zGY5WYYGNYbFM2EDQkDYDtexUzJY1raIURSaei7PHe5Lr1JBV\nzJ2HC70EWmnYohP0PL4L2uRzf53gYYRyj2IuY4Y/osxuJl4CNww8SBT4Mxju\nfx4jvWHqaRgw/qVVzeaPSz6ZYp2eJlAZwrmBwl4j05Vt5iD1+iAAKJYP62Id\npZrk4UCY2PTsX+JbAW/0tqVtBb7wXuy9AYVKiTBGRllHJmMNRx+BRYSdRuAS\ndhokrMoZc/mCloefE3A1otbYPshz6vfYETI2trnPV9uvCt9IrVZYMci5NQZ9\nB/yDYi73vSkahhJILMpFftCD+cHgfRzSeyGAqPys0C9CmWu4X12uod+BOPAL\ntRxafQzj3tUBmxIYrBLyekqpPOQWR/2WfBxcVR1pM90NnFDEzrB11gGqkpgL\n4vHl\r\n=vA23\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQDzofOhjZjVoMixhFvb14wTaoqzg1dWG+hocvJgCYH1zgIgFe5w9Cs+HA+dPqEqTyKeApd8hoSmXm7gBgS0/T6BoYE="
}
]
}Observed since 20 Oct, 19:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:6d8cd660752649cc5281fd34d4881819b648df1aa90beeb6ced6ae0d9fc855db