Accessing Cryptocurrency gegevens via the STS Binance knot
Wij’ve seen a few folks playing around with FRED to access – and te some cases – trade on cryptocurrencies, which wij thought wasgoed a joy use of Node-RED. Our very own crypto experienced, Ted, here at STS determined to hop te and develop a fresh Knot for accessing and using the Binance cryptocurrency verhoging. For those of you who aren’t abierto, Binance is one of the largest crypto trading verhoging (perhaps largest by volume), and importantly has a comprehensive and sophisticated API.
The fresh Binance knot that Ted has written is available for NPM download and is also installed on FRED for use.
A duo of caveats:
- you’ll need a FRED tall (or higher) account to indeed use the knot – otherwise your capability to track ter real-time won’t be excellent
- Use it at your own risk – while you can use it for trading, you do so entirely at your own risk. FRED isn’t a trading verhoging and wij take no responsibility whatsoever for financial losses, security or other issues if you choose to use the knot on FRED for any type of trading activity.
- Wij’ve written a brief tutorial on using the knot that shows how a plain Node-RED flow can get a multitude of market gegevens.
- A 2nd tutorial on dashboarding market gegevens from Binance builds on the previous tutorial and adds a basic instrumentenbord that uses Node-RED UI knots to graph live gegevens.
- Instrumentenbord DEMO. Ted has also created a very slick instrumentenbord demo which you can see here.
Related video: Ep:29 Odyssey Airdrop, Listing on Binance & Dates to Watch the Charts!
- A tutorial that explains how this is done is here
The knot provides an interface to two core sets of API. Those associated with getting market gegevens and those associated with cómputo and trading. The very first group can be accessed without an account at Binance. The functionality associated with comprobación and trading requires you have an account with Binance and have set up the associated Two phase security.
Accessing market informatie
- getPrice: Gets the latest price of a symbol. Takes a ticker pair spil input and comes back the current price
- getAllPrices: Gets the latest price of all symbols. No input and comebacks an opbergmap of all available ticker pairs and their current prices
- getBookTicker: Gets the bid/ask prices for a symbol. Takes a ticker pair spil input and comes back an informatie on latest book price
- getDayStats: Get the 24hr ticker price switch statistics for a symbol. Takes a tickerPair spil input and comes back the latest 24h stats
- getCandlesticks: Get Kline/candlestick gegevens for a symbol. Takes a tickerPair, time interval and commence/ed times and comes back an of candlesticks/kline gegevens specified by parameters
Balanceo and trading
- getOrders: Get open orders for a symbol. Takes and API credential and a tickerPair. Comes back an of current orders for that tickerPair
- getBalance: Get a list of current balances.Takes and API credential and a tickerPair and comes back an opbergmap of ticker symbols and quantity on the account
- cancelOrders: Mampara all open orders of a ticker pair. Takes and API credential and a tickerPair and comes back an with the binance API response
- getTradeHistory: Get trade history of a ticker pair.Takes and API credential and a tickerPair and comebacks an list of previous orders
- buy: Create a limit or market buy order. USE AT YOUR OWN RISK.
- API credentials – required
- tickerPair – required
- order type (limit/market) – required
- quantity – required
- price – required
Related video: WanChain (WAN) on Binance – Multi-Chain Assets Multi-Blockchain dAPPs
Related video: District0x TenX PAY and LISK Updates!!
Response and error treating
Most responses are directly passed through from the API to the output payload. Errors are directed to the knots status message spil well spil the debug console.