Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.