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.23.0 | 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.3 | 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.11.4 | 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
} | ^8.2.0 | 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.4 | development |
lint-stagedEnvironment{
"local_name": "lint-staged",
"alias": false,
"peer_metadata": null
} | ^11.2.3 | development |
prettierEnvironment{
"local_name": "prettier",
"alias": false,
"peer_metadata": null
} | ^2.4.1 | 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.4 | development |
Source distribution
{
"integrity": "sha512-oHJ4p44m/FovJZkB976StEllm6YySYaJfOnxRAAcUntZKd9XFBOiQFHdq+insI8Orm6bwbcS9dhtlTrsJxkWlQ==",
"shasum": "35e1e97cef33a76581ede0dbd7c8feab62d89001",
"tarball": "https://registry.npmjs.org/3commas-typescript/-/3commas-typescript-1.3.4.tgz",
"fileCount": 20,
"unpackedSize": 80934,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuedhCRA9TVsSAnZWagAAIqcP/2t83O2op4Sz3iv8zAfL\nXzO+L7OaNg0tQFFnLBfYDB1q/Q0gx7MO90GWzvxJvNYJyzGhOVZoSCpLms+S\nmel/LpGhCUEE78tSIYUQE3d+ZM0ntjoBFuG9+Dzh1ABMkQNY1pYkodZ3Tp6w\noG7hxhIz8TN+I0pp/3QkyOHImCGYopX2BplYGrmqf+70Ly8Ap9tCjlKy5NxM\ns8epuq5k3zOnZ1hMhHCGwunUyH6KvY8USONO7CxYwQ/CiiUYJ0hbhn3Rgks2\n/wQug90vuCJdjflP2ePYlXgPVg1GqZKsd3/DGV4MqkiPRZqfrScP+zkIyAS+\nx6htp4vZ7Ny7f8/HFMJzI7tP+Uu4ZnjOwKd2giFIjabPn4Jt2MCND247+sEG\nFVpSBKVyNOguhYr7f9Wq1KLVClZqFvcEAq1yzcMsDJCZgBbhhAPj6/82idiz\n8/81w+2hA/nGfN+aL4Z3pbzsqfmcrQM/o6VbFLPxx6eF77piP+ByT3RN+rjj\n00uyY1+JSxMNDYCpg9qanB1MZeFxOn6jKh9v4YluQMRR66oL67OrB+PWdWbB\nOw8fmez21C/oQBN5RbLwSyuTwO/TVSPMpHBQ5WDXGYZrq4hHM+1N/7vwVCT/\nocc61WLTDpxlI2O1LImwJSmEdvLZRpqBVmbnpQCzJ8X2JNOEOl4xnhTO7FrD\n9epU\r\n=r1jw\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCICYN2jFJAG/yzBFAw5bKvckAo0fEzT7nWKAOahC5thE4AiATUJxjw9OaWkjAAVfvqELt30mtzyRecaaSRGcXc8viqA=="
}
]
}Observed since 20 Oct, 19:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:b3af3093e00998ef323cfa4c8dabb182c247c9727f3eb4622d4a5c50f74415d0