
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
longbridge
Advanced tools
longbridge
provides an easy-to-use interface for invokes Longbridge OpenAPI
.
Install Longbridge OpenAPI SDK
npm install longbridge
Setting environment variables(MacOS/Linux)
export LONGBRIDGE_APP_KEY="App Key get from user center"
export LONGBRIDGE_APP_SECRET="App Secret get from user center"
export LONGBRIDGE_ACCESS_TOKEN="Access Token get from user center"
Setting environment variables(Windows)
setx LONGBRIDGE_APP_KEY "App Key get from user center"
setx LONGBRIDGE_APP_SECRET "App Secret get from user center"
setx LONGBRIDGE_ACCESS_TOKEN "Access Token get from user center"
import { Config, QuoteContext } from 'longbridge'
let config = Config.fromEnv()
let ctx = new QuoteContext(config)
await ctx.open()
let resp = await ctx.quote(["700.HK", "AAPL.US", "TSLA.US", "NFLX.US"])
for (let obj of resp) {
console.log(obj.toString())
}
import { Config, QuoteContext, SubType } from 'longbridge'
let config = Config.fromEnv()
let ctx = new QuoteContext(config, (_, event) => console.log(event.toString()))
await ctx.open()
await ctx.subscribe(["700.HK", "AAPL.US"], [SubType.Quote], true)
import { Config, TradeContext, SubmitOrderOptions, OrderType, OrderSide, Decimal, TimeInForceType } from 'longbridge'
let config = Config.fromEnv()
let ctx = new TradeContext(config)
await ctx.open()
let resp = await ctx.submitOrder(
new SubmitOrderOptions("700.HK", OrderType.LO, OrderSide.Buy, new Decimal("200"), TimeInForceType.Day)
.price(new Decimal("300"))
)
console.log(resp)
Licensed under either of
FAQs
A Node.js library for Longbridge Open API
The npm package longbridge receives a total of 2 weekly downloads. As such, longbridge popularity was classified as not popular.
We found that longbridge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.