mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-23 07:15:15 +00:00
34 lines
1.0 KiB
MySQL
34 lines
1.0 KiB
MySQL
|
-- +up
|
||
|
-- +begin
|
||
|
create table if not exists ftx_klines
|
||
|
(
|
||
|
gid bigint unsigned auto_increment
|
||
|
primary key,
|
||
|
exchange varchar(10) not null,
|
||
|
start_time datetime(3) not null,
|
||
|
end_time datetime(3) not null,
|
||
|
`interval` varchar(3) not null,
|
||
|
symbol varchar(12) not null,
|
||
|
open decimal(16,8) unsigned not null,
|
||
|
high decimal(16,8) unsigned not null,
|
||
|
low decimal(16,8) unsigned not null,
|
||
|
close decimal(16,8) unsigned default 0.00000000 not null,
|
||
|
volume decimal(20,8) unsigned default 0.00000000 not null,
|
||
|
closed tinyint(1) default 1 not null,
|
||
|
last_trade_id int unsigned default '0' not null,
|
||
|
num_trades int unsigned default '0' not null,
|
||
|
quote_volume decimal(32,4) default 0.0000 not null,
|
||
|
taker_buy_base_volume decimal(32,8) not null,
|
||
|
taker_buy_quote_volume decimal(32,4) default 0.0000 not null
|
||
|
);
|
||
|
-- +end
|
||
|
-- +begin
|
||
|
create index klines_end_time_symbol_interval
|
||
|
on ftx_klines (end_time, symbol, `interval`);
|
||
|
-- +end
|
||
|
-- +down
|
||
|
|
||
|
-- +begin
|
||
|
drop table ftx_klines;
|
||
|
-- +end
|