Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@volatility/volatility-ws
Advanced tools
The Volatility WebSocket API follows similar interface patterns as popular platforms such as Kraken, Coinbase and deribit. This early version of the API only provides realtime data for MFIV 14 day ETH. Additional time periods, assets, methodologies, and historical data coming soon.
Name | Endpoint | Purpose |
---|---|---|
Production | wss://ws.prd.volatility.com | For production and consumer facing use. |
To use our WebSocket API a valid API key is required. Here's how:
#collabland-join
channel.#labs-volatility-api
. Go to this channel and request an API key.Our API can be accessed through our npm package server-side or directly using the WebSocket Client API client-side.
If you clone this repository, you can run our example script in node by doing the following:
npm install
export VOLATILITY_API_KEY=<API_KEY>
<API_KEY>
with your API key our team provided you.ts-node src/example.ts
You can see the example script source code here.
Currently, this package only works on the server-side. A future release will support browser-based client-side applications.
Before you can use this package, you'll need to install it.
Install the package:
npm i @volatility/volatility-ws
After it's installed, import the realtimeVolatility method for use.
Example:
import { realtimeVolatility } from "volatility-api"
const messages = realtimeVolatility({
methodology: "MFIV"
timePeriod: "14D",
asset: "ETH",
apiKey: "<API_KEY>"
})
// process messages via async iteration:
for await (const message of messages) {
console.log(message);
}
The realtimeVolatility
function includes the following options for managing the websocket interface.
realtimeVolatility({
idleTimeout: number | undefined, // default: 10000 - how long to wait for inactivity before giving up
reconnect: boolean | undefined, // default: true - reconnect on disconnect
onError?: (error: Error) => void
})
FAQs
Documentation for Volatility WebSockets API
We found that @volatility/volatility-ws demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.