Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
bfx-hf-algo
Advanced tools
For a description of the included algo orders, see our user docs
npm i --save bfx-hf-algo
npm i --save bfx-hf-models
npm i --save bfx-hf-ext-plugin-bitfinex
npm i --save bfx-hf-models-adapter-lowdb
To get started, create an object wsSettings required for AOAdapter
,
then pass them to a new AOHost
instance and call startAO(id, args)
:
const {
AOHost, PingPong, Iceberg, TWAP, AccumulateDistribute, MACrossover
} = require('bfx-hf-algo')
const HFDB = require('bfx-hf-models')
const HFDBLowDBAdapter = require('bfx-hf-models-adapter-lowdb')
const {
schema: HFDBBitfinexSchema
} = require('bfx-hf-ext-plugin-bitfinex')
const algoDB = new HFDB({
schema: HFDBBitfinexSchema,
adapter: HFDBLowDBAdapter({
dbPath: path.join(__dirname, '..', 'db', 'example.json')
})
})
const host = new AOHost({
aos: [PingPong, Iceberg, TWAP, AccumulateDistribute, MACrossover],
wsSettings: {
apiKey: '...',
apiSecret: '...',
// Authentication with auth tokens is available as an alternative for API credentials
// authToken,
dms: 4
}
})
host.on('ao:state:update', async (updateOpts) => {
// send ui updates
})
host.on('auth:error', (packet) => {
console.log('error authenticating: %j', packet)
})
host.on('error', (err) => {
console.log('error: %s', err)
})
host.once('ready', async () => {
// Start an Iceberg order instance
const [serialized] = await host.startAO('bfx-iceberg', {
symbol: 'tBTCUSD',
price: 21000,
amount: -0.5,
sliceAmount: -0.1,
excessAsHidden: true,
orderType: 'LIMIT',
_margin: false,
})
// later, host.stopAO(gid)
})
Refer to the docs/
folder for JSDoc-generated API documentation.
Environment variables API_KEY and API_SECRET must be defined (in paper mode)
Run npm run benchmark:mock
and keep it running in a separate terminal
Run TARGET=<benchmark name> npm run benchmark:run
to generate the reports (destination folder is ./benchmarks_reports),
where TARGET is name of JS file in the root of test/benchmarks
folder
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
HF Algorithmic Order Module
The npm package bfx-hf-algo receives a total of 11 weekly downloads. As such, bfx-hf-algo popularity was classified as not popular.
We found that bfx-hf-algo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.