Skip to content

Commit

Permalink
Remove obsolete example
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatas committed Oct 25, 2024
1 parent 5701427 commit 0396987
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions examples/toolkit-demo/candlestick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,7 @@ class Tick < ActiveRecord::Base
volume: data.map(&:volume)
}
end
scope :ohlcv, -> do
select("symbol,
first(price, time) as open,
max(price) as high,
min(price) as low,
last(price, time) as close,
sum(volume) as volume")
end


continuous_aggregates(
timeframes: [:minute, :hour, :day, :month],
Expand Down Expand Up @@ -91,8 +84,8 @@ class Tick < ActiveRecord::Base

db do
if true
Tick.drop_continuous_aggregates
drop_table :ticks, if_exists: true, force: :cascade
#Tick.drop_continuous_aggregates
#drop_table :ticks, if_exists: true, force: :cascade

hypertable_options = {
time_column: "time",
Expand Down Expand Up @@ -158,12 +151,6 @@ class App < Sinatra::Base

end

get '/candlestick_1d' do
json({
title: "Candlestick daily this month",
data: Tick::CandlestickPerDay.previous_week.plotly_candlestick
})
end

get '/' do
<<~HTML
Expand Down

0 comments on commit 0396987

Please sign in to comment.