Binbot charts is the default candlestick bars chart used in terminal.binbot.in to render bots graphically.
npm install binbot-chartsBinbot charts is default candlestick bars chart used in terminal.binbot.com to render bots graphically, packaged to be used in React.
Import it in your project as a React component
import TVChartContainer from 'binbot-charts'
This library now supports multiple cryptocurrency exchanges. You can configure which exchange to use and which exchanges to make available for symbol search.
``jsx
import TVChartContainer, { SUPPORTED_EXCHANGES } from 'binbot-charts';
function MyChart() {
return (
interval="1h"
exchange="binance" // or "kucoin"
supportedExchanges={["binance", "kucoin"]}
/>
);
}
`
- exchange (optional, default: "binance"): The exchange to use for fetching data. Options: "binance", "kucoin"supportedExchanges
- (optional, default: ["binance", "kucoin"]): Array of exchanges to include in symbol searchsymbol
- (optional, default: "BTCUSDT"): Trading pair symbolinterval
- (optional, default: "1h"): Chart interval/timeframetimescaleMarks
- (optional): Array of custom marks to display on the timelineorderLines
- (optional): Array of order lines to display on the chartonTick
- (optional): Callback function for real-time tick updatesgetLatestBar
- (optional): Callback function to get the latest bar data
You can also import and use the exchange configurations directly:
`jsx
import { SUPPORTED_EXCHANGES, ExchangeConfig } from 'binbot-charts';
// Access exchange configuration
const binanceConfig = SUPPORTED_EXCHANGES.binance;
console.log(binanceConfig.restApiUrl); // "https://api.binance.com"
`
1. Run npm install && npm start. It will build the project and open a default browser with the Charting Library.library_path
2. should be node_modules/dist/charting_librarycharting_library
3. Write a script to copy to public/charting_library during build. E.g. cp -r node_modules/dist/charting_library/ src/public/charting_library
This project was bootstrapped with Create React App.