Example Vue.js website demonstrating how to listen to the Binance Websocket server and trade charts using d3.js.
⚡️ https://adrianmanchev.github.io/trading-charts
Create a line chart with historical close prices for the time series and change the tick price.
import chart from '@/helpers/chart'
const draw = chart(data, {
width: 960
})
draw.update(price)
Request historical klines data for a certain symbol over a specified time period. For drawing line charts inside payload data, use time and close price.
import axios from 'axios'
const instance = axios.create(
baseURL: 'https://api.binance.com',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
}
})
const klines = instance({
method: 'get',
url: '/api/v3/klines',
params: {
symbol: 'BTCUSDT',
interval: '15m'
}
})
npm install
npm run serve
npm run build
npm run lint