Current collected state Current
Observed since 20 Oct, 19:32 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.21.4 | runtime |
crypto-jsEnvironment{
"local_name": "crypto-js",
"alias": false,
"peer_metadata": null
} | ^4.1.1 | runtime |
qsEnvironment{
"local_name": "qs",
"alias": false,
"peer_metadata": null
} | ^6.10.1 | runtime |
wsEnvironment{
"local_name": "ws",
"alias": false,
"peer_metadata": null
} | ^8.2.2 | runtime |
@types/crypto-jsEnvironment{
"local_name": "@types/crypto-js",
"alias": false,
"peer_metadata": null
} | ^4.0.2 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^16.9.1 | development |
@types/qsEnvironment{
"local_name": "@types/qs",
"alias": false,
"peer_metadata": null
} | ^6.9.7 | development |
@types/wsEnvironment{
"local_name": "@types/ws",
"alias": false,
"peer_metadata": null
} | ^7.4.7 | development |
dotenvEnvironment{
"local_name": "dotenv",
"alias": false,
"peer_metadata": null
} | ^10.0.0 | development |
huskyEnvironment{
"local_name": "husky",
"alias": false,
"peer_metadata": null
} | ^7.0.2 | development |
lint-stagedEnvironment{
"local_name": "lint-staged",
"alias": false,
"peer_metadata": null
} | ^11.1.2 | development |
prettierEnvironment{
"local_name": "prettier",
"alias": false,
"peer_metadata": null
} | ^2.4.0 | development |
ts-node-devEnvironment{
"local_name": "ts-node-dev",
"alias": false,
"peer_metadata": null
} | ^1.1.8 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^4.4.3 | development |
Source distribution
{
"integrity": "sha512-f0IsQhqhJ93YxKaoS8zHqCJnqDuIqmNu62Jv4HIsOKkMMHnqAE/LQd1iIaeSNJ5SZUdUn71zvMJRAyoZgXUt2g==",
"shasum": "c400c1d6f8623502974e252b106a60ee23e50dd0",
"tarball": "https://registry.npmjs.org/3commas-typescript/-/3commas-typescript-1.3.3.tgz",
"fileCount": 20,
"unpackedSize": 78607,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQN44CRA9TVsSAnZWagAAWAYP/1DuBcjqUg4Qh32kv2K0\neOP1U0LmvbljrFcsgv4ZFPWG4+2mTitnrCpDKUKYUDIYnbP/RH5s/A2Oon5b\n9+tWXzsJOq4pLMha6CEe4PxIihHfS1R44Gco7/c6hGavTMFQgX97TFxfruSd\nVPuEy7Snn4Nwv8UuL1NAgXN4Sj1ywZay0+BCJUOj+I+mAcpgOuwwP0IFgyRb\n/wP5ikvwYnsWHzz/uZi8VqkeVWzxT4iiUnOwFci8lUFuzEx400qZt9Y19viD\nGRTkmcMU3sgseOVzxSNt7weSNOB2a7sz7G2xfPsHDRRklAVpC3IL4T1P8/v4\nvY8Nz2O6jFHVDJn0Y5O1FP5BdAeYMkQyiuDWYmoye9VTDQbTak+BFnSGwH3V\nNQLwuKJK0E/FfE9E2pk+n7/8EOEzdeRiJIXQohMUMGisbdsUyLmrU+g1BH1F\ngzk+d+dGInr/xgwCkFZ6nPffxfpMYV6RyCfLcC1cA9kyQDO2Lr7ZTQi4EZtC\nKdlq7H1lE3Qvoo8hmerUdIJzEL99iW36M1Gp5aCf8y/3H/9fcj1HPIz19T2r\ngSwzrCVAadP8darYuV9MSmEU3x1sDfI+yv/ONkNb0DLkrYl1t/K463UWN/xE\nwwnYQ5Faw/ROIgwGSSSE5+5M0GgbPJAuv13TQmthgBlOfbaBTRVMpLzliTR1\ncyjg\r\n=FX7m\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQDC22JjvEt9MgbZ5bQZagS7Ra4s37ex4O0GqkzjD01HPwIhAIwbUUUXUN0hsh6BZGHLyk84l3kd1Ep1Wih4kcLrEMST"
}
]
}Observed since 20 Oct, 19:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:def4ea5914acf0e329c93b79df8a9518fc6bdba6476efbce4844320af0912a78