Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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 13 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.