Gathering detailed insights and metrics for @ixjb94/binance
Gathering detailed insights and metrics for @ixjb94/binance
Binance connector that contain all endpoints (Spot, Futures, Margin, Websocket, etc)
npm install @ixjb94/binance
Typescript
Module System
Node Version
NPM Version
77.5
Supply Chain
99.1
Quality
75.7
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,401
Last Day
1
Last Week
3
Last Month
13
Last Year
275
MIT License
2 Stars
31 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on May 03, 2024
Minified
Minified + Gzipped
Latest Version
1.0.11
Package Id
@ixjb94/binance@1.0.11
Unpacked Size
419.46 kB
Size
46.47 kB
File Count
49
NPM Version
8.19.3
Node Version
19.1.0
Published on
Aug 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
200%
3
Compared to previous week
Last Month
-66.7%
13
Compared to previous month
Last Year
-75.6%
275
Compared to previous year
3
3
binance
contains this components
Component | Info | Status | Document Link |
---|---|---|---|
Spot | Spot API | Completed | Spot |
Futures | Futures API | Completed | Futures |
Coin-M | Coin-M API | Completed | Coin-M |
Options | European API | Completed | Options |
BLVT Streams | BLVT Streams | Completed | BLVT |
Websocket | Abstract Websocket | Completed | |
Http | Abstract Http | Completed |
Spot: contains: Wallet
, Sub-Account
, Market Data
, Spot
, Margin
, Savings
, Staking
, Mining
, Futures
, Futures Algo
, Portfolio
, BLVT
, BSwap
, Fiat
, C2C
, VIP Loans
, Crypto Loans
, Crypto Loans
, Pay
, Convert
, Rebate
, NFT
, Binance Code
(all available endpoints in binance spot doc)
Websocket & Http: can connect/request to any of binance ws/rest endpoints
Node ^18.0.0 and higher
(because it's using fetch API)
npm i @ixjb94/binance
1import { Futures } from "@ixjb94/binance"
Note: Everything isPromised
so you need to do .then
or await
1import { Futures } from "@ixjb94/binance" 2 3const myFuture = new Futures({ 4 isTestNet: true, 5}) 6 7// exchange info 8myFuture.exchangeInfo() 9 10// candles data 11myFuture.klines({ 12 interval: "1m", 13 symbol: "BTCUSDT", 14 limit: 10, 15})
1import { Futures } from "@ixjb94/binance"
2
3const myFuture = new Futures({
4 api_key: "MyApiKey",
5 api_secret: "MyApiSecret",
6 isTestNet: true,
7})
8
9// get account balance
10myFuture.balance()
11
12// place new order
13myFuture.newOrder({
14 symbol: "BTCUSDT",
15 side: "BUY",
16 type: "MARKET",
17 quantity: 0.01,
18})
1import { Futures } from "@ixjb94/binance" 2 3const myFuture = new Futures({ 4 isTestNet: true, 5}) 6 7// subscribe to two market data 8myFuture.ws.subscribe(["btcusdt@kline_1m", "ethusdt@kline_3m"], 1, "MyMarketData") 9 10// listen for data coming from binance 11myFuture.ws.addListener("MyMarketData", (socket) => { 12 13 socket.addEventListener("message", (event) => { 14 let data = event.data 15 data = JSON.parse(data) 16 17 console.log(data) 18 }) 19 20})
1import { Futures } from "@ixjb94/binance"
2
3const myFuture = new Futures({
4 api_key: "MyApiKey",
5 api_secret: "MyApiSecret",
6 isTestNet: true,
7})
8
9async function Run() {
10
11 // 1- get the listenKey
12 const reqListenKey = await myFuture.newListenKey()
13 const listenKey = reqListenKey.listenKey
14
15 // 2- subscribe to User Data Stream
16 myFuture.ws.userStream(listenKey, "MyUserData")
17
18 // 3- Listen for data coming from binance
19 myFuture.ws.addListener("MyUserData", (socket) => {
20
21 socket.addEventListener("message", (event) => {
22 let data = event.data
23 data = JSON.parse(data)
24
25 console.log(data)
26 })
27
28 })
29}
30Run()
Starts | Example | Http Method |
---|---|---|
new | newOrder | POST |
change | changeLeverage | POST | PUT |
delete | deleteOrder | POST | DELETE |
(nothing) | exchangeInfo | GET |
Buffer
OR Raw string
JSON.parse
them1import { Futures } from "@ixjb94/binance" 2 3const myFuture = new Futures({ 4 isTestNet: true, 5}) 6 7myFuture.ws.subscribe(["btcusdt@kline_1m"], 1) 8 9myFuture.ws.addListener("DATA", (socket) => { 10 11 // Buffer 12 socket.addListener("message", (data, siBinary) => { 13 console.log(data) 14 }) 15 16 // Raw string data 17 socket.addEventListener("message", (event) => { 18 // Its raw 19 let data = event.data 20 21 // Now its parsed 22 data = JSON.parse(data) 23 }) 24 25})
.http.
OR .ws.
1import { Futures } from "@ixjb94/binance" 2 3const myFuture = new Futures({ 4 isTestNet: true, 5}) 6 7// websocket example 8myFuture.ws.subscribe(["btcusdt@kline_1m"], 1) 9 10// http example 11myFuture.http.publicGET("/fapi/v1/exchangeInfo")
No vulnerabilities found.
No security vulnerabilities found.